quick help with vb to java transalation

Discussion in 'Java' started by Fred, Aug 30, 2004.

  1. Fred

    Fred Guest

    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
    Fred, Aug 30, 2004
    #1
    1. Advertising

  2. Fred

    Paul Lutus Guest

    Fred wrote:

    > 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.

    --
    Paul Lutus
    http://www.arachnoid.com
    Paul Lutus, Aug 31, 2004
    #2
    1. Advertising

  3. (Fred) writes:

    > 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.
    Tor Iver Wilhelmsen, Aug 31, 2004
    #3
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Starwynd
    Replies:
    1
    Views:
    385
    Tor Iver Wilhelmsen
    Nov 23, 2003
  2. Younger Dryas
    Replies:
    4
    Views:
    415
    Younger Dryas
    Feb 13, 2004
  3. Nishi Bhonsle

    java.util.Properties--quick question

    Nishi Bhonsle, Apr 26, 2004, in forum: Java
    Replies:
    5
    Views:
    457
    Roedy Green
    May 1, 2004
  4. JKop
    Replies:
    11
    Views:
    857
  5. toast3rpow3r

    Quick Java Help

    toast3rpow3r, Dec 14, 2009, in forum: Java
    Replies:
    0
    Views:
    329
    toast3rpow3r
    Dec 14, 2009
Loading...

Share This Page