|
-
Nov 10th, 2002, 01:14 PM
#1
Thread Starter
New Member
Setting value og txtboxes
Hi,
How do I set a value for a textbox? In VB6 you could for example say that me.txtMybox = txtMybox + 1 because it automatically assumed that I'm looking for it's value. I could write "1" in the textbox and it would retrieve that value.
In VB.NET you have to specify the value, or set it, I don't know.
The problem is the above code obviously doesn't work, any suggestions is much appreciated!
In advance, thanx for your help.
: Todd
-
Nov 10th, 2002, 01:23 PM
#2
Frenzied Member
Dont gain the world and lose your soul
-
Nov 10th, 2002, 01:23 PM
#3
Hyperactive Member
Try:
VB Code:
TextBox.Text = TextBox.Text + 1
-
Nov 10th, 2002, 01:29 PM
#4
PowerPoster
Or
Me.Text1.Text = int.Parse(Me.Text1.Text) + 1
-
Nov 10th, 2002, 02:39 PM
#5
Thread Starter
New Member
Error messege
hellswraith :"Overload resolution feiled because no accesible "Int" accepts this number of arguments"
Suggestions? Any fewer arguments? 
:Todd
-
Nov 10th, 2002, 03:26 PM
#6
Hyperactive Member
Originally posted by DevGrp
Use textbox.text = 1
Originally posted by Hampster
Try:
VB Code:
TextBox.Text = TextBox.Text + 1
Did those not work?
-
Nov 10th, 2002, 03:59 PM
#7
Thread Starter
New Member
Thanx
Well... umm... I didn't work the last time I tried it 
Thanx a lot Hamster!!
"Housten, we have lift off"
: Todd
-
Nov 10th, 2002, 05:59 PM
#8
yay gay
-
Nov 11th, 2002, 08:50 AM
#9
Thread Starter
New Member
oki?
Why? += as far as I have read sets the end value as the first value. I get the point but why do this, what are the advantages over just using + ...?
Thanx.
: Todd
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|