Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 175
  • Last Modified:

Form Main invisible but shown in taskbar

Hi,

I'm experiencing a weird problem
my program works perfectly for a while and then all of a sudden you can't see the main form..
it shows in the taskbar but the form is invisible
the program runs ok though
the program also has a system tray icon with a menu
from that menu I can open a sub window, when I do this that window is shown ok
the only window I'm experiencing problems with is the main window

suddenly happens so I have no idea what causes it
it might be control, dll's, ...

I really hope someone can help me..
0
TheWiep
Asked:
TheWiep
  • 7
  • 3
  • 2
  • +3
1 Solution
 
BurbbleCommented:
Could you post the relevant code?

Thanks
0
 
TheWiepAuthor Commented:
problem is that the code is about 200 pages :)

I use some control of vbAcellerator and some standard VB controls
0
 
GrahamSkanRetiredCommented:
If it is reproduceable in design mode, you could put this watch on the form to trigger when it becomes True.

frmMain.Visible = False
0
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

 
TheWiepAuthor Commented:
the thing is that the problem suddenly appeared
I've had version 1.5 out for a while without any problems
then I updated to V2.0 and used some new controls of vbAcc,
this version didn't have this problem for about 9 months and then suddenly it appeared
I don't know what actually changed as it was under heavy development...
0
 
TheWiepAuthor Commented:
just checked my code and don't use the .visible anywhere..
thanks for the tip though
0
 
BurbbleCommented:
Do you use the SetWindowPos API at any time, such as to keep a form on top of all the others?
0
 
TheWiepAuthor Commented:
nope,
I'm using
GetSystemDirectory
GetSettings (for registry)
in load
0
 
ShauliCommented:
Have you checked the project properties as for which form or sub starts the application?
Have you changed the way the application starts?
How do you display your main form? is it through the project properties, or through load / show?

S
0
 
BarshamDevelopment Team LeadCommented:
try use Service pack5.0 for your viusal studio ;)
0
 
BurbbleCommented:
0
 
TheWiepAuthor Commented:
didn't know SP6 was out, was still using SP5, updated now :)
thanks for the tip

Shauli:
I haven't changed the way the app starts
what exactly do you mean by 'through project properties'?
all the code for startup is in form load
I have been testing with adding a mshbox in both form load and activate and when the problem occurs, it still shows the popups so it does load and activate
0
 
EDDYKTCommented:
Sometime reboot your computer may work

Just wild guess
0
 
TheWiepAuthor Commented:
nope,
reboot doesn't work

I'm currently testing by removing a shadow control I've been using for a while..
perhaps this is causing some weirdness...
0
 
TheWiepAuthor Commented:
after a long and stressfull bughunt I finally found the problem
I store the position of the form in the registry, this way it will start up at the same position as where it was closed
the position is saved when closing the program
at the moment of dissappearance the x an y values stored in the registry are both -245760
very weird...
still dunno what causes this from time to time

to solve it I just added an If ... Then to see if x or y < 0
if this is the case, the form will be centered on the screen
0
 
GrahamSkanRetiredCommented:
I can't remember if that is the exact figure, but the left and top values are set to something like this if the form is minimised when the values are saved.
0

Featured Post

[Webinar On Demand] Database Backup and Recovery

Does your company store data on premises, off site, in the cloud, or a combination of these? If you answered “yes”, you need a data backup recovery plan that fits each and every platform. Watch now as as Percona teaches us how to build agile data backup recovery plan.

  • 7
  • 3
  • 2
  • +3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now