Visual Basic Starter

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • dewitte
    New Member
    • Sep 2007
    • 2

    #1

    Visual Basic Starter

    Hi, could someone help me? I'm just new to the Visual Basic thing, and I'm having a little problem if someone could help me?

    How do I make that when I click on the check box and then on a button it will enter the name in a text box like example

    I click on checkbox1 (name:Stone)
    and I click on the checkbox2 (name:sand)

    Then I click on the button Start

    and in the text box there will appear : "stone;sand "

    Please help me.
  • aiftkhar
    New Member
    • Sep 2007
    • 2

    #2
    hey dewitte. try declaring three variables (String) say for example var1, var2 & var3. get the values from the lables next to the checkboxes clicked and store them into var1 & var2 for example , if chk1.value = true then var1 = label1.caption, and follow the same procedure for the second checkbox. then just add them into the third variable by formatting the way you want it and display it in the text box.
    hope this will help you.
    cheers

    Comment

    • dewitte
      New Member
      • Sep 2007
      • 2

      #3
      Well actually i dont understand what you are saying but this is what i want . When Smg and deagle are chosen and i click on the bind button then in the txtbox appears deagle;smg

      [IMG][img=http://img221.imagesha ck.us/img221/1919/testqt2.jpg][/IMG]

      'image link


      Host your images online with an easy to use image uploader, albums, photo hosting, sharing, dynamic image resizing on web and mobile.

      Comment

      • cryoburned
        New Member
        • Sep 2007
        • 23

        #4
        lets pretend that the checkbox for the Desert Eagle is checkbox1.

        at the top of all your code:
        Code:
        Dim addtext As String
        double click the deagle checkbox

        now:
        Code:
        Private Sub Checkbox1_Click()
        If Checkbox1.Value = 0 Then
        Text1.Text = Text1.Text & "Deagle;"
        Else
        addtext = Text1.Text
        Text1.Text = Replace(addtext,"Deagle;","")
        End If
        End Sub
        also i just noticed you're using .Net

        This should be in the .net section, and none of the code i just wrote will work for you, but its a start.

        Comment

        • Ali Rizwan
          Banned
          Contributor
          • Aug 2007
          • 931

          #5
          Originally posted by dewitte
          Hi , Could some one help me im just new to the Visual basic thing . and im having a little problem if some one could help me ?

          how do i make that when i click on the check box and then on a button it will enter the name in a text box like example

          i click on checkbox1 (name:Stone)
          and i click on the checkbox2 (name:sand)

          then i click on the button Start

          and in the text box there will appear : "stond;sand "

          pls help me
          Ok try this attachment
          If it helps you then tell me elsei ll send u something new
          goodluck
          Attached Files

          Comment

          Working...