Ureader.com  
Microsoft software help and Community
   home   |   control panel login   |   archive   |  
 
DotNet
acad.assignment.mngr
academic
adonet
aspnet
aspnet.announcements
aspnet.build.controls
aspnet.caching
aspnet.datagridcontrol
aspnet.mobile
aspnet.security
aspnet.webcontrols
aspnet.webservices
clr
compactframework
component_services
datatools
distributed_apps
drawing
faqs
framework
framework.wmi
general
internationalization
interop
languages.csharp
languages.jscript
languages.vb
languages.vb.controls
languages.vb.data
languages.vb.upgrade
languages.vc
languages.vc.libraries
myservices
odbcnet
performance
remoting
scripting
sdk
security
setup
vjsharp
vsa
webservi.enhancements
webservices
windowsforms
windowsforms.controls
winforms.databinding
winforms.designtime
xml
  
 
date: Tue, 8 Jul 2008 10:08:52 -0700 (PDT),    group: microsoft.public.dotnet.framework.windowsforms        back       


Strange modal form behaviour   
Hi guys, it's a little problem but I'm quite stuck with it. I'm
developing a Windows Forms application with VS2008 and I have noticed
this little graphical bug. I have a main form with ShowInTaskbar=true.
I open a modal form (with showdialog()) with ShowInTaskbar=false.
Then, just sometimes, when a use the "Show Desktop" icon or I change
the active program when I go back to mine I can see just the main form
(the modal form is somehow hidden) and obviously it's locked, I can't
interact with it. Neither I can see use the modal form because it's
hidden, so I have to change the active program with ALT+TAB and the go
back to my application. With this move I can get back my modal form
and can continue working. How can I avoid this and keep my modal form
"hidden" from the taskbar?

Thank you in advance for your help

cold
date: Tue, 8 Jul 2008 10:08:52 -0700 (PDT)   author:   cold80

Re: Strange modal form behaviour   
"cold80"  wrote in message 
news:6b830b92-ffaa-43ed-80ae-80c03d4b6b32@p25g2000hsf.googlegroups.com...
> Hi guys, it's a little problem but I'm quite stuck with it. I'm
> developing a Windows Forms application with VS2008 and I have noticed
> this little graphical bug. I have a main form with ShowInTaskbar=true.
> I open a modal form (with showdialog()) with ShowInTaskbar=false.
> Then, just sometimes, when a use the "Show Desktop" icon or I change
> the active program when I go back to mine I can see just the main form
> (the modal form is somehow hidden) and obviously it's locked, I can't
> interact with it. Neither I can see use the modal form because it's
> hidden, so I have to change the active program with ALT+TAB and the go
> back to my application. With this move I can get back my modal form
> and can continue working. How can I avoid this and keep my modal form
> "hidden" from the taskbar?

Try using the ShowDialog() overload that sets the modal form's owner, e.g.
modalForm = new ModalForm();
modalForm.ShowDialog(this);

Chris Jobson
date: Tue, 8 Jul 2008 21:32:00 +0100   author:   Chris Jobson

Google
 
Web ureader.com


    COPYRIGHT 2007, YARDI TECHNOLOGY LIMITED, ALL RIGHT RESERVE  |   contact us