Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Restore an Application

Posted on 2003-12-08
1
Medium Priority
?
177 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 360 total points
ID: 9897987
Have you tried

Const SW_SHOWNORMAL = 1
ShowWindow lhWnd, SW_SHOWNORMAL
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

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

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…
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…
Suggested Courses

927 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