How could I make VB do "return false" as in javascript
something like this
<body onContextmenu="return false">
but in vb
Printable View
How could I make VB do "return false" as in javascript
something like this
<body onContextmenu="return false">
but in vb
also how could I do this to Command1?
<input type="button" value="Command1" onFocus="if(this.blur)this.blur()">
how could I do something like that?
VB works kinda differently....
Code:Private Sub Command1_LostFocus()
If Not doSomething Then
'is the same as :
'If (doSomething = False) Then
MsgBox "doSomething returned false"
End If
End Sub
Private Function doSomething() As Boolean
'to return a value, you set the function/sub's name to the value
'same as return false
doSomething = False
End Function
1) The equivalent is a boolean value (take a look at this in the MSDN help file).
Basically, if you want to return false when a button's clicked, you could use something like the attachment.
2) You draw a button onto the form, then set the name and caption properties of this in the properties window in VB.
To get code to execute when the button's clicked, just double click on the button & you'll be taken to the code window.
Whatever you type between the "Private Sub Command1_Click()" and "End Sub"
will be run when the buttons clicked ! :)