Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

App stops till it has focus

Posted on 1998-06-16
6
130 Views
Last Modified: 2010-05-03
i have a vb app runing on win95.
In my app the is a moving picture. However, my app always stops at the place where I move the picture, if another program (say Access)app has focus.  I have to give backthe focus to my app before it continue.
Any suggestions for this?
0
Comment
Question by:GeorgeVT
  • 4
  • 2
6 Comments
 
LVL 8

Expert Comment

by:MikeP090797
ID: 1463468
Put a timer on the form, set the interval to 500, and put this inside:
If GetForegroundWindow()=mw.hwnd then me.show
0
 
LVL 8

Expert Comment

by:MikeP090797
ID: 1463469
Put a timer on the form, set the interval to 500, and put this inside:
If GetForegroundWindow()<>mw.hwnd then me.show
0
 

Author Comment

by:GeorgeVT
ID: 1463470
I have error on the line.
0
Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

 
LVL 8

Accepted Solution

by:
MikeP090797 earned 100 total points
ID: 1463471
GetForegroundWindow us an api that must be declared:

Declare Function GetForegroundWindow Lib "user32" Alias "GetForegroundWindow" () As Long

0
 

Author Comment

by:GeorgeVT
ID: 1463472
If GetForegroundWindow()=mw.hwnd then me.show
 
mw give me error. do you mean me?
0
 
LVL 8

Expert Comment

by:MikeP090797
ID: 1463473
My mistake again, replace mw with ME, I missplelled it
0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

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…
Introduction While answering a recent question about filtering a custom class collection, I realized that this could be accomplished with very little code by using the ScriptControl (SC) library.  This article will introduce you to the SC library a…
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…

839 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