|
-
Feb 19th, 2001, 08:11 PM
#1
Thread Starter
Addicted Member
I have an app that is accessing Microsoft Access (no pun intended) and displaying a report.
I want MS Access to bring itself to the front so that the report is immediately visible instead of my application.
I have tried using the following API's
SendMessage WM_SETFOCUS
SetForegroundWindow
BringWindowToTop
SetWindowPos
all with no success, they will select the Applications button on the taskbar but the actual window is not displayed on the screen, it stays minimised.
Does anybody know a way to make access pop up showing the report, This is quite an important problem for me to solve as some of my reports show forms from inside access to query the user for more information and if the user does not respond to these forms in access my program sits there as if it has hung when really it is just waiting for access to return from displaying the report.
Any help would be much appreciated
Regards
Matt Brown
Hamilton, NZ
VB6 C++ in Visual Studio 6sp4
VB.net Beta 1
-
Feb 19th, 2001, 09:46 PM
#2
Hyperactive Member
Try using this
Code:
Declare Function SetActiveWindow Lib "user32.dll" (ByVal hwnd As Long) As Long
-
Feb 19th, 2001, 11:14 PM
#3
Thread Starter
Addicted Member
That doesn't work
It works even less well that SetForegroundWindow
With SetForegroundWindow the button on the taskbar receives the focus but the window is not restored or maximised.
The problem is specific to acess if I pass the hwnd of another window to SetForegroundWindow it handles it find and the requested window is brought to the top of the ZOrder.
So really i am needing a work around to compensate for Access!
Regards
Matt Brown
Hamilton, NZ
VB6 C++ in Visual Studio 6sp4
VB.net Beta 1
-
Feb 20th, 2001, 07:33 AM
#4
Have you tried the ShowWindow API function?
-
Feb 20th, 2001, 03:00 PM
#5
Thread Starter
Addicted Member
Regards
Matt Brown
Hamilton, NZ
VB6 C++ in Visual Studio 6sp4
VB.net Beta 1
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|