By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
432,109 Members | 969 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 432,109 IT Pros & Developers. It's quick & easy.

Visual Basic Starter

P: 2
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.
Sep 25 '07 #1
Share this Question
Share on Google+
4 Replies


P: 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
Sep 25 '07 #2

P: 2
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.imageshack.us/img221/1919/testqt2.jpg][/IMG]

'image link


http://img221.imageshack.us/my.php?image=testqt2.jpg
Sep 25 '07 #3

P: 23
lets pretend that the checkbox for the Desert Eagle is checkbox1.

at the top of all your code:
Expand|Select|Wrap|Line Numbers
  1. Dim addtext As String
  2.  
double click the deagle checkbox

now:
Expand|Select|Wrap|Line Numbers
  1. Private Sub Checkbox1_Click()
  2. If Checkbox1.Value = 0 Then
  3. Text1.Text = Text1.Text & "Deagle;"
  4. Else
  5. addtext = Text1.Text
  6. Text1.Text = Replace(addtext,"Deagle;","")
  7. End If
  8. End Sub
  9.  
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.
Sep 25 '07 #4

Ali Rizwan
100+
P: 927
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
File Type: zip CHK.zip (1.6 KB, 58 views)
Sep 26 '07 #5

Post your reply

Sign in to post your reply or Sign up for a free account.