Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie

Lauching & Terminating Applications from VB

Options
  • 21-03-2005 12:23pm
    #1
    Closed Accounts Posts: 5


    Can anyone help me with my code for launching and terminating Netmeeting from VB6. At the moment I can get Netmeeting started but can not gain control over it.

    See attached.

    Dave


Comments

  • Registered Users Posts: 7,468 ✭✭✭Evil Phil


    PROCESS_QUERY_INFORMATION
    GW_OWNER
    GWL_STYLE
    WS_DISABLED
    WS_CANCELMODE
    WM_CLOSE

    Can't see a declaration for these. The VB Api Text viewer add on should return everything with perhaps the exception of PROCESS_QUERY_INFORMATION (PROCESS_QUERY_INFORMATION = &H400). Declare them with public scope in Module1.bas. Even if this doesn't fix your code you still need them and always use Option Explicit in VB - this requires all variables to be declared or you can't compile.
    Private Sub Command2_Click()
        EndTask (hwnd)
    End Sub
    

    Where is hwnd declared? (again you need option explicit). I'd assume you want hwnd to be the handle returned from the OpenProcess method. If so take the declaration for hProcess out of Command1_Click and move it to form level.

    As a side note its generally good coding practice to give your controls a suitable name so Command1 could be cmdOpenNetMeeting and Command2 could be cmdCloseNetMeeting. Something like that anyway :)


  • Closed Accounts Posts: 5 Dave David


    Thanks Phil I'll try this out.

    D David


Advertisement