|
-
Nov 12th, 2007, 02:46 AM
#1
Thread Starter
Addicted Member
Problem
vb.net Code:
Private Sub TextBox5_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles TextBox5.KeyPress
If e.KeyChar = Microsoft.VisualBasic.Chr(27) Then
ComboBox1.Focus()
Exit Sub
End If
If e.KeyChar = Microsoft.VisualBasic.Chr(13) Then
If IsNumeric(TextBox5) Then
End If
TextBox6.Focus()
End If
'End If
Exit Sub
end sub
This program shows me error ,all i need is to textbox5 when i write some number into ,and press enter goes to textbox6 and shows me like money(1523 money i spend)- textbox5(i write number like 2000 ,money i gave)=textbox6(cash 473):sorry on my bad english
Last edited by Hack; Nov 12th, 2007 at 08:15 AM.
Reason: Added Highlight Tags
-
Nov 12th, 2007, 03:14 AM
#2
Frenzied Member
Re: Problem
Hi there!
Exactly what error do you recieve when you try to run this code?
/Henrik
-
Nov 12th, 2007, 03:24 AM
#3
Re: Problem
You code is syntactically incorrect. I suggest that before we help you - you do some reading.
-
Nov 12th, 2007, 05:00 AM
#4
Thread Starter
Addicted Member
Re: Problem
ok i resolved that becuase i already count textbox5 now problem is shows me error .Is this correct wroten?
Label10 = Format(count - CDbl(Me.Label12.Text), "##,###,##0.#0")
If tecaj2 <> 0 Then Label11 = Format(CDbl(Label10.Text / tec2), "##,###,##0.#0")
Value of type 'String' cannot be converted to 'System.Windows.Forms.Label'.
-
Nov 12th, 2007, 06:50 AM
#5
Frenzied Member
Re: Problem
Hi!
You have to use the property text when assigning a textvalue to a label.
Like Label11.Text = 'Hello'
not
Label11 = 'hello'
Im pretty sure the label behaves like that... but this can differ depeniding on the class.
/Henrik
-
Nov 12th, 2007, 08:17 AM
#6
Re: Problem
In fact, you should avoid using a control's default property, if for no other reason, than it makes understanding what you are trying to do easier.
It will also assist in avoiding seemingly unfathomably problems.
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
|