#1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Dec 2013
    Posts
    4
    Rep Power
    0

    Cool PLEASE HELP ME WITH THIS Compare both of the following coding VISUAL BASIC


    Which procedural program is suitable for a graphical application and why? If you have any answers please answer. Ill be forever gratefull.

    Public Class Form1
    Private Sub btnStart_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnStart.Click
    Dim upper, lower, step_size As Integer
    Dim counter As Integer
    lstOutput.Items.Clear()
    lower = txtLower.Text
    upper = txtUpper.Text
    step_size = txtStep.Text
    For counter = lower To upper Step step_size
    lstOutput.Items.Add(counter)
    Next
    End Sub
    End Class


    Module Module1
    Sub Main()
    Console.Title = "General Counting Program"
    Dim upper, lower, step_size As Integer
    Dim counter As Integer
    Console.WriteLine("Enter lower limit:")
    lower = Console.ReadLine
    Console.WriteLine("Enter upper limit:")[SIZE=2]
    upper = Console.ReadLine
    Console.WriteLine("Enter step limit:")
    step_size = Console.ReadLine
    Console.WriteLine()
    Console.WriteLine("Count Result")
    For counter = lower To upper Step step_size
    Console.WriteLine(counter)
    Next
    Console.ReadLine()
    End Sub
    End Module
  2. #2
  3. No Profile Picture
    Grumpier old Moderator
    Devshed Supreme Being (6500+ posts)

    Join Date
    Jun 2003
    Posts
    14,453
    Rep Power
    4539
    Not an answer, but a request. Please use the forum CODE tags around posted code.
    ======
    Doug G
    ======
    Bartender to Rene Descartes "have another beer?" Descartes: "I think not" and he vanished.
    --Alfred Bester
  4. #3
  5. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Dec 2013
    Posts
    4
    Rep Power
    0
    Originally Posted by Doug G
    Not an answer, but a request. Please use the forum CODE tags around posted code.
    Wat d u mean
  6. #4
  7. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Aug 2011
    Posts
    289
    Rep Power
    45
    Originally Posted by JAMES32167
    Wat d u mean
    What he means is that you should use the code tags "(code)&(/code)" around posted code. Regular brackets should be replaced by square brackets. Frankly, that won't help me at all because I don't understand your question. What are you trying to do?

    J.A. Coutts
  8. #5
  9. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Dec 2013
    Posts
    4
    Rep Power
    0
    Originally Posted by couttsj
    What he means is that you should use the code tags "(code)&(/code)" around posted code. Regular brackets should be replaced by square brackets. Frankly, that won't help me at all because I don't understand your question. What are you trying to do?

    J.A. Coutts
    Could u compare them 2 and tell me which one is suitable for a graphicalapplication and y it is
  10. #6
  11. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Aug 2011
    Posts
    289
    Rep Power
    45
    Originally Posted by JAMES32167
    Could u compare them 2 and tell me which one is suitable for a graphicalapplication and y it is
    I could not get either routine to run in VB6, but then again I have no idea what you are trying to do. You say it is for a graphical application, but there is nothing graphical about the code.

    J.A. Coutts
  12. #7
  13. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Dec 2013
    Posts
    4
    Rep Power
    0
    Originally Posted by couttsj
    I could not get either routine to run in VB6, but then again I have no idea what you are trying to do. You say it is for a graphical application, but there is nothing graphical about the code.

    J.A. Coutts
    TRY RUNNIG IT ON VB 2010. I am trying to see which coding is more suitable for an graphical application and why it. Is

IMN logo majestic logo threadwatch logo seochat tools logo