LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 25
Default Form question

Hi Leith

I appreaciate your help :-) though it does not what I try to do.

When I activate my timer in Excel so that the progressbar form will be
shown in 5 seconds and schwitch to another application - then after 5
seconds Excel bring itselves in front and the userform comes on top of
it all.

That is not what I want.

I want Excel to stay in background, updating whatever and here my
problem is with the userform with progress bar.

Normally when the user works in Excel, the user schould be informed
that something is going on (userform with progressbar).
Then - when the user schwitches to another application, Excel schould
continue its scheduled automatic refreshing.. and here - I want the
userform with bar not to come on top... at the same time the code
schould continue.. updating the userform and progressbar - in
background.

What happends when modal is that code stops, and Excel icon on my
taskbar is blinking.
When I then activate Excel, the userform comes up.... It have been -
"waited" for my action... It schould have continued itself.

Hope it is understandable. :-)

Cheers Leon




On 8 Jul., 18:39, Leith Ross
wrote:
Hello Leon,

I should have proof read my post. I changed the GetActiveWindow in my
original routine to GetForegroundWindow because the latter has s
slightly higher priority and has proven to be more stable across
different Windows systems. the code should be this...

'================================================= ========
'Returns the Window Handle of the Window
'that is accepting User input.
Public Declare Function GetForegroundWindow Lib "user32.dll" () As
Long

Sub KeepFormOnTop()

Const HWND_TOPMOST As Long = -1
Const SWP_NOMOVE As Long = &H2
Const SWP_NOSIZE As Long = &H1

SetWindowPos GetForegroundWindow(), HWND_TOPMOST, 0, 0, 0, 0, _
SWP_NOMOVE + SWP_NOSIZE

End Sub
'================================================= ========

--
Leith Ross

Sincerely,
Leith Ross

'The Code Cage' (http://www.thecodecage.com/)
------------------------------------------------------------------------
Leith Ross's Profile:http://www.thecodecage.com/forumz/member.php?userid=75
View this thread:http://www.thecodecage.com/forumz/sh...d.php?t=113600




 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Form question Rich Mogy Excel Discussion (Misc queries) 2 February 16th 07 06:14 PM
Form Question Barb Reinhardt Excel Programming 5 November 15th 06 08:26 PM
Form Question Barb Reinhardt Excel Programming 1 November 3rd 06 07:01 PM
Form Question trward79 Excel Programming 0 October 10th 06 10:05 PM
ser form question Gareth[_3_] Excel Programming 1 September 11th 03 09:27 PM


All times are GMT +1. The time now is 04:46 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"