Page 1 of 2
How to add joystick in visual basic 2008
Posted: Tue Jan 19, 2010 11:50 am
by Bucher
hello all, I have browsed the web for tutorial to help me add joystick funktions to an application but no luck :(
The program will controle one or more serial relayboards.. well it can already do that but, only by pressing a button and i want the relays to be controled by the joystick.
something like..
Define Xaxis - 0 to 255
If JoyAxis X is >150 then relay1
If JoyAxis X is <100 then relay2
and so on...
Later on I want the joystick to control direction and speed of a DC motor/Analog output on the relay board
Im useing a Logitech USB game pad
Any help will be much appriciated
Re: How to add joystick in visual basic 2008
Posted: Tue Jan 19, 2010 6:13 pm
by Harlem9191
This?
http://www.vbdotnetheaven.com/UploadFil ... ickVB.aspx
Type into the Google search bar 'vb.net joystick' it is a suggestion you're bound to find something

Re: How to add joystick in visual basic 2008
Posted: Tue Jan 19, 2010 8:21 pm
by Bucher
No thats not it.. its a viritual joystick controled by the mouse.
I have been googleing all day now.. the closest i got to it is a small sample in DirectX SDK 2009 (See attatchment)
This is what i want in my program and then depending on the values it control funktions in my program witch today is controled by bottons.
The source code for the program are also in DirectX SDK 2009 but I can´t open it in Visual Basic 2008 Express !
Re: How to add joystick in visual basic 2008
Posted: Wed Jan 20, 2010 4:51 pm
by Lewis
That doesnt work?
Re: How to add joystick in visual basic 2008
Posted: Wed Jan 20, 2010 10:57 pm
by Bucher
Wired.. works fine here.. also the download.. anyway here is a picture of it
Re: How to add joystick in visual basic 2008
Posted: Thu Jan 21, 2010 8:37 am
by Bucher
Here is the source code for C++
I was wondering if it´s possible to convert it to use for Visual Basic 2008 Express
Thx in advance
Re: How to add joystick in visual basic 2008
Posted: Thu Jan 21, 2010 5:17 pm
by Lewis
I would but i dont want to get c :P Though i should
Re: How to add joystick in visual basic 2008
Posted: Thu Jan 21, 2010 5:40 pm
by Harlem9191
Re: How to add joystick in visual basic 2008
Posted: Thu Jan 21, 2010 5:46 pm
by CodenStuff
Hello,
This one is for VB but im unable to test it because I dont have a joystick :?
Download:
vb joystick.zip
Hope it works cooll;
Re: How to add joystick in visual basic 2008
Posted: Thu Jan 21, 2010 6:04 pm
by Lewis
I dont have a Joystick either