quick help with vb to java transalation

F

Fred

What are the java translations for the following VB declarations:

Public Declare Function FindWindow Lib "user32"
Alias "FindWindowA" (ByVal lpClassName As String,
ByVal lpWindowName As String) As Long

Public Declare Function FindWindowEx Lib "user32"
Alias "FindWindowExA" (ByVal hWnd1 As Long,
ByVal hWnd2 As Long,
ByVal lpsz1 As String,
ByVal lpsz2 As String) As Long

Public Declare Function SendMessageByString Lib "user32"
Alias "SendMessageA" (ByVal hWnd As Long,
ByVal wMsg As Long,
ByVal wParam As Long,
ByVal lParam As String) As Long
 
P

Paul Lutus

Fred said:
What are the java translations for the following VB declarations:

Pick up a Java textbook and start over. The examples you posted are
Windows-specific, and Java is a platform-neutral language. IOW you *cannot*
translate these into Java.
 
T

Tor Iver Wilhelmsen

What are the java translations for the following VB declarations:

Public Declare Function FindWindow Lib "user32"
Alias "FindWindowA" (ByVal lpClassName As String,
ByVal lpWindowName As String) As Long

public static native long findWindow(String lpClassName, String
lpWindowName);
Public Declare Function FindWindowEx Lib "user32"
Alias "FindWindowExA" (ByVal hWnd1 As Long,
ByVal hWnd2 As Long,
ByVal lpsz1 As String,
ByVal lpsz2 As String) As Long

public static native long findWindowEx(long hWnd1, long hWnd2, String
lpsz1, String lpsz2);
Public Declare Function SendMessageByString Lib "user32"
Alias "SendMessageA" (ByVal hWnd As Long,
ByVal wMsg As Long,
ByVal wParam As Long,
ByVal lParam As String) As Long

public static native long sendMessageByString(long hWnd, long wMsg,
long wParams, String lParam);

Running javah on the class and writing the C calls to user32.dll is
left as an exercise to the reader.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,764
Messages
2,569,565
Members
45,041
Latest member
RomeoFarnh

Latest Threads

Top