Private Sub cmdExecute_Click()
Private Declare Function SwapMouseButton Lib "user32" SwapMouseButton 1
SwapMouseButton 0
End Sub
Whats wrong with this code?
It "f5"s fine, but after i click on execute it says compile error: syntax error. Whats up?
Printable View
Private Sub cmdExecute_Click()
Private Declare Function SwapMouseButton Lib "user32" SwapMouseButton 1
SwapMouseButton 0
End Sub
Whats wrong with this code?
It "f5"s fine, but after i click on execute it says compile error: syntax error. Whats up?
?
it's just an I D ten T error.
:p
VB Code:
private Declare Function SwapMouseButton Lib "user32" Alias "SwapMouseButton" (ByVal bSwap As Long) As Long Private Sub cmdExecute_Click() SwapMouseButton 1 SwapMouseButton 0 End Sub
Thanks, can you expalin an I D T error fucntion wha? Also thanks. Also whats the diffrence between private sub and public, private sub and private decleration. Thanks!
damit now,
Private Declare Function SwapMouseButton Lib "user32" (ByVal bSwap As Long) As Long
SwapMouseButton 1 <----- high lights that says its an outside procedure.
SwapMouseButton 0
End Sub
its a joke. you dotn get it.
jeez you've seem to have mistaken over what an api is.
it is a function on one line that calls back to the library you told it to.
you place
private Declare Function SwapMouseButton Lib "user32" Alias "SwapMouseButton" (ByVal bSwap As Long) As Long
at the very top before all your code and after your Option Explicit
my code already does waht you want. you dont do funny stuff to it:
private Declare Function SwapMouseButton Lib "user32" Alias "SwapMouseButton" (ByVal bSwap As Long) As Long
Private Sub cmdExecute_Click()
SwapMouseButton 1
SwapMouseButton 0
End Sub
kthx, also i knew it was a joke, i just didnt get it, it was hella hard to read. Its like me saying eh, i dunno ill think of it later, THANKSD THOUGH!Quote:
Originally posted by BuggyProgrammer
its a joke. you dotn get it.
jeez you've seem to have mistaken over what an api is.
it is a function on one line that calls back to the library you told it to.
you place
private Declare Function SwapMouseButton Lib "user32" Alias "SwapMouseButton" (ByVal bSwap As Long) As Long
at the very top before all your code and after your Option Explicit
Alright, that doesnt work, i tried it, is it because im on WINXP?
Nick is brand new. He's only been programming a couple days so he's not going to understand jokes like that. :)
I wanna understand. Will someone explain it!
it doesnt work because you are swapping it, then swapping it back again.
so to swap it back and forth:
private Declare Function SwapMouseButton Lib "user32" Alias "SwapMouseButton" (ByVal bSwap As Long) As Long
Private Sub cmdSwap_Click()
SwapMouseButton 1 'swaps it
End Sub
Private Sub cmdNoSwap_Click()
SwapMouseButton 0 'unswap it
End Sub
download my little form
got it thanks!
and an 'ID10T' error is, well now it's too obvious isnt it :D .
if you really cant figure it out then you've got an ID10T error there.
hehe, ok i get it. Bugg proggrammer, your an I D ten T error
hehe, ok i get it. Bugg proggrammer, your an I D ten T error :p
that doesnt make sense.
you cant BE an error. come on......
Of course you can be an error.
"I didnt MEAN to get pregnant..."