May 28th, 2002, 05:42 PM
#1
Thread Starter
Member
Switching mouse buttons
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?
May 28th, 2002, 06:19 PM
#2
Thread Starter
Member
May 28th, 2002, 06:39 PM
#3
The picture isn't missing
it's just an I D ten T error.
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
Remember, if someone's post was not helpful, you can always rate their post negatively
.
May 28th, 2002, 06:42 PM
#4
Thread Starter
Member
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!
May 28th, 2002, 06:46 PM
#5
Thread Starter
Member
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
May 28th, 2002, 06:48 PM
#6
The picture isn't missing
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
Remember, if someone's post was not helpful, you can always rate their post negatively
.
May 28th, 2002, 06:49 PM
#7
The picture isn't missing
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
Remember, if someone's post was not helpful, you can always rate their post negatively
.
May 28th, 2002, 06:54 PM
#8
Thread Starter
Member
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
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!
May 28th, 2002, 07:01 PM
#9
Thread Starter
Member
Alright, that doesnt work, i tried it, is it because im on WINXP?
May 28th, 2002, 07:26 PM
#10
PowerPoster
Nick is brand new. He's only been programming a couple days so he's not going to understand jokes like that.
May 28th, 2002, 09:41 PM
#11
Thread Starter
Member
I wanna understand. Will someone explain it!
May 28th, 2002, 09:47 PM
#12
The picture isn't missing
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
Attached Files
Remember, if someone's post was not helpful, you can always rate their post negatively
.
May 28th, 2002, 09:56 PM
#13
Thread Starter
Member
May 28th, 2002, 10:32 PM
#14
The picture isn't missing
and an 'ID10T' error is, well now it's too obvious isnt it .
if you really cant figure it out then you've got an ID10T error there.
Remember, if someone's post was not helpful, you can always rate their post negatively
.
May 28th, 2002, 11:18 PM
#15
Thread Starter
Member
hehe, ok i get it. Bugg proggrammer, your an I D ten T error
May 28th, 2002, 11:18 PM
#16
Thread Starter
Member
hehe, ok i get it. Bugg proggrammer, your an I D ten T error
May 28th, 2002, 11:37 PM
#17
The picture isn't missing
that doesnt make sense.
you cant BE an error. come on......
Remember, if someone's post was not helpful, you can always rate their post negatively
.
May 29th, 2002, 02:10 AM
#18
Of course you can be an error.
"I didnt MEAN to get pregnant..."
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