Click here to Skip to main content
15,922,166 members
Home / Discussions / Visual Basic
   

Visual Basic

 
AnswerRe: string Pin
shally_7931-May-07 2:47
shally_7931-May-07 2:47 
GeneralRe: string Pin
WhiteGirl2331-May-07 3:38
WhiteGirl2331-May-07 3:38 
GeneralRe: string Pin
Guffa31-May-07 5:25
Guffa31-May-07 5:25 
QuestionTransfer Cursor via Enter Key Input Pin
Duane in Japan31-May-07 2:19
Duane in Japan31-May-07 2:19 
AnswerRe: Transfer Cursor via Enter Key Input Pin
Marcus J. Smith31-May-07 2:47
professionalMarcus J. Smith31-May-07 2:47 
GeneralRe: Transfer Cursor via Enter Key Input Pin
Duane in Japan31-May-07 13:15
Duane in Japan31-May-07 13:15 
GeneralRe: Transfer Cursor via Enter Key Input Pin
Marcus J. Smith1-Jun-07 1:31
professionalMarcus J. Smith1-Jun-07 1:31 
GeneralRe: Transfer Cursor via Enter Key Input Pin
Duane in Japan3-Jun-07 4:12
Duane in Japan3-Jun-07 4:12 
This is just one of ten exact calculation events, with the code that you gave, with limited infor from me, it worked but some code later in the calculator was not working properly.

The Enter key did something to the CheckBox and its name (CheckBox + Label) but it did not physically check the box, since my entire project is about Validating and the Checkbox was not actually Checked then code later did not run as intended.

Played with your code unnecessarily and played with some of my own guessing until I just had to add in CheckBox2.Checked = True. within your code so more of my code could run later.

Thanks again to all for this help, sorry for taking so long to get back, this forum moves fast.

I put the correct line of code in the Form.Load event up top too.

Private Sub TextBox5_Validating(ByVal sender As System.Object, ByVal e As System.ComponentModel.CancelEventArgs) Handles TextBox5.Validating
Dim Box2 As Double = 0
Dim Box5 As Double = 0
TextBox5.SelectAll()
If TextBox5.Text.Length = 0 Then
'http://msdn2.microsoft.com/en-us/library/139z2azd.aspx, MsgBox
MsgBox("A 'B1' value is required.", MsgBoxStyle.Exclamation)
e.Cancel = True
ElseIf Not IsNumeric(TextBox5.Text) Then
MsgBox("This 'B1' value is not numeric.", MsgBoxStyle.Exclamation)
e.Cancel = True
'http://msdn2.microsoft.com/en-us/library/system.windows.forms.checkbox.checked(VS.80).aspx, CheckBox
ElseIf CheckBox2.Checked Then
e.Cancel = False
Else
'http://msdn2.microsoft.com/en-us/library/ewf8xx62(VS.80).aspx, Convertion
Box2 = CDbl(TextBox2.Text)
Box5 = CDbl(TextBox5.Text)
TextBox3.Text = CStr(Box5 + 1)
TextBox4.Text = CStr(Box2 - Box5)
End If
If Box5 <= 0 Then
MsgBox("Your 'B1' value must be greater than zero.", MsgBoxStyle.Exclamation)
ElseIf e.Cancel = True Then
End If
TextBox35.Clear()
TextBox36.Clear()
TextBox37.Clear()
TextBox38.Clear()
TextBox39.Clear()
End Sub



Private Sub TextBox5_Validating(ByVal sender As Object, ByVal e As KeyPressEventArgs)
If e.KeyChar = Chr(13) Then
SelectNextControl(Me.ActiveControl, True, False, True, True)
CheckBox2.Checked = True
e.Handled = True
End If
End Sub



Private Sub CheckBox2_Validating(ByVal sender As System.Object, ByVal e As System.ComponentModel.CancelEventArgs) Handles CheckBox2.Validating
TextBox35.Text = TextBox5.Text
TextBox36.Text = 0
TextBox37.Focus()
End Sub
QuestionDataGridView columns reorder themselves when I open the designer Pin
Marcus J. Smith31-May-07 1:41
professionalMarcus J. Smith31-May-07 1:41 
AnswerRe: DataGridView columns reorder themselves when I open the designer Pin
shally_7931-May-07 2:59
shally_7931-May-07 2:59 
QuestionGroup by/sum average Pin
cstrader23231-May-07 1:32
cstrader23231-May-07 1:32 
AnswerRe: Group by/sum average Pin
Guffa31-May-07 1:44
Guffa31-May-07 1:44 
GeneralRe: Group by/sum average Pin
cstrader23231-May-07 3:05
cstrader23231-May-07 3:05 
GeneralRe: Group by/sum average Pin
Guffa31-May-07 5:48
Guffa31-May-07 5:48 
GeneralRe: Group by/sum average Pin
cstrader23231-May-07 11:38
cstrader23231-May-07 11:38 
AnswerRe: Group by/sum average Pin
Guffa31-May-07 22:07
Guffa31-May-07 22:07 
Questionpls help... another question.... Pin
moomoooomoo31-May-07 1:28
moomoooomoo31-May-07 1:28 
AnswerRe: pls help... another question.... Pin
Rupesh Kumar Swami31-May-07 1:34
Rupesh Kumar Swami31-May-07 1:34 
GeneralRe: pls help... another question.... Pin
moomoooomoo31-May-07 1:43
moomoooomoo31-May-07 1:43 
GeneralRe: pls help... another question.... Pin
Rupesh Kumar Swami31-May-07 2:56
Rupesh Kumar Swami31-May-07 2:56 
GeneralRe: pls help... another question.... Pin
Guffa31-May-07 2:03
Guffa31-May-07 2:03 
GeneralRe: pls help... another question.... Pin
moomoooomoo31-May-07 2:13
moomoooomoo31-May-07 2:13 
GeneralRe: pls help... another question.... Pin
Marcus J. Smith31-May-07 2:48
professionalMarcus J. Smith31-May-07 2:48 
QuestionReduce the size of png file in vb.net Pin
~V~31-May-07 1:01
~V~31-May-07 1:01 
AnswerRe: Reduce the size of png file in vb.net Pin
Guffa31-May-07 1:52
Guffa31-May-07 1:52 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.