Results 1 to 5 of 5

Thread: Api

  1. #1

    Thread Starter
    Member
    Join Date
    Aug 2001
    Posts
    33

    Api

    Hiya,

    I'm a member on the MSN Gamign Zone and i really want to make a new program for people to send text to a lobby or chat room via this program.

    Does anyone know how to do this with API?
    VBTZH

    Manager of dotNET

  2. #2
    Frenzied Member Vlatko's Avatar
    Join Date
    Aug 2000
    Location
    Skopje, Macedonia
    Posts
    1,409
    See the winsock functions in Api_guide or at www.vbapi.com. Just remember that winsock is pretty much complex. Also search planetsourcecode for chat examples.
    I am become death, the destroyer of worlds.
    mail:[email protected]

    • Visual Basic 6.0 & .NET
    • Visual C++ 6.0 & .NET
    • ASP
    • LISP
    • PROLOG
    • C
    • Pascal

  3. #3
    DaoK
    Guest
    What is your zone name and what game do you play?

  4. #4

    Thread Starter
    Member
    Join Date
    Aug 2001
    Posts
    33
    Hiya,

    My zone name is MCA_Leader and I play Backgammon, Ants, AOE and some other games.


    Mike

    "Stay Cool. Or Stay Alive"

  5. #5
    AutoBot
    Guest

    Talking Maybe This Will Help

    This isn't what you asked but I did it before I understood your question but it gives an example of how to send text to internet explorer and click the go button.


    'create a form with a Command1 and Command2 button
    'and a textbox


    Private Sub Command1_Click()

    Dim ieframe As Long, workerw As Long, rebarwindow As Long
    Dim comboboxex As Long, combobox As Long, editx As Long
    ieframe = FindWindow("ieframe", vbNullString)
    workerw = FindWindowEx(ieframe, 0&, "workerw", vbNullString)
    rebarwindow = FindWindowEx(workerw, 0&, "rebarwindow32", vbNullString)
    comboboxex = FindWindowEx(rebarwindow, 0&, "comboboxex32", vbNullString)
    combobox = FindWindowEx(comboboxex, 0&, "combobox", vbNullString)
    editx = FindWindowEx(combobox, 0&, "edit", vbNullString)
    Call SendMessageByString(editx, WM_SETTEXT, 0&, Text1.Text)

    End Sub



    Private Sub Command2_Click()

    Dim ieframe As Long, workerw As Long, rebarwindow As Long
    Dim comboboxex As Long, toolbarwindow As Long
    ieframe = FindWindow("ieframe", vbNullString)
    workerw = FindWindowEx(ieframe, 0&, "workerw", vbNullString)
    rebarwindow = FindWindowEx(workerw, 0&, "rebarwindow32", vbNullString)
    comboboxex = FindWindowEx(rebarwindow, 0&, "comboboxex32", vbNullString)
    toolbarwindow = FindWindowEx(comboboxex, 0&, "toolbarwindow32", vbNullString)
    Call SendMessageLong(toolbarwindow, WM_LBUTTONDOWN, 0&, 0&)
    Call SendMessageLong(toolbarwindow, WM_LBUTTONUP, 0&, 0&)

    End Sub



    'put this code in a module



    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 FindWindow Lib "user32" Alias "FindWindowA" (ByVal lpClassName As String, ByVal lpWindowName 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
    Public Declare Function SendMessageLong& Lib "user32" Alias "SendMessageA" (ByVal hwnd As Long, ByVal wMsg As Long, ByVal wParam As Long, ByVal lParam As Long)

    Public Const WM_LBUTTONDOWN = &H201
    Public Const WM_LBUTTONUP = &H202
    Public Const WM_SETTEXT = &HC

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width