Thanks a lot for your very quick answer. Your first message tells me what I've expected. The second message could show the way ...
I'll tell you more, if a find a solution!
cu
Steps to do so:
1. Find the active window.
2. Find the topmost parent window (GetParent API).
3. Send WM_CLOSE command to the window found at 2. (I think it can be done with SendMessage.
Ofcourse you have to find yourself a VB or VC programmer first...
And.. this doesn't work in all situations, for example while there are still pending errors or messages that has to be clicked upon.
The piece for finding navision windows i have for you in VB code:
Private 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
Private Declare Function GetParent Lib "user32" (ByVal hwnd As Long) As Long
Private Declare Function GetForegroundWindow Lib "user32" () As Long
Public Sub GetHwnd(byref hwndFINEXE as long, byref hwndObjectDesigner as long, byref hwndMDIclient as long)
Dim tmphwnd As Long
tmphwnd = GetForegroundWindow
Do
hwndFINEXE = tmphwnd
tmphwnd = GetParent(tmphwnd)
Loop Until tmphwnd = 0
hwndMDIclient = FindWindowEx(hwndFINEXE, 0&, "MDICLIENT", vbNullString)
hwndObjectDesigner = FindWindowEx(hwndMDIclient, 0&, vbNullString, "Object Designer")
End Sub
In a world without Borders or Fences, who needs Windows and Gates?
You are right about the error messages do not allow Navision to be closed. Navision also doesn't close if there was any Print Preview, Customer/Vendor/Quote/Invoices Lookup Lists, etc. windows open. Try closing Navision while any of these windows open and you would see a popup window.
ACI handles all these situations and more, plus you see all users. If there was a popup window present, ACI does nothing and allows you to use the Remote Control function to respond to the popup window and close Navision.
Currently ACI does not have that feature. It's possible to add it, but this is the first time anyone requested it. A quick DLL or OCX can be made to tell ACI to close Navision in this case...
Comments
The answer is: "You can't!"
the EXIT command only means, exit the object or function you are in.
...
Everybody on-line.
...
Looking good!
But if you do this and you have two clients open, it will be pretty though to distinguish which one you want to kill.
Greetings,
...
Everybody on-line.
...
Looking good!
I'll tell you more, if a find a solution!
cu
http://www.autocloseidle.com/
Regards,
Naji Shaman
http://www.autocloseidle.com
Steps to do so:
1. Find the active window.
2. Find the topmost parent window (GetParent API).
3. Send WM_CLOSE command to the window found at 2. (I think it can be done with SendMessage.
Ofcourse you have to find yourself a VB or VC programmer first...
And.. this doesn't work in all situations, for example while there are still pending errors or messages that has to be clicked upon.
The piece for finding navision windows i have for you in VB code:
You are right about the error messages do not allow Navision to be closed. Navision also doesn't close if there was any Print Preview, Customer/Vendor/Quote/Invoices Lookup Lists, etc. windows open. Try closing Navision while any of these windows open and you would see a popup window.
ACI handles all these situations and more, plus you see all users. If there was a popup window present, ACI does nothing and allows you to use the Remote Control function to respond to the popup window and close Navision.
Regards,
Naji Shaman
http://www.autocloseidle.com
Regards,
Naji Shaman
http://www.autocloseidle.com