Announcement

Collapse
No announcement yet.

close Embed map monkey?

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • close Embed map monkey?

    I'm trying to embed map monkey into my front end written in vb6.

    this is how i embed map monkey into a picturebox and that works great

    Code:
    Shell gpsPath        
    Do Until hProgramWnd            
       hProgramWnd = FindWindow(gpslpClassName, gpslpWindowName)                       
       DoEvents
    Loop
            
    SetParent hProgramWnd, Form1.picGPS.hWnd
    but when i trying to exit map monkey whit this code it wont end, what are i doing wrong?

    Code:
    SendMessage hProgramWnd, WM_CLOSE, 0, 0
    DoEvents
    http://www.spearstats.com/spaceend
    http://www.kombidelta.se

  • #2
    Don't know if it matters, but i use:

    Code:
    PostMessage hwnd, WM_CLOSE, 0&, 0&
    SendMessage seemed to have problems with certain messages.

    Also, you might want to call
    Code:
    SetParent hProgramWnd, 0&
    to unembed the program.

    If that doesn't work, make sure hProgramWnd has a value in it, and that WM_CLOSE = &H10.

    There's also the CloseWindow API.

    Comment

    Working...
    X