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
Hi there,
There is an issue with role permissions that is being worked on at the moment.
If you are having trouble with access or permissions on regional forums please post here to get access: https://www.boards.ie/discussion/2058365403/you-do-not-have-permission-for-that#latest

Lauching & Terminating Applications from VB

  • 21-03-2005 11:23am
    #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, Registered Users 2 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