Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Trying to find out how to imitate WinXP behavior....
Message
From
17/02/2004 12:17:07
Lamar Glover
Southeastern Apparel, Inc.
Dothan, Alabama, United States
 
 
To
17/02/2004 12:01:30
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00874439
Message ID:
00877991
Views:
27
Tracy,

Here is what I am trying to do. The app will start up minimized. If predetermined conditions occur (records added for user or current record is at least 48hrs old) then the minimized app should begin flashing.

The app is mainly 1 form. I have placed a timer control that contains the following code:

oapp.declare_flash()
LOCAL hWindow
hWindow = GetActiveWindow()

IF _SCREEN.WINDOWSTATE = 1

DO WHILE _SCREEN.WINDOWSTATE = 1
= FlashWindow (hWindow, 1)
= Sleep (250)
= FlashWindow (hWindow, 0)
= Sleep (100)
ENDDO
= FlashWindow (hWindow, 0)
ENDIF

oapp.declare_flash() contains the same code as your decl() example below.

I know the timer works because it initially contained a messagebox call.

I have tried minimizing the entire app and just the form. I have been unsuccessful in all attempts. That is why I feel I am not initiating something properly.

Again, thank you for your time.

>Can you post your code that is not working? What type of behavior does it exhibit when it runs? Is the app minimized at all and just does not flash or does it not even minimize? What is not happening when you test it exactly?
>
>
>>Tracy,
>>
>>Thanks for your help. Running your example code in a program works and provides the behavior I desire. But I am having a problem getting it to work in my application.
>>
>>I have tried calling it from the form level. I have called it from initial program level. Nothing seems to work. I will be running this from a timer based on changing variables. Should I run the code you have in DECL in my initial program and then put the other code in the timer control?
>>
>>This is my first attempt at using an API call.
>>
>>Thanks for your time.
>>
>>>An small example:
>>>
>>>
>>>DO decl
>>>LOCAL hWindow
>>>hWindow = GetActiveWindow()
>>>_SCREEN.WindowState = 1
>>>DO WHILE INKEY() <> 27
>>>	= FlashWindow (hWindow, 1)
>>>	= Sleep (250)
>>>	= FlashWindow (hWindow, 0)
>>>	= Sleep (100)
>>>ENDDO
>>>= FlashWindow (hWindow, 0)
>>>
>>>PROCEDURE  decl
>>>	DECLARE Sleep IN kernel32 INTEGER dwMilliseconds
>>>	DECLARE INTEGER GetActiveWindow IN user32
>>>
>>>	DECLARE INTEGER FlashWindow IN user32;
>>>		INTEGER hWnd, INTEGER bInvert
>>>
>>>
>>>
>>>>In WinXP Pro if you have multiple tasks running and one of your tasks requires imput such as a password the button on the task bar will begin to flash.
>>>>
>>>>We have an application that will run at all times in a minimized window. It will alert the user if action is necessary based on a timer.
>>>>
>>>>How can we imitate the WinXP behaviour so this application's task bar icon will flash.
>>>>
>>>>Any help would be appreciated.
Lamar Glover
DP Manager, Southeastern Apparel, Inc.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform