Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / General / September 2007

Tip: Looking for answers? Try searching our database.

Mouse Settings

Thread view: 
James - 26 Sep 2007 04:05 GMT
Hey,

I want to write a function that toggles left/right hand mouse
settings. I was wondering how Windows XP does this using control
panel.

Thanks,
James
Andrew Thompson - 26 Sep 2007 04:14 GMT
...
>I want to write a function that toggles left/right hand mouse
>settings.

Java is not well suited to such OS specific tasks.

>...I was wondering how Windows XP does this using control
>panel.

Good luck with that.  If you have any questions, feel free
to pop back by.

Signature

Andrew Thompson
http://www.athompson.info/andrew/

Roedy Green - 26 Sep 2007 05:46 GMT
>I want to write a function that toggles left/right hand mouse
>settings. I was wondering how Windows XP does this using control
>panel.
Chances are it does it by talking to the mouse driver.  I would
suggest sniffing about in C++ mouse control and mouse driver docs.
Solve it in C++ then write some JNI to let you do it from Java.
http://mindprod.com/jgloss/jni.html
Signature

Roedy Green Canadian Mind Products
The Java Glossary
http://mindprod.com

James - 26 Sep 2007 17:24 GMT
On Sep 26, 12:46 am, Roedy Green <see_webs...@mindprod.com.invalid>
wrote:
> >I want to write a function that toggles left/right hand mouse
> >settings. I was wondering how Windows XP does this using control
[quoted text clipped - 6 lines]
> Roedy Green Canadian Mind Products
> The Java Glossaryhttp://mindprod.com

k thx for the advice, ill go looking. do you think there will be a way
to write a universal function for all drivers or just settle for
personal use?

Thanks,
James
Roedy Green - 26 Sep 2007 22:54 GMT
>k thx for the advice, ill go looking. do you think there will be a way
>to write a universal function for all drivers or just settle for
>personal use?

If Microsoft has even a shred of sanity, they would have defined the
basic mouse interface that all mouse companies must implement.  The
vendor might extend it.  Switching left and right can be done so
easily in software, surely it should be part of the standard API.

The problem is every OS would have its own mouse driver interface, so
you have to resolve the problem separately for Linux, Solaris, etc.

Java Web Start has a neat feature to use the correct jar full of
native code for the given platform.  Your program does not need to do
anything to select the correct code.
http://mindprod.com/jgloss/javawebstart.html
Signature

Roedy Green Canadian Mind Products
The Java Glossary
http://mindprod.com



Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.