forum.vdsworld.com Forum Index forum.vdsworld.com
Visit VDSWORLD.com
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


Swap mouse buttons

 
Post new topic   Reply to topic    forum.vdsworld.com Forum Index -> Advanced VDS 5 Source Code
View previous topic :: View next topic  
Author Message
CodeScript
Moderator Team


Joined: 08 Jun 2003
Posts: 1060
Location: India

PostPosted: Sat Sep 06, 2003 9:25 am    Post subject: Swap mouse buttons Reply with quote

This is a simple API code to swap your mouse buttons.
Don't use STOP or RESET SCRIPT in IDE else swapped buttons remain. If so restart the script and hit reset.

Code:
  #DEFINE COMMAND,SWAPMouse
  DIALOG CREATE,SwapMouseButtons By CodeScript,-1,0,323,199,ONTOP,CLICK
  DIALOG ADD,BUTTON,Swap,18,86,162,52,Swap Mouse Buttons
  DIALOG ADD,BUTTON,Restore,74,84,162,52,Restore
  DIALOG ADD,TEXT,TEXT1,170,38,,,Right and Left mouse buttons will be restored on Exit
  DIALOG ADD,TEXT,TEXT2,140,77,,,Right-Left Click on the Dialog to Test
  DIALOG ADD,TEXT,TEXT3,154,70,,,Don't leave the dialog and get confused!
  DIALOG SHOW
 
:EVLOOP
WAIT EVENT
GOTO @EVENT()

:SwapBUTTON
SWAPMouse SWAP
GOTO EVLOOP

:RestoreMenu
:RestoreBUTTON
SWAPMouse Restore
GOTO EVLOOP

:CLICK
%C = @CLICK(B)
IF @EQUAL(%C,RIGHT)
 DIALOG POPUP,Restore
END
GOTO EVLOOP

:CLOSE
SWAPMouse Restore
EXIT

REM *******************************************************
REM You can Include the code below in a seperate include file
REM or a DSU.
REM ********************************************************
:SWAPMouse
IF @EQUAL(%1,SWAP)
%1 = 1
ELSE
%1 =0
END
LOADLIB USER32
%A = @LIB(USER32,SwapMouseButton,INT:,%1)
FREELIB USER32
EXIT

_________________
Regards
- CodeScript
Arrow Give your application a professional look with the VDSGUI Extension
Back to top
View user's profile Send private message Visit poster's website
FreezingFire
Admin Team


Joined: 23 Jun 2002
Posts: 3508

PostPosted: Sat Sep 06, 2003 11:25 am    Post subject: Reply with quote

Nice one CodeScript! Very Happy
_________________
FreezingFire
VDSWORLD.com
Site Admin Team
Back to top
View user's profile Send private message Visit poster's website
CodeScript
Moderator Team


Joined: 08 Jun 2003
Posts: 1060
Location: India

PostPosted: Sat Sep 06, 2003 2:24 pm    Post subject: Reply with quote

Thank you FF Smile
Aand Thanx to Tommy and Vic for the VDS tag Very Happy
Regards

_________________
Regards
- CodeScript
Arrow Give your application a professional look with the VDSGUI Extension
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    forum.vdsworld.com Forum Index -> Advanced VDS 5 Source Code All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum

Twitter@vdsworld       RSS

Powered by phpBB © 2001, 2005 phpBB Group