[Webinar] Streamline your web hosting managementRegister Today

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

Strange send to back

Hi,

In the past few months, my applicaation keeps hiding itself behind other windows. It usually happens when I open a fomr using '.ShowDialog()'. When the dialog is closed, the parent window sends itself to the back, behind any other maximised windows, if I minimize all other applications, it functions perfectly.. it's almost like a 'sendtoback' message is being sent to the form.

I've been working on this application for years, and it's never done this before, so I don't know if there is some dodgy control or something which is causing this.

Any ideas anyone ?
0
smegghead
Asked:
smegghead
  • 3
  • 3
1 Solution
 
Mihai StancescuSoftware Engineer Commented:
Maybe you have installed other applications that runs "hidden", in tray, or a process, that maybe looks for a form named like yours using FindWindow, and then it sends the SendToBack message...

It happend to me once...


Hope this helps!

Regards,
Mishu
0
 
smeggheadAuthor Commented:
Yeah, it's not just on my machine. it's on the client's machines, but it's only recently it's got really bad,. Can't work it out.. thought it might have been to do with .net 2.0 Service pack which I recently installed.
0
 
Mihai StancescuSoftware Engineer Commented:
Try uninstalling it and see if it happens again. Or try to rename your form caption.


Hope this helps!

Regards,
Mishu
0
The new generation of project management tools

With monday.com’s project management tool, you can see what everyone on your team is working in a single glance. Its intuitive dashboards are customizable, so you can create systems that work for you.

 
smeggheadAuthor Commented:
Unistall what ? it's a c# app installed on multiple computers, it's the same on all of them..

Don't worry, I will work this out, it was just that I thought someone might have come across this before.
0
 
Mihai StancescuSoftware Engineer Commented:
I meant for the service pack 2 for .Net Framework.

It happend to me once, with an new application service, that I found out that he was looking for a form named just like mine, and send it to back, and then hide it... So I changed the name of my form (in title bar) and worked ok.

Hope this helps!

Regards,
Mishu
0
 
smeggheadAuthor Commented:
Basically, this was due to forms not being disposed. For example.

frmMain myform=new frmMain();
myform.ShowDialog();
//myform.Dispose();

For some reason, without the Dispose method, it started hiding windows behind other applications.. The strange this was.. this never used to happen, so something with the framework / windows must have changed.

Thanks for your suggestions anyway.

Smg.
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

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