Solved

Restore an Application

Posted on 2003-12-08
1
158 Views
Last Modified: 2010-05-03
Hi,

I'm trying to restore an application from a minimized state, but when I do this the app shutsdown?!?!?!

The code I use is:

Private Declare Function ShowWindow Lib "user32" (ByVal lhWnd As Long, _
    ByVal nCmdShow As Long) As Long

ShowWindow lhWnd, SW_RESTORE

What am I doing wrong?

I also use SetForegroundWindow and this works fine with this window.

Thanks.

0
Comment
Question by:Exsus
1 Comment
 
LVL 26

Accepted Solution

by:
EDDYKT earned 90 total points
ID: 9897987
Have you tried

Const SW_SHOWNORMAL = 1
ShowWindow lhWnd, SW_SHOWNORMAL
0

Featured Post

Gigs: Get Your Project Delivered by an Expert

Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction I needed to skip over some file processing within a For...Next loop in some old production code and wished that VB (classic) had a statement that would drop down to the end of the current iteration, bypassing the statements that were c…
When trying to find the cause of a problem in VBA or VB6 it's often valuable to know what procedures were executed prior to the error. You can use the Call Stack for that but it is often inadequate because it may show procedures you aren't intereste…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…

776 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question