Solved

form disappearing

Posted on 2008-06-25
7
171 Views
Last Modified: 2013-11-07
I'd asked how to drop some data beneath the start button (http://www.experts-exchange.com/Q_23508748.html).
It works, at least for the first few passes.
However, without warning, at some point after the form's been loaded, I can look down there and it's simply gone...no data being displayed at all...

me.Visible is true,
windowstate is normal
Height is 20/Width is 90 (as expected)
TopLevel is true
StartPos is manual

Changing the color doesn't seem to register.
What can I check?  Any idea why it's MIA?
0
Comment
Question by:sirbounty
  • 3
  • 2
  • 2
7 Comments
 
LVL 67

Author Comment

by:sirbounty
ID: 21865905
I can duplicate it if I hit WindowsKey+D (shrink to desktop).  It doesn't disappear the 'first' time, when everything is minimized, but if I hit it again, to restore everything to it's prior state, the form disappears...
0
 
LVL 3

Assisted Solution

by:GHCS_Mark
GHCS_Mark earned 200 total points
ID: 21867056
check whether the forms state has been changed to minimized.  maybe add code to the form.resize or form.visiblechanged events to reaffirm what position you expect yourself to be in, but don't forget to check for recursive calls if you do this.
0
 
LVL 67

Author Comment

by:sirbounty
ID: 21867662
Neither of those hit after the form is loaded (good thinking though).
I even tried the min/max events, but nothing there either...
0
Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

 
LVL 9

Assisted Solution

by:Pacman
Pacman earned 300 total points
ID: 21873166
Where is your form exactly located ?
Check following:

o Screen Position
o owner
o parent

is your form BEHIND another window (Z-order) ?
0
 
LVL 3

Assisted Solution

by:GHCS_Mark
GHCS_Mark earned 200 total points
ID: 21873175
Try setting a timer to reapply the topmost attribute.  It may be that the Taskbar is putting itself over the top.
0
 
LVL 67

Author Comment

by:sirbounty
ID: 21873626
Screen position is correct.
Not sure where you're going with owner/parent, but a quick search on z-order brought up the bringtofront method for the form, so I tossed that in there for good measure.

Already have the timer, so I added the topmost=true in there as well.

Something seems to have worked at any rate - my attempt to duplicate it still causes it to disappear, but it's finally reappearing when the timer fires.

I'll play with it to narrow it down and continue testing just to be sure.
Thanx gang!
0
 
LVL 9

Accepted Solution

by:
Pacman earned 300 total points
ID: 21881753
Does your form disappear completely or is it only behind some other window (taskbar for example) ?
To test it, you can position your form so that I overlaps with the taskbar but partially visible.

Another helpful test:

Take the Spy-Tool and watch the Properties (windows style are interesting) of your form.
a) styles when it's visible
b) styles when it's invisible

With spy you can also get the owner / parent of your form.
0

Featured Post

Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

Question has a verified solution.

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

Suggested Solutions

Many of us here at EE write code. Many of us write exceptional code; just as many of us write exception-prone code. As we all should know, exceptions are a mechanism for handling errors which are typically out of our control. From database errors, t…
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
This Micro Tutorial demonstrates using Microsoft Excel pivot tables, how to reverse engineer competitors' marketing strategies through backlinks.
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…

778 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