Using Touchlib Wrapper in VB .NET
Posted: 22 April 2008 02:54 PM   [ Ignore ]
Jr. Member
Avatar
RankRank
Total Posts:  121
Joined  2008-01-28

anyone figured out the way to use Touchlib wrapper in VB .NET ....
i tried with it ....
but it says, Instance not created
and New keyword doesnt works .....

 Signature 

..’m not the best..but ‘m not like the rest....

Profile
 
 
Posted: 22 April 2008 02:58 PM   [ Ignore ]   [ # 1 ]
Sr. Member
RankRankRank
Total Posts:  318
Joined  2007-03-13

i’m guessing it would be something like (my vb is super rusted and I don’t have the compiler installed):

Dim cs as CsTI.Instance()

 Signature 

my multitouch blog: http://www.whitespaced.co.za/
those that say it can’t be done shouldn’t interrupt those doing it

Profile
 
 
Posted: 22 April 2008 03:19 PM   [ Ignore ]   [ # 2 ]
Jr. Member
Avatar
RankRank
Total Posts:  121
Joined  2008-01-28
donovan - 22 April 2008 02:58 PM

Dim cs as CsTI.Instance()

nah ! ... doesnt work

*EDIT*

aha !
here i go ....

Dim cs As TouchlibWrapper.CsTI
cs 
cs.Instance

now how to add a handler ??
rasberry

 Signature 

..’m not the best..but ‘m not like the rest....

Profile
 
 
Posted: 22 April 2008 03:48 PM   [ Ignore ]   [ # 3 ]
Jr. Member
Avatar
RankRank
Total Posts:  121
Joined  2008-01-28

ok .. here goes a working sample VB .NET code for touchlib wrapper ofcourse ....

Imports TouchlibWrapper

Public Class Form1
    Dim cs 
As TouchlibWrapper.CsTI


    
Private Sub Form1_Load(ByVal sender As System.ObjectByVal e As System.EventArgsHandles MyBase.Load
        cs 
cs.Instance
        AddHandler cs
.fingerDownAddressOf cs_fingerdown
        cs
.startScreen()
        
    
End Sub

    
Private Sub cs_fingerdown(ByVal ID As IntegerByVal tagID As IntegerByVal X As SingleByVal Y As Single_
        ByVal angle 
As SingleByVal area As SingleByVal height As SingleByVal width As SingleByVal dX As SingleByVal dY As Single)
        
Console.WriteLine("FINGER DOWN : " ID " at (" "," ")")
    
End Sub

End 
Class

Short and sweet ... smile

 Signature 

..’m not the best..but ‘m not like the rest....

Profile
 
 
Posted: 23 April 2008 08:56 AM   [ Ignore ]   [ # 4 ]
Sr. Member
RankRankRank
Total Posts:  318
Joined  2007-03-13

excellent stuff Mj! If you like, when I update the wrapper’s google code, I’ll include this VB sample. If so, could you send me the vb project?

 Signature 

my multitouch blog: http://www.whitespaced.co.za/
those that say it can’t be done shouldn’t interrupt those doing it

Profile
 
 
Posted: 23 April 2008 10:15 AM   [ Ignore ]   [ # 5 ]
Jr. Member
Avatar
RankRank
Total Posts:  121
Joined  2008-01-28

My pleasure ! .....
sure ill send u the VB project ....
let me work on it a bit more, like adding a interface to include filters .... and stuff .....

 Signature 

..’m not the best..but ‘m not like the rest....

Profile
 
 
Posted: 23 April 2008 10:23 AM   [ Ignore ]   [ # 6 ]
Sr. Member
RankRankRank
Total Posts:  318
Joined  2007-03-13

thanks a lot! I’ll include it in the official distribution of CsTI. Maybe change the name to .net touchlib interface or something. because it’s not c# only. (and I’ll give you credit smile )

 Signature 

my multitouch blog: http://www.whitespaced.co.za/
those that say it can’t be done shouldn’t interrupt those doing it

Profile
 
 
Posted: 23 April 2008 10:43 AM   [ Ignore ]   [ # 7 ]
Jr. Member
Avatar
RankRank
Total Posts:  121
Joined  2008-01-28

i don’t really need ne credit ... u came up with the wrapper was like a boon to me .....
smile

 Signature 

..’m not the best..but ‘m not like the rest....

Profile