vnc window unable to be closed with vb application

I'm trying to make a vnc interface (realvnc 3.3.7) in Visual Basic 6 (sp5)
With a click vncviewer is launched and connected to a specific server (eg 'PC1') : it works perfectly well

I'm trying to close the vnc window (eg title = 'PC1') with
appactivate "PC1", true
DoEvents
sendkeys "%{F4}",true

but it doesn't work

After retrieving correct PID and hWnd I've then tried with closehandle or DestroyWindow or SendMessage API functions but still doesn't work...

What the hell ?

Note : Typing ALT + F4 has no effect on such window...
WintzAsked:
Who is Participating?
 
WintzConnect With a Mentor Author Commented:
Sorry, but I found the answer using :

ShowWindow(hWnd, 0)


Thks a lot...
0
 
CleanupPingCommented:
Hi Wintz,
This old question (QID 20560148) needs to be finalized -- no Experts commented, so delete it and get a refund.  Please see http://www.cityofangels.com/Experts/Closing.htm for information and options.
0
 
GPrentice00Commented:
No comment has been added lately, so it's time to clean up this TA.
I will leave a recommendation in the Cleanup topic area that this question is:

-->PAQ - with points refunded

Please leave any comments here within the next seven days.

PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!

GPrentice00
EE Cleanup Volunteer
0
All Courses

From novice to tech pro — start learning today.