Dear visitor, welcome to Jabaco - Community. If this is your first visit here, please read the Help. It explains in detail how this page works. To use all features of this page, you should consider registering. Please use the registration form, to register here or read more information about the registration process. If you are already registered, please login here.
Source code |
|
1 |
hHook = SetWindowsHookEx(WH_MOUSE_LL, AddressOf MouseProc, App.hInstance, 0) |
Trainee
Date of registration: Mar 13th 2009
Location: Oberirsen - Germany
Occupation: Senior Software Engineer
Hobbies: Programming aund Photography
Trainee
Date of registration: Mar 13th 2009
Location: Oberirsen - Germany
Occupation: Senior Software Engineer
Hobbies: Programming aund Photography
Jabaco Source |
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 |
'-Begin----------------------------------------------------------------- '-External functions-------------------------------------------------- Private WinAPI Function GetWindowLong Lib "user32.dll" _ Alias "GetWindowLongA" (ByVal hwnd As Long, _ ByVal nIndex As Long) As Long Private WinAPI Function GetCurrentThreadId Lib "kernel32.dll" _ () As Long Private WinAPI Function GetCurrentProcessId Lib "kernel32.dll" _ () As Long Private WinAPI Function FindWindow Lib "user32.dll" _ Alias "FindWindowA" (ByVal lpClassName As String, _ ByVal lpWindowName As String) As Long '-Constants----------------------------------------------------------- Private Const GWL_HINSTANCE As Long = -6 '-Function hInstance-------------------------------------------------- Public Function hInstance() As Long Dim hWnd As Long If LCase(Left(java#lang#System.getProperty("os.name"), 3)) = "win" Then hWnd = FindWindow("SunAWTFrame", Form1.Caption) If hWnd Then hInstance = GetWindowLong(hWnd, GWL_HINSTANCE) Else hInstance = vbNull End If Else hInstance = vbNull End If End Function '-Function ProcessID-------------------------------------------------- Public Function ProcessID() As Long If LCase(Left(java#lang#System.getProperty("os.name"), 3)) = "win" Then ProcessID = GetCurrentProcessId() Else ProcessID = vbNull End If End Function '-Function ThreadID--------------------------------------------------- Public Function ThreadID() As Long If LCase(Left(java#lang#System.getProperty("os.name"), 3)) = "win" Then ThreadID = GetCurrentThreadId() Else ThreadID = vbNull End If End Function '-End------------------------------------------------------------------- |
This post has been edited 1 times, last edit by "jayess" (Feb 18th 2010, 12:14am)
excellent!Quoted
* Where is the frontier to convert VB projects to Jabaco/Java?
* Under which circumstances is a conversion still be worth?
* How many and which Windows specific commands can be use until a conversion is to extensive and complex?
* What is an equivalent from a WinAPI command to a Java command?
It would be great to have AddressOf and it could be possible if the compiler would support it.Quoted
The compiler stops at AddressOf MouseProc, saying it expects a closing bracket )
What am I doing wrong? Is AddressOf not supported?