Solved

Setting Focus On A VB App

Posted on 2002-05-03
6
138 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
Why You Should Analyze Threat Actor TTPs

After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

 
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

6 Surprising Benefits of Threat Intelligence

All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

Join & Write a Comment

I’ve seen a number of people looking for examples of how to access web services from VB6.  I’ve been using a test harness I built in VB6 (using many resources I found online) that I use for small projects to work out how to communicate with web serv…
Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
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…
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…

758 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

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now