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 ?
LVL 10
smeggheadAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

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
Cloud Class® Course: Amazon Web Services - Basic

Are you thinking about creating an Amazon Web Services account for your business? Not sure where to start? In this course you’ll get an overview of the history of AWS and take a tour of their user interface.

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

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
.NET Programming

From novice to tech pro — start learning today.