bring to front

  • Thread starter Thread starter Romain TAILLANDIER
  • Start date Start date
R

Romain TAILLANDIER

hi group

I use this VB.NET code in a button action onClick :

---
dim f as new form1
f.ShowDialog()
---

when I close the form1 f, the front screen isn't always its parent. some
times it is, sometimes it is an other forms (of other application like
windows explorer, or sql queryCE ...)
how can i force the front screen to be the parent form of the disposed form1
f ?

i try something like that
---
dim f as new form1
f.ShowDialog()
me.show()
' or that
'me.BrintToTop
'me.focus
---

I also try something like that on the Form1.dispose method :

---
if not me.parent is nothing then
dim a as form = me.parent
a.bringToTop
end if
me.dispose
---

but the problem still remind.

any body have a tips to fix that ?

thanks
ROM
 
Hi Romain,

Thanks for this repro, we'll enter a bug in our database.

-Katie

--------------------
| From: "Romain TAILLANDIER" <[email protected]>
| References: <#[email protected]>
<#s#[email protected]>
| Subject: Re: bring to front
| Date: Tue, 5 Aug 2003 10:14:03 +0200
| Lines: 13317
| X-Priority: 3
| X-MSMail-Priority: Normal
| X-Newsreader: Microsoft Outlook Express 6.00.2800.1106
| X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106
| Message-ID: <#[email protected]>
| Newsgroups: microsoft.public.dotnet.framework.compactframework
| NNTP-Posting-Host: mfactories-02.univ-mlv.fr 193.50.159.155
| Path: cpmsftngxa06.phx.gbl!TK2MSFTNGP08.phx.gbl!tk2msftngp13.phx.gbl
| Xref: cpmsftngxa06.phx.gbl
microsoft.public.dotnet.framework.compactframework:30157
| X-Tomcat-NG: microsoft.public.dotnet.framework.compactframework
|
| hi group,
| hi ALEX
|
| you found here the a sample code : form1
|
| the form is composed of a textbox, where you can enter the name of a
| daughter window.
| then you can create a daughter window with that name by clicking on "new
| window".
| exit is closing the current windows by disposing.
|
| with that app, my tests are :
|
| A]
| create a few new windows named 1 2 3 4 5 ... and juste close it.
| her i encounter no problem.
|
| B]
| open an pplication like windows explorer.
| then run my app.
| open daughter windows 1 2 3 ,
| close the windows 3 (the lastest open)
| here is the first problem :
| i lose window 1 and 2 because an explorer come to front.
| (the problem could be solve by remove the me.hide call)
|
| C]
| run my app,
| open a few daughter windows, 1 2 3
| open explorer window
| refocus on le lastest daughter window (number 3)
| open other daughter windows 4 5
| (here it is suppose that you remove the me.hide method)
| close the 5
| close the 4
| close the 3
| then you have to front the explorer window
| focus on the second, close it
| the you have to front the explorer window .....
|
| WELL
| that i want to do is each time i close one of my daughter window, i want
to
| put its parent windows to front. (i don't care about the code if it work
| :) )
| i try a few thing, (commented in the code) but never have a satifying
| result. I always have the explorer wich jump to front.
|
| if any problem, send me a mail on the group :)
| i really need to fix that
|
| thanks for help.
| ROM
|
|
|
| | > How reliably can you reproduce this? Can you isolate this down t a code
| > snippet that is smaller than you whole project - something that can be
| > shared with me? I'm trying to track this down for quite some time but do
| not
| > have a reliable repro scenario
| >
message
| > | > > hi group
| > >
| > > I use this VB.NET code in a button action onClick :
| > >
| > > ---
| > > dim f as new form1
| > > f.ShowDialog()
| > > ---
| > >
| > > when I close the form1 f, the front screen isn't always its parent.
some
| > > times it is, sometimes it is an other forms (of other application like
| > > windows explorer, or sql queryCE ...)
| > > how can i force the front screen to be the parent form of the disposed
| > form1
| > > f ?
| > >
| > > i try something like that
| > > ---
| > > dim f as new form1
| > > f.ShowDialog()
| > > me.show()
| > > ' or that
| > > 'me.BrintToTop
| > > 'me.focus
| > > ---
| > >
| > > I also try something like that on the Form1.dispose method :
| > >
| > > ---
| > > if not me.parent is nothing then
| > > dim a as form = me.parent
| > > a.bringToTop
| > > end if
| > > me.dispose
| > > ---
| > >
| > > but the problem still remind.
| > >
| > > any body have a tips to fix that ?
| > >
| > > thanks
| > > ROM
| > >
| > >
| >
| >
|
|
|

This posting is provided "AS IS" with no warranties, and confers no rights.
 
Back
Top