Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 15
Default Problems with an invisible form

I am using an invisible form in an application by using

Public Declare Function SetWindowLong Lib "user32" Alias
"SetWindowLongA" _
(ByVal hWnd As Long, ByVal nIndex As Long, ByVal dwNewLong As
Long) As Long

I call SetWindowLong several times in the form's Initialize method(I
don't use the initialize event) to set all of the visible elements such
as the border, the caption, the dialogue frame and also set the form to
transparent. Then when I Show the form it the form is invisible. This
all works fine most of the time except in one case where I Unload the
form and show another (visible) form. When I then hide (or unload) the
second form and then initialize and show the invisible form again it is
not transparent (controls on the form and the form body are visible but
the border, caption etc. are still off). The strange thing is that I
am using only two forms other than the invisible one, one Modal and one
non-Modal and this only happens with the Modal form. To get the
invisible form back to being transparent I can run a routine with only
the line Application.ScreenUpdate = true in it from a key press in the
form's KeyUp event (or set an OnTime event for one second after the
form is shown to run the same routine). None of this is very elegant so
my question is this: Is there a way of running a piece of code
automatically after the form has been Shown? Do I have a timing
problem here? Or is there another way around this? Incidentally I have
tried putting Application.ScreenUdatating = true in the Initialize and
Activate events but it only makes the form non-transparent every time
it is Shown.
Seiscons

Reply
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
VB Form vs VBA UserForm problems... R Avery[_2_] Excel Programming 1 April 22nd 05 06:49 AM
VB Form vs VBA UserForm problems... R Avery[_2_] Excel Programming 0 April 22nd 05 12:54 AM
VB Form vs VBA UserForm problems... R Avery[_2_] Excel Programming 0 April 22nd 05 12:51 AM
form problems [email protected] Excel Programming 1 March 24th 05 06:13 PM
problems with a multitab form JulieD Excel Programming 0 September 7th 04 03:47 PM


All times are GMT +1. The time now is 04:36 AM.

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

About Us

"It's about Microsoft Excel"