[VB.NET] Windows 8 Sensors
If you have completed an application and wish to share the complete source/project files with everyone then please post it in here. Source-code files only, no tutorials.
8 posts
Page 1 of 1
A while back I had to make an end of year project for my IT class and I chose to make a (somewhat believable) clone of the popular mobile game Temple Run. Since we could use Windows tablets instead of the desktop if we wanted, I decided to challenge myself further and use the available sensors on the tablet to control part of the game.
Trouble is, though, that we were using Xojo (formerly known as REALbasic) to develop our applications. It's great and all, but it does not by default support the Windows 8 sensors. VB.NET, on the other hand, does, and Xojo allows you to import DLLs written in another language and use their functions.
So I developped a DLL with a few functions that interface with the different sensors available on a Windows tablet (accelerometer, compas, gyrometer, inclinometer and light sensor). Each function returns a String, but you could easily modify them to return any type of data you wish... I chose String because it worked best with Xojo.
Anyway, I thought I might post the source here, in case you too need these functions outside of a .NET language. Enjoy ;)
Trouble is, though, that we were using Xojo (formerly known as REALbasic) to develop our applications. It's great and all, but it does not by default support the Windows 8 sensors. VB.NET, on the other hand, does, and Xojo allows you to import DLLs written in another language and use their functions.
So I developped a DLL with a few functions that interface with the different sensors available on a Windows tablet (accelerometer, compas, gyrometer, inclinometer and light sensor). Each function returns a String, but you could easily modify them to return any type of data you wish... I chose String because it worked best with Xojo.
Anyway, I thought I might post the source here, in case you too need these functions outside of a .NET language. Enjoy ;)
You do not have the required permissions to view the files attached to this post.
I don't have a use for this since I don't use a tablet that this is really cool. Did it take you long?
#Birthday
#Birthday
My name is Tom | Visit my blog where I post new content every day! Tom's Daily Blog | MineCraft is awesome!
wow cool
thanks for sharing never knew this was even possible in vb ;)
can this even used without having win8?
#Birthday
thanks for sharing never knew this was even possible in vb ;)
can this even used without having win8?
#Birthday
visit us on:
http://www.softpedia.com/get/System/Lau ... -Run.shtml
Check it out ! http://www.softpedia.com/publisher/I-A- ... 90017.html
Check it out ! http://www.softpedia.com/get/Desktop-En ... lock.shtml
http://www.softpedia.com/get/System/Lau ... -Run.shtml
Check it out ! http://www.softpedia.com/publisher/I-A- ... 90017.html
Check it out ! http://www.softpedia.com/get/Desktop-En ... lock.shtml
#smashapps,
The research was the longest part lol. I probably spent close to three weeks looking for ways to use external code in Xojo. Once I found out how, it was very easy to write the DLL, since Microsoft has very good documentation on the subject
#Dummy1912,
Unfortunately, this DLL can only be used on Windows 8 because it references system DLLs that are only present in Windows 8.
If you try to use the DLL on something other than Windows 8, it might throw an exception, so you'd better make your program check the Windows version before calling functions.
Thanks guys
#Birthday
The research was the longest part lol. I probably spent close to three weeks looking for ways to use external code in Xojo. Once I found out how, it was very easy to write the DLL, since Microsoft has very good documentation on the subject

#Dummy1912,
Unfortunately, this DLL can only be used on Windows 8 because it references system DLLs that are only present in Windows 8.
If you try to use the DLL on something other than Windows 8, it might throw an exception, so you'd better make your program check the Windows version before calling functions.
Thanks guys

#Birthday
Well that would depend what you're using it in... The DLL is made to be used outside of .NET langugaes, obviously, because .NET already supports the functions available in the DLL.
So say, for example, that you're using Xojo, all you would have to do is import the DLL and reference one of the functions it contains, then you'll be able to call it anywhere in your program.
If you mean how to use the functions, that's all detailled in the source code.
So say, for example, that you're using Xojo, all you would have to do is import the DLL and reference one of the functions it contains, then you'll be able to call it anywhere in your program.
If you mean how to use the functions, that's all detailled in the source code.
8 posts
Page 1 of 1
Copyright Information
Copyright © Codenstuff.com 2020 - 2023