Solved

Setting Focus On A VB App

Posted on 2002-05-03
6
140 Views
Last Modified: 2010-05-02
I have a VB app that goes thru and make certain checks.  This can sometimes take about 3-4 minutes.  When the checks are completed, a Message Box pops up giving the results of the check.

What I need is, if while the checking process is going on, someone, lets say opens Microsoft Word to do some work in it.  

When the checking process is complete, I need to the VB app to become Visible again and setfocus on it.
I need for it to take over the screen again right before the Message Box pops up.

The name of my app is Search.exe

Thanks
WonHop
0
Comment
Question by:WonHop
6 Comments
 
LVL 5

Expert Comment

by:rkot2000
ID: 6988959
before showing msgbox :
appactivate currentform.name like :

AppActivate Me.Name
0
 
LVL 16

Expert Comment

by:Richie_Simonetti
ID: 6988982
optionally,
Private Declare Function ShowWindow Lib "user32" Alias "ShowWindow" (ByVal hwnd As Long, ByVal nCmdShow As Long) As Long
Private Const SW_RESTORE = 9


'usage
showwindow me.hwnd, SW_RESTORE
0
 
LVL 15

Accepted Solution

by:
ameba earned 100 total points
ID: 6989373
   Beep
    Me.SetFocus
    MsgBox "Done!"
0
Courses: Start Training Online With Pros, Today

Brush up on the basics or master the advanced techniques required to earn essential industry certifications, with Courses. Enroll in a course and start learning today. Training topics range from Android App Dev to the Xen Virtualization Platform.

 
LVL 2

Author Comment

by:WonHop
ID: 6991371
Hello Guys.  Thanks for the reply.  Sorry I am just now getting back to you, but I did not receive and still have not received any emails saying anyone replied and I left early Friday.  I guess I should have checked anyway like I did today.

I will check these out and see how they work.

Thanks
WonHop
0
 
LVL 2

Author Comment

by:WonHop
ID: 6994342
Hello guys.  For the app I was running, ameba's comment was the one that worked.

Thanks to you all
WonHop

0
 
LVL 15

Expert Comment

by:ameba
ID: 6994353
Thanks!
0

Featured Post

Courses: Start Training Online With Pros, Today

Brush up on the basics or master the advanced techniques required to earn essential industry certifications, with Courses. Enroll in a course and start learning today. Training topics range from Android App Dev to the Xen Virtualization Platform.

Question has a verified solution.

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

Suggested Solutions

Introduction While answering a recent question (http://www.experts-exchange.com/Q_27402310.html) in the VB classic zone, I wrote some VB code in the (Office) VBA environment, rather than fire up my older PC.  I didn't post completely correct code o…
If you have ever used Microsoft Word then you know that it has a good spell checker and it may have occurred to you that the ability to check spelling might be a nice piece of functionality to add to certain applications of yours. Well the code that…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
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…

808 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