Form Ont Top All Applications

  • Thread starter Thread starter Mauricio C. Pires
  • Start date Start date
Hi Mauricio,
Have you tried the Form.TopMost property. If it doesn't meet your need
,please let me know.
Thanks!

Best regards,

Ying-Shen Yu [MSFT]
Microsoft Online Partner Support
Get Secure! - www.microsoft.com/security

This posting is provided "AS IS" with no warranties and confers no rights.
You should not reply this mail directly, "Online" should be removed before
sending, Thanks!

--------------------
| Content-Class: urn:content-classes:message
| From: "Mauricio C. Pires" <[email protected]>
| Sender: "Mauricio C. Pires" <[email protected]>
| Subject: Form Ont Top All Applications
| Date: Thu, 25 Sep 2003 14:12:47 -0700
| Lines: 2
| Message-ID: <[email protected]>
| MIME-Version: 1.0
| Content-Type: text/plain;
| charset="iso-8859-1"
| Content-Transfer-Encoding: 7bit
| X-Newsreader: Microsoft CDO for Windows 2000
| X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4910.0300
| Thread-Index: AcODqcUAVG8WC+GMQXWrm9PWg/Cqtg==
| Newsgroups: microsoft.public.dotnet.framework.windowsforms
| Path: cpmsftngxa06.phx.gbl
| Xref: cpmsftngxa06.phx.gbl
microsoft.public.dotnet.framework.windowsforms:53157
| NNTP-Posting-Host: TK2MSFTNGXS01 10.40.2.125
| X-Tomcat-NG: microsoft.public.dotnet.framework.windowsforms
|
| Someone know how to make a Form on top all applications?
| Tanks.
|
 
Hi Mauricio,
It's a bit strange behaviour, but you may try set the Topmost property
to true in the On_Load event handler of your form. This work around works
on my system, if it doens't work for you, please let me know. Thanks!


Best regards,

Ying-Shen Yu [MSFT]
Microsoft Online Partner Support
Get Secure! - www.microsoft.com/security

This posting is provided "AS IS" with no warranties and confers no rights.
You should not reply this mail directly, "Online" should be removed before
sending, Thanks!

--------------------
| Content-Class: urn:content-classes:message
| From: "Mauricio C. Pires" <[email protected]>
| Sender: "Mauricio C. Pires" <[email protected]>
| Subject: Form Ont Top All Applications
| Date: Thu, 25 Sep 2003 14:12:47 -0700
| Lines: 2
| Message-ID: <[email protected]>
| MIME-Version: 1.0
| Content-Type: text/plain;
| charset="iso-8859-1"
| Content-Transfer-Encoding: 7bit
| X-Newsreader: Microsoft CDO for Windows 2000
| X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4910.0300
| Thread-Index: AcODqcUAVG8WC+GMQXWrm9PWg/Cqtg==
| Newsgroups: microsoft.public.dotnet.framework.windowsforms
| Path: cpmsftngxa06.phx.gbl
| Xref: cpmsftngxa06.phx.gbl
microsoft.public.dotnet.framework.windowsforms:53157
| NNTP-Posting-Host: TK2MSFTNGXS01 10.40.2.125
| X-Tomcat-NG: microsoft.public.dotnet.framework.windowsforms
|
| Someone know how to make a Form on top all applications?
| Tanks.
|
 
Hi Mauricio,
How about your problem now?
Is that work around helpful to you?
It's a known bug that the datagrid prevents a form to be Topmost,
and here is another work around , just add
IntPtr pt = dataGrid1.Handle;
after InitiliazeComponent() in your Form Constructor.
Thanks!

Best regards,

Ying-Shen Yu [MSFT]
Microsoft Online Partner Support
Get Secure! - www.microsoft.com/security

This posting is provided "AS IS" with no warranties and confers no rights.
You should not reply this mail directly, "Online" should be removed before
sending, Thanks!

--------------------
| Content-Class: urn:content-classes:message
| From: "Mauricio Pires" <[email protected]>
| Sender: "Mauricio Pires" <[email protected]>
| References: <[email protected]>
<[email protected]>
| Subject: RE: Form Ont Top All Applications
| Date: Fri, 26 Sep 2003 06:15:22 -0700
| Lines: 57
| Message-ID: <[email protected]>
| MIME-Version: 1.0
| Content-Type: text/plain;
| charset="iso-8859-1"
| Content-Transfer-Encoding: 7bit
| X-Newsreader: Microsoft CDO for Windows 2000
| X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4910.0300
| Thread-Index: AcOEMD2EN7rrKgr4TGuIMwA2kecveg==
| Newsgroups: microsoft.public.dotnet.framework.windowsforms
| Path: cpmsftngxa06.phx.gbl
| Xref: cpmsftngxa06.phx.gbl
microsoft.public.dotnet.framework.windowsforms:53199
| NNTP-Posting-Host: TK2MSFTNGXA11 10.40.1.163
| X-Tomcat-NG: microsoft.public.dotnet.framework.windowsforms
|
| If you put a Datagrid on the form, the form doesn't stay
| on top even you set the TopMost to true.
|
| Do you know a solution for this problem?
|
|
| >-----Mensagem original-----
| >Hi Mauricio,
| > Have you tried the Form.TopMost property. If it
| doesn't meet your need
| >,please let me know.
| >Thanks!
| >
| >Best regards,
| >
| >Ying-Shen Yu [MSFT]
| >Microsoft Online Partner Support
| >Get Secure! - www.microsoft.com/security
| >
| >This posting is provided "AS IS" with no warranties and
| confers no rights.
| >You should not reply this mail directly, "Online" should
| be removed before
| >sending, Thanks!
| >
| >--------------------
| >| Content-Class: urn:content-classes:message
| >| From: "Mauricio C. Pires"
| <[email protected]>
| >| Sender: "Mauricio C. Pires"
| <[email protected]>
| >| Subject: Form Ont Top All Applications
| >| Date: Thu, 25 Sep 2003 14:12:47 -0700
| >| Lines: 2
| >| Message-ID: <[email protected]>
| >| MIME-Version: 1.0
| >| Content-Type: text/plain;
| >| charset="iso-8859-1"
| >| Content-Transfer-Encoding: 7bit
| >| X-Newsreader: Microsoft CDO for Windows 2000
| >| X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4910.0300
| >| Thread-Index: AcODqcUAVG8WC+GMQXWrm9PWg/Cqtg==
| >| Newsgroups:
| microsoft.public.dotnet.framework.windowsforms
| >| Path: cpmsftngxa06.phx.gbl
| >| Xref: cpmsftngxa06.phx.gbl
| >microsoft.public.dotnet.framework.windowsforms:53157
| >| NNTP-Posting-Host: TK2MSFTNGXS01 10.40.2.125
| >| X-Tomcat-NG:
| microsoft.public.dotnet.framework.windowsforms
| >|
| >| Someone know how to make a Form on top all applications?
| >| Tanks.
| >|
| >
| >.
| >
|
 
Hi Ying-Shen Yu,
I set the TopMost property to true in the On_Load event
handler of my form. This work around doesn't always work
because if you change some DataGrid property after the
On_Load event, the form doesn't stay on top, so I set the
TopMost to true in the On_Paint event handler of the
DataGrid. I think that it's the best work around.
Thank you very much for your attention and help.

Do you know if has some manner to comunicate Microsoft
about this problem?


Best Regards,

Mauricio Pires.

-----Mensagem original-----
Hi Mauricio,
It's a bit strange behaviour, but you may try set the Topmost property
to true in the On_Load event handler of your form. This work around works
on my system, if it doens't work for you, please let me know. Thanks!


Best regards,

Ying-Shen Yu [MSFT]
Microsoft Online Partner Support
Get Secure! - www.microsoft.com/security

This posting is provided "AS IS" with no warranties and confers no rights.
You should not reply this mail directly, "Online" should be removed before
sending, Thanks!
 
Hi Mauricio,
Thanks for your kind help, we have noticed this problem and our
product team is investigating on it. It's ok to set the TopMost to true in
On_Paint, but maybe you can put it in On_Deactivate event, it will be
helpful to the performance of your program.
If it does not work using this way, please let me know.
Thanks for using Microsoft MSDN Newsgroup!


Best regards,

Ying-Shen Yu [MSFT]
Microsoft Online Partner Support
Get Secure! - www.microsoft.com/security

This posting is provided "AS IS" with no warranties and confers no rights.
You should not reply this mail directly, "Online" should be removed before
sending, Thanks!

--------------------
| Content-Class: urn:content-classes:message
| From: "Mauricio Pires" <[email protected]>
| Sender: "Mauricio Pires" <[email protected]>
| References: <[email protected]>
<[email protected]>
| Subject: RE: Form Ont Top All Applications
| Date: Fri, 26 Sep 2003 07:04:52 -0700
| Lines: 72
| Message-ID: <[email protected]>
| MIME-Version: 1.0
| Content-Type: text/plain;
| charset="iso-8859-1"
| Content-Transfer-Encoding: 7bit
| X-Newsreader: Microsoft CDO for Windows 2000
| X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4910.0300
| Thread-Index: AcOENygGzC1995R8TPmW8NMATnz8ew==
| Newsgroups: microsoft.public.dotnet.framework.windowsforms
| Path: cpmsftngxa06.phx.gbl
| Xref: cpmsftngxa06.phx.gbl
microsoft.public.dotnet.framework.windowsforms:53206
| NNTP-Posting-Host: TK2MSFTNGXA08 10.40.1.160
| X-Tomcat-NG: microsoft.public.dotnet.framework.windowsforms
|
| Hi Ying-Shen Yu,
| I set the TopMost property to true in the On_Load event
| handler of my form. This work around doesn't always work
| because if you change some DataGrid property after the
| On_Load event, the form doesn't stay on top, so I set the
| TopMost to true in the On_Paint event handler of the
| DataGrid. I think that it's the best work around.
| Thank you very much for your attention and help.
|
| Do you know if has some manner to comunicate Microsoft
| about this problem?
|
|
| Best Regards,
|
| Mauricio Pires.
|
|
| >-----Mensagem original-----
| >Hi Mauricio,
| > It's a bit strange behaviour, but you may try set
| the Topmost property
| >to true in the On_Load event handler of your form. This
| work around works
| >on my system, if it doens't work for you, please let me
| know. Thanks!
| >
| >
| >Best regards,
| >
| >Ying-Shen Yu [MSFT]
| >Microsoft Online Partner Support
| >Get Secure! - www.microsoft.com/security
| >
| >This posting is provided "AS IS" with no warranties and
| confers no rights.
| >You should not reply this mail directly, "Online" should
| be removed before
| >sending, Thanks!
| >
| >--------------------
| >| Content-Class: urn:content-classes:message
| >| From: "Mauricio C. Pires"
| <[email protected]>
| >| Sender: "Mauricio C. Pires"
| <[email protected]>
| >| Subject: Form Ont Top All Applications
| >| Date: Thu, 25 Sep 2003 14:12:47 -0700
| >| Lines: 2
| >| Message-ID: <[email protected]>
| >| MIME-Version: 1.0
| >| Content-Type: text/plain;
| >| charset="iso-8859-1"
| >| Content-Transfer-Encoding: 7bit
| >| X-Newsreader: Microsoft CDO for Windows 2000
| >| X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4910.0300
| >| Thread-Index: AcODqcUAVG8WC+GMQXWrm9PWg/Cqtg==
| >| Newsgroups:
| microsoft.public.dotnet.framework.windowsforms
| >| Path: cpmsftngxa06.phx.gbl
| >| Xref: cpmsftngxa06.phx.gbl
| >microsoft.public.dotnet.framework.windowsforms:53157
| >| NNTP-Posting-Host: TK2MSFTNGXS01 10.40.2.125
| >| X-Tomcat-NG:
| microsoft.public.dotnet.framework.windowsforms
| >|
| >| Someone know how to make a Form on top all applications?
| >| Tanks.
| >|
| >
| >.
| >
|
 
Hi Ying-Shen Yu,
These work around aren't good, because in case that has
more than one form with TopMost property set true and with
a datagrid, when the dataset changes the data, the form
that owns the dataset always goes on top.
I continue with the problem.
-----Mensagem original-----
Hi Mauricio,
Thanks for your kind help, we have noticed this problem and our
product team is investigating on it. It's ok to set the TopMost to true in
On_Paint, but maybe you can put it in On_Deactivate event, it will be
helpful to the performance of your program.
If it does not work using this way, please let me know.
Thanks for using Microsoft MSDN Newsgroup!


Best regards,

Ying-Shen Yu [MSFT]
Microsoft Online Partner Support
Get Secure! - www.microsoft.com/security

This posting is provided "AS IS" with no warranties and confers no rights.
You should not reply this mail directly, "Online" should be removed before
sending, Thanks!
| Sender: "Mauricio Pires"
| References: <[email protected]>
<[email protected]>
| Subject: RE: Form Ont Top All Applications
| Date: Fri, 26 Sep 2003 07:04:52 -0700
| Lines: 72
| Message-ID: <[email protected]>
| MIME-Version: 1.0
| Content-Type: text/plain;
| charset="iso-8859-1"
| Content-Transfer-Encoding: 7bit
| X-Newsreader: Microsoft CDO for Windows 2000
| X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4910.0300
| Thread-Index: AcOENygGzC1995R8TPmW8NMATnz8ew==
| Newsgroups: microsoft.public.dotnet.framework.windowsforms
| Path: cpmsftngxa06.phx.gbl
| Xref: cpmsftngxa06.phx.gbl
microsoft.public.dotnet.framework.windowsforms:53206
| NNTP-Posting-Host: TK2MSFTNGXA08 10.40.1.160
| X-Tomcat-NG: microsoft.public.dotnet.framework.windowsforms
|
| Hi Ying-Shen Yu,
| I set the TopMost property to true in the On_Load event
| handler of my form. This work around doesn't always work
| because if you change some DataGrid property after the
| On_Load event, the form doesn't stay on top, so I set the
| TopMost to true in the On_Paint event handler of the
| DataGrid. I think that it's the best work around.
| Thank you very much for your attention and help.
|
| Do you know if has some manner to comunicate Microsoft
| about this problem?
|
|
| Best Regards,
|
| Mauricio Pires.
|
|
| >-----Mensagem original-----
| >Hi Mauricio,
| > It's a bit strange behaviour, but you may try set
| the Topmost property
| >to true in the On_Load event handler of your form. This
| work around works
| >on my system, if it doens't work for you, please let me
| know. Thanks!
| >
| >
| >Best regards,
| >
| >Ying-Shen Yu [MSFT]
| >Microsoft Online Partner Support
| >Get Secure! - www.microsoft.com/security
| >
| >This posting is provided "AS IS" with no warranties and
| confers no rights.
| >You should not reply this mail directly, "Online" should
| be removed before
| >sending, Thanks!
| >
| >--------------------
| >| Content-Class: urn:content-classes:message
| >| From: "Mauricio C. Pires"
| <[email protected]>
| >| Sender: "Mauricio C. Pires"
| <[email protected]>
| >| Subject: Form Ont Top All Applications
| >| Date: Thu, 25 Sep 2003 14:12:47 -0700
| >| Lines: 2
| >| Message-ID: <[email protected]>
| >| MIME-Version: 1.0
| >| Content-Type: text/plain;
| >| charset="iso-8859-1"
| >| Content-Transfer-Encoding: 7bit
| >| X-Newsreader: Microsoft CDO for Windows 2000
| >| X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4910.0300
| >| Thread-Index: AcODqcUAVG8WC+GMQXWrm9PWg/Cqtg==
| >| Newsgroups:
| microsoft.public.dotnet.framework.windowsforms
| >| Path: cpmsftngxa06.phx.gbl
| >| Xref: cpmsftngxa06.phx.gbl
| >microsoft.public.dotnet.framework.windowsforms:53157
| >| NNTP-Posting-Host: TK2MSFTNGXS01 10.40.2.125
| >| X-Tomcat-NG:
| microsoft.public.dotnet.framework.windowsforms
| >|
| >| Someone know how to make a Form on top all applications?
| >| Tanks.
| >|
| >
| >.
| >
|

.
 
Hi Mauricio,
I'm researching on this issue, however because it's closly related to
the internal implementation of the Datagrid class, I'm not sure if we can
find a work around. Any way I'll try my best to look for it.
If I get some work out, I'll update you as soon as possible.
Thanks!

Best regards,

Ying-Shen Yu [MSFT]
Microsoft Online Partner Support
Get Secure! - www.microsoft.com/security

This posting is provided "AS IS" with no warranties and confers no rights.
You should not reply this mail directly, "Online" should be removed before
sending, Thanks!

--------------------
| Content-Class: urn:content-classes:message
| From: "Mauricio Pires" <[email protected]>
| Sender: "Mauricio Pires" <[email protected]>
| References: <[email protected]>
<[email protected]>
<[email protected]>
<[email protected]>
| Subject: RE: Form Ont Top All Applications
| Date: Mon, 29 Sep 2003 10:20:42 -0700
| Lines: 144
| Message-ID: <[email protected]>
| MIME-Version: 1.0
| Content-Type: text/plain;
| charset="iso-8859-1"
| Content-Transfer-Encoding: 7bit
| X-Newsreader: Microsoft CDO for Windows 2000
| X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4910.0300
| Thread-Index: AcOGrgK9bqD2JBEKRhuJfZjHbJ8q5A==
| Newsgroups: microsoft.public.dotnet.framework.windowsforms
| Path: cpmsftngxa06.phx.gbl
| Xref: cpmsftngxa06.phx.gbl
microsoft.public.dotnet.framework.windowsforms:53399
| NNTP-Posting-Host: TK2MSFTNGXA14 10.40.1.166
| X-Tomcat-NG: microsoft.public.dotnet.framework.windowsforms
|
| Hi Ying-Shen Yu,
| These work around aren't good, because in case that has
| more than one form with TopMost property set true and with
| a datagrid, when the dataset changes the data, the form
| that owns the dataset always goes on top.
| I continue with the problem.
|
| >-----Mensagem original-----
| >Hi Mauricio,
| > Thanks for your kind help, we have noticed this
| problem and our
| >product team is investigating on it. It's ok to set the
| TopMost to true in
| >On_Paint, but maybe you can put it in On_Deactivate
| event, it will be
| >helpful to the performance of your program.
| >If it does not work using this way, please let me know.
| >Thanks for using Microsoft MSDN Newsgroup!
| >
| >
| >Best regards,
| >
| >Ying-Shen Yu [MSFT]
| >Microsoft Online Partner Support
| >Get Secure! - www.microsoft.com/security
| >
| >This posting is provided "AS IS" with no warranties and
| confers no rights.
| >You should not reply this mail directly, "Online" should
| be removed before
| >sending, Thanks!
| >
| >--------------------
| >| Content-Class: urn:content-classes:message
| >| From: "Mauricio Pires"
| <[email protected]>
| >| Sender: "Mauricio Pires"
| <[email protected]>
| >| References: <[email protected]>
| ><[email protected]>
| >| Subject: RE: Form Ont Top All Applications
| >| Date: Fri, 26 Sep 2003 07:04:52 -0700
| >| Lines: 72
| >| Message-ID: <[email protected]>
| >| MIME-Version: 1.0
| >| Content-Type: text/plain;
| >| charset="iso-8859-1"
| >| Content-Transfer-Encoding: 7bit
| >| X-Newsreader: Microsoft CDO for Windows 2000
| >| X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4910.0300
| >| Thread-Index: AcOENygGzC1995R8TPmW8NMATnz8ew==
| >| Newsgroups:
| microsoft.public.dotnet.framework.windowsforms
| >| Path: cpmsftngxa06.phx.gbl
| >| Xref: cpmsftngxa06.phx.gbl
| >microsoft.public.dotnet.framework.windowsforms:53206
| >| NNTP-Posting-Host: TK2MSFTNGXA08 10.40.1.160
| >| X-Tomcat-NG:
| microsoft.public.dotnet.framework.windowsforms
| >|
| >| Hi Ying-Shen Yu,
| >| I set the TopMost property to true in the On_Load event
| >| handler of my form. This work around doesn't always
| work
| >| because if you change some DataGrid property after the
| >| On_Load event, the form doesn't stay on top, so I set
| the
| >| TopMost to true in the On_Paint event handler of the
| >| DataGrid. I think that it's the best work around.
| >| Thank you very much for your attention and help.
| >|
| >| Do you know if has some manner to comunicate Microsoft
| >| about this problem?
| >|
| >|
| >| Best Regards,
| >|
| >| Mauricio Pires.
| >|
| >|
| >| >-----Mensagem original-----
| >| >Hi Mauricio,
| >| > It's a bit strange behaviour, but you may try set
| >| the Topmost property
| >| >to true in the On_Load event handler of your form.
| This
| >| work around works
| >| >on my system, if it doens't work for you, please let
| me
| >| know. Thanks!
| >| >
| >| >
| >| >Best regards,
| >| >
| >| >Ying-Shen Yu [MSFT]
| >| >Microsoft Online Partner Support
| >| >Get Secure! - www.microsoft.com/security
| >| >
| >| >This posting is provided "AS IS" with no warranties
| and
| >| confers no rights.
| >| >You should not reply this mail directly, "Online"
| should
| >| be removed before
| >| >sending, Thanks!
| >| >
| >| >--------------------
| >| >| Content-Class: urn:content-classes:message
| >| >| From: "Mauricio C. Pires"
| >| <[email protected]>
| >| >| Sender: "Mauricio C. Pires"
| >| <[email protected]>
| >| >| Subject: Form Ont Top All Applications
| >| >| Date: Thu, 25 Sep 2003 14:12:47 -0700
| >| >| Lines: 2
| >| >| Message-ID: <[email protected]>
| >| >| MIME-Version: 1.0
| >| >| Content-Type: text/plain;
| >| >| charset="iso-8859-1"
| >| >| Content-Transfer-Encoding: 7bit
| >| >| X-Newsreader: Microsoft CDO for Windows 2000
| >| >| X-MimeOLE: Produced By Microsoft MimeOLE
| V5.50.4910.0300
| >| >| Thread-Index: AcODqcUAVG8WC+GMQXWrm9PWg/Cqtg==
| >| >| Newsgroups:
| >| microsoft.public.dotnet.framework.windowsforms
| >| >| Path: cpmsftngxa06.phx.gbl
| >| >| Xref: cpmsftngxa06.phx.gbl
| >| >microsoft.public.dotnet.framework.windowsforms:53157
| >| >| NNTP-Posting-Host: TK2MSFTNGXS01 10.40.2.125
| >| >| X-Tomcat-NG:
| >| microsoft.public.dotnet.framework.windowsforms
| >| >|
| >| >| Someone know how to make a Form on top all
| applications?
| >| >| Tanks.
| >| >|
| >| >
| >| >.
| >| >
| >|
| >
| >.
| >
|
 
Hi Mauricio,
I'm really sorry for the long delay, I've been Out of Office for
several days.
After some researching, I think I got a work around.
here is the code snippet, we can try setting the WS_EX_TOPMOST style by
ourselves
using the SetWindowPos API, and set it when the Form deactivated.
If you still have problems on it, please be free to let me know.
Thanks!
<code>
[DllImport("user32.dll")]
public extern static int SetWindowPos(IntPtr hWnd,
IntPtr hWndInsertAfter,int X,int Y,int cx,int cy,uint uFlags);
private const int HWND_TOPMOST = -1;
private const uint SWP_NOOWNERZORDER = 0x0200;
private const uint SWP_NOREDRAW =0x0008;
private void makeTopMost()
{
if(SetWindowPos(this.Handle,(IntPtr)HWND_TOPMOST,this.Left,this.Top,
this.Width,this.Height,SWP_NOOWNERZORDER|SWP_NOREDRAW)
== 0)
{
System.Diagnostics.Debug.WriteLine("SetWindowPos error");
}
}
private void Form1_Deactivate(object sender, System.EventArgs e)
{
makeTopMost();
}
</code>


Best regards,

Ying-Shen Yu [MSFT]
Microsoft Online Partner Support
Get Secure! - www.microsoft.com/security

This posting is provided "AS IS" with no warranties and confers no rights.
You should not reply this mail directly, "Online" should be removed before
sending, Thanks!

--------------------
| X-Tomcat-ID: 265229212
| References: <[email protected]>
<[email protected]>
<[email protected]>
<[email protected]>
<[email protected]>
| MIME-Version: 1.0
| Content-Type: text/plain
| Content-Transfer-Encoding: 7bit
| From: (e-mail address removed) (Ying-Shen Yu[MSFT])
| Organization: Microsoft
| Date: Tue, 30 Sep 2003 11:50:33 GMT
| Subject: RE: Form Ont Top All Applications
| X-Tomcat-NG: microsoft.public.dotnet.framework.windowsforms
| Message-ID: <[email protected]>
| Newsgroups: microsoft.public.dotnet.framework.windowsforms
| Lines: 161
| Path: cpmsftngxa06.phx.gbl
| Xref: cpmsftngxa06.phx.gbl
microsoft.public.dotnet.framework.windowsforms:53443
| NNTP-Posting-Host: TOMCATIMPORT2 10.201.218.182
|
| Hi Mauricio,
| I'm researching on this issue, however because it's closly related to
| the internal implementation of the Datagrid class, I'm not sure if we can
| find a work around. Any way I'll try my best to look for it.
| If I get some work out, I'll update you as soon as possible.
| Thanks!
|
| Best regards,
|
| Ying-Shen Yu [MSFT]
| Microsoft Online Partner Support
| Get Secure! - www.microsoft.com/security
|
| This posting is provided "AS IS" with no warranties and confers no rights.
| You should not reply this mail directly, "Online" should be removed
before
| sending, Thanks!
|
| --------------------
| | Content-Class: urn:content-classes:message
| | From: "Mauricio Pires" <[email protected]>
| | Sender: "Mauricio Pires" <[email protected]>
| | References: <[email protected]>
| <[email protected]>
| <[email protected]>
| <[email protected]>
| | Subject: RE: Form Ont Top All Applications
| | Date: Mon, 29 Sep 2003 10:20:42 -0700
| | Lines: 144
| | Message-ID: <[email protected]>
| | MIME-Version: 1.0
| | Content-Type: text/plain;
| | charset="iso-8859-1"
| | Content-Transfer-Encoding: 7bit
| | X-Newsreader: Microsoft CDO for Windows 2000
| | X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4910.0300
| | Thread-Index: AcOGrgK9bqD2JBEKRhuJfZjHbJ8q5A==
| | Newsgroups: microsoft.public.dotnet.framework.windowsforms
| | Path: cpmsftngxa06.phx.gbl
| | Xref: cpmsftngxa06.phx.gbl
| microsoft.public.dotnet.framework.windowsforms:53399
| | NNTP-Posting-Host: TK2MSFTNGXA14 10.40.1.166
| | X-Tomcat-NG: microsoft.public.dotnet.framework.windowsforms
| |
| | Hi Ying-Shen Yu,
| | These work around aren't good, because in case that has
| | more than one form with TopMost property set true and with
| | a datagrid, when the dataset changes the data, the form
| | that owns the dataset always goes on top.
| | I continue with the problem.
| |
| | >-----Mensagem original-----
| | >Hi Mauricio,
| | > Thanks for your kind help, we have noticed this
| | problem and our
| | >product team is investigating on it. It's ok to set the
| | TopMost to true in
| | >On_Paint, but maybe you can put it in On_Deactivate
| | event, it will be
| | >helpful to the performance of your program.
| | >If it does not work using this way, please let me know.
| | >Thanks for using Microsoft MSDN Newsgroup!
| | >
| | >
| | >Best regards,
| | >
| | >Ying-Shen Yu [MSFT]
| | >Microsoft Online Partner Support
| | >Get Secure! - www.microsoft.com/security
| | >
| | >This posting is provided "AS IS" with no warranties and
| | confers no rights.
| | >You should not reply this mail directly, "Online" should
| | be removed before
| | >sending, Thanks!
| | >
| | >--------------------
| | >| Content-Class: urn:content-classes:message
| | >| From: "Mauricio Pires"
| | <[email protected]>
| | >| Sender: "Mauricio Pires"
| | <[email protected]>
| | >| References: <[email protected]>
| | ><[email protected]>
| | >| Subject: RE: Form Ont Top All Applications
| | >| Date: Fri, 26 Sep 2003 07:04:52 -0700
| | >| Lines: 72
| | >| Message-ID: <[email protected]>
| | >| MIME-Version: 1.0
| | >| Content-Type: text/plain;
| | >| charset="iso-8859-1"
| | >| Content-Transfer-Encoding: 7bit
| | >| X-Newsreader: Microsoft CDO for Windows 2000
| | >| X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4910.0300
| | >| Thread-Index: AcOENygGzC1995R8TPmW8NMATnz8ew==
| | >| Newsgroups:
| | microsoft.public.dotnet.framework.windowsforms
| | >| Path: cpmsftngxa06.phx.gbl
| | >| Xref: cpmsftngxa06.phx.gbl
| | >microsoft.public.dotnet.framework.windowsforms:53206
| | >| NNTP-Posting-Host: TK2MSFTNGXA08 10.40.1.160
| | >| X-Tomcat-NG:
| | microsoft.public.dotnet.framework.windowsforms
| | >|
| | >| Hi Ying-Shen Yu,
| | >| I set the TopMost property to true in the On_Load event
| | >| handler of my form. This work around doesn't always
| | work
| | >| because if you change some DataGrid property after the
| | >| On_Load event, the form doesn't stay on top, so I set
| | the
| | >| TopMost to true in the On_Paint event handler of the
| | >| DataGrid. I think that it's the best work around.
| | >| Thank you very much for your attention and help.
| | >|
| | >| Do you know if has some manner to comunicate Microsoft
| | >| about this problem?
| | >|
| | >|
| | >| Best Regards,
| | >|
| | >| Mauricio Pires.
| | >|
| | >|
| | >| >-----Mensagem original-----
| | >| >Hi Mauricio,
| | >| > It's a bit strange behaviour, but you may try set
| | >| the Topmost property
| | >| >to true in the On_Load event handler of your form.
| | This
| | >| work around works
| | >| >on my system, if it doens't work for you, please let
| | me
| | >| know. Thanks!
| | >| >
| | >| >
| | >| >Best regards,
| | >| >
| | >| >Ying-Shen Yu [MSFT]
| | >| >Microsoft Online Partner Support
| | >| >Get Secure! - www.microsoft.com/security
| | >| >
| | >| >This posting is provided "AS IS" with no warranties
| | and
| | >| confers no rights.
| | >| >You should not reply this mail directly, "Online"
| | should
| | >| be removed before
| | >| >sending, Thanks!
| | >| >
| | >| >--------------------
| | >| >| Content-Class: urn:content-classes:message
| | >| >| From: "Mauricio C. Pires"
| | >| <[email protected]>
| | >| >| Sender: "Mauricio C. Pires"
| | >| <[email protected]>
| | >| >| Subject: Form Ont Top All Applications
| | >| >| Date: Thu, 25 Sep 2003 14:12:47 -0700
| | >| >| Lines: 2
| | >| >| Message-ID: <[email protected]>
| | >| >| MIME-Version: 1.0
| | >| >| Content-Type: text/plain;
| | >| >| charset="iso-8859-1"
| | >| >| Content-Transfer-Encoding: 7bit
| | >| >| X-Newsreader: Microsoft CDO for Windows 2000
| | >| >| X-MimeOLE: Produced By Microsoft MimeOLE
| | V5.50.4910.0300
| | >| >| Thread-Index: AcODqcUAVG8WC+GMQXWrm9PWg/Cqtg==
| | >| >| Newsgroups:
| | >| microsoft.public.dotnet.framework.windowsforms
| | >| >| Path: cpmsftngxa06.phx.gbl
| | >| >| Xref: cpmsftngxa06.phx.gbl
| | >| >microsoft.public.dotnet.framework.windowsforms:53157
| | >| >| NNTP-Posting-Host: TK2MSFTNGXS01 10.40.2.125
| | >| >| X-Tomcat-NG:
| | >| microsoft.public.dotnet.framework.windowsforms
| | >| >|
| | >| >| Someone know how to make a Form on top all
| | applications?
| | >| >| Tanks.
| | >| >|
| | >| >
| | >| >.
| | >| >
| | >|
| | >
| | >.
| | >
| |
|
|
 
Ying-Shen Yu,
The effect of SetWindowPos() is the same of TopMost=true.
I still have a problem when there are two or more top most
forms with datagrid. If you click on the datagrid of one
of background forms, it doesn't go on top but gets the
focus. If you click on the form but not on the datagrid,
it's ok.
Thanks,
Mauricio C. Pires
-----Mensagem original-----
Hi Mauricio,
I'm really sorry for the long delay, I've been Out of Office for
several days.
After some researching, I think I got a work around.
here is the code snippet, we can try setting the WS_EX_TOPMOST style by
ourselves
using the SetWindowPos API, and set it when the Form deactivated.
If you still have problems on it, please be free to let me know.
Thanks!
<code>
[DllImport("user32.dll")]
public extern static int SetWindowPos(IntPtr hWnd,
IntPtr hWndInsertAfter,int X,int Y,int cx,int cy,uint uFlags);
private const int HWND_TOPMOST = -1;
private const uint SWP_NOOWNERZORDER = 0x0200;
private const uint SWP_NOREDRAW =0x0008;
private void makeTopMost()
{
if(SetWindowPos(this.Handle,(IntPtr) HWND_TOPMOST,this.Left,this.Top,this.Width,this.Height,SWP_NOOWNERZORDER|SWP_NOREDRAW)
== 0)
{
System.Diagnostics.Debug.WriteLine ("SetWindowPos error");
}
}
private void Form1_Deactivate(object sender, System.EventArgs e)
{
makeTopMost();
}
</code>


Best regards,

Ying-Shen Yu [MSFT]
Microsoft Online Partner Support
Get Secure! - www.microsoft.com/security

This posting is provided "AS IS" with no warranties and confers no rights.
You should not reply this mail directly, "Online" should be removed before
sending, Thanks!

--------------------
| X-Tomcat-ID: 265229212
| References: <[email protected]>
<[email protected]>
<[email protected]>
<[email protected]>
<[email protected]>
| MIME-Version: 1.0
| Content-Type: text/plain
| Content-Transfer-Encoding: 7bit
| From: (e-mail address removed) (Ying-Shen Yu[MSFT])
| Organization: Microsoft
| Date: Tue, 30 Sep 2003 11:50:33 GMT
| Subject: RE: Form Ont Top All Applications
| X-Tomcat-NG: microsoft.public.dotnet.framework.windowsforms
| Message-ID: <[email protected]>
| Newsgroups: microsoft.public.dotnet.framework.windowsforms
| Lines: 161
| Path: cpmsftngxa06.phx.gbl
| Xref: cpmsftngxa06.phx.gbl
microsoft.public.dotnet.framework.windowsforms:53443
| NNTP-Posting-Host: TOMCATIMPORT2 10.201.218.182
|
| Hi Mauricio,
| I'm researching on this issue, however because it's closly related to
| the internal implementation of the Datagrid class, I'm not sure if we can
| find a work around. Any way I'll try my best to look for it.
| If I get some work out, I'll update you as soon as possible.
| Thanks!
|
| Best regards,
|
| Ying-Shen Yu [MSFT]
| Microsoft Online Partner Support
| Get Secure! - www.microsoft.com/security
|
| This posting is provided "AS IS" with no warranties and confers no rights.
| You should not reply this mail directly, "Online" should be removed
before
| sending, Thanks!
|
| --------------------
| | Content-Class: urn:content-classes:message
| | From: "Mauricio Pires"
| | Sender: "Mauricio Pires"
| | References: <[email protected]>
| <[email protected]>
| <[email protected]>
| <[email protected]>
| | Subject: RE: Form Ont Top All Applications
| | Date: Mon, 29 Sep 2003 10:20:42 -0700
| | Lines: 144
| | Message-ID: <[email protected]>
| | MIME-Version: 1.0
| | Content-Type: text/plain;
| | charset="iso-8859-1"
| | Content-Transfer-Encoding: 7bit
| | X-Newsreader: Microsoft CDO for Windows 2000
| | X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4910.0300
| | Thread-Index: AcOGrgK9bqD2JBEKRhuJfZjHbJ8q5A==
| | Newsgroups: microsoft.public.dotnet.framework.windowsforms
| | Path: cpmsftngxa06.phx.gbl
| | Xref: cpmsftngxa06.phx.gbl
| microsoft.public.dotnet.framework.windowsforms:53399
| | NNTP-Posting-Host: TK2MSFTNGXA14 10.40.1.166
| | X-Tomcat-NG: microsoft.public.dotnet.framework.windowsforms
| |
| | Hi Ying-Shen Yu,
| | These work around aren't good, because in case that has
| | more than one form with TopMost property set true and with
| | a datagrid, when the dataset changes the data, the form
| | that owns the dataset always goes on top.
| | I continue with the problem.
| |
| | >-----Mensagem original-----
| | >Hi Mauricio,
| | > Thanks for your kind help, we have noticed this
| | problem and our
| | >product team is investigating on it. It's ok to set the
| | TopMost to true in
| | >On_Paint, but maybe you can put it in On_Deactivate
| | event, it will be
| | >helpful to the performance of your program.
| | >If it does not work using this way, please let me know.
| | >Thanks for using Microsoft MSDN Newsgroup!
| | >
| | >
| | >Best regards,
| | >
| | >Ying-Shen Yu [MSFT]
| | >Microsoft Online Partner Support
| | >Get Secure! - www.microsoft.com/security
| | >
| | >This posting is provided "AS IS" with no warranties and
| | confers no rights.
| | >You should not reply this mail directly, "Online" should
| | be removed before
| | >sending, Thanks!
| | >
| | >--------------------
| | >| Content-Class: urn:content-classes:message
| | >| From: "Mauricio Pires"
| | <[email protected]>
| | >| Sender: "Mauricio Pires"
| | <[email protected]>
| | >| References: <003201c383a9$c5002aa0 [email protected]>
| | ><[email protected]>
| | >| Subject: RE: Form Ont Top All Applications
| | >| Date: Fri, 26 Sep 2003 07:04:52 -0700
| | >| Lines: 72
| | >| Message-ID: <0df501c38437$2806ae20 [email protected]>
| | >| MIME-Version: 1.0
| | >| Content-Type: text/plain;
| | >| charset="iso-8859-1"
| | >| Content-Transfer-Encoding: 7bit
| | >| X-Newsreader: Microsoft CDO for Windows 2000
| | >| X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4910.0300
| | >| Thread-Index: AcOENygGzC1995R8TPmW8NMATnz8ew==
| | >| Newsgroups:
| | microsoft.public.dotnet.framework.windowsforms
| | >| Path: cpmsftngxa06.phx.gbl
| | >| Xref: cpmsftngxa06.phx.gbl
| | >microsoft.public.dotnet.framework.windowsforms:53206
| | >| NNTP-Posting-Host: TK2MSFTNGXA08 10.40.1.160
| | >| X-Tomcat-NG:
| | microsoft.public.dotnet.framework.windowsforms
| | >|
| | >| Hi Ying-Shen Yu,
| | >| I set the TopMost property to true in the On_Load event
| | >| handler of my form. This work around doesn't always
| | work
| | >| because if you change some DataGrid property after the
| | >| On_Load event, the form doesn't stay on top, so I set
| | the
| | >| TopMost to true in the On_Paint event handler of the
| | >| DataGrid. I think that it's the best work around.
| | >| Thank you very much for your attention and help.
| | >|
| | >| Do you know if has some manner to comunicate Microsoft
| | >| about this problem?
| | >|
| | >|
| | >| Best Regards,
| | >|
| | >| Mauricio Pires.
| | >|
| | >|
| | >| >-----Mensagem original-----
| | >| >Hi Mauricio,
| | >| > It's a bit strange behaviour, but you may try set
| | >| the Topmost property
| | >| >to true in the On_Load event handler of your form.
| | This
| | >| work around works
| | >| >on my system, if it doens't work for you, please let
| | me
| | >| know. Thanks!
| | >| >
| | >| >
| | >| >Best regards,
| | >| >
| | >| >Ying-Shen Yu [MSFT]
| | >| >Microsoft Online Partner Support
| | >| >Get Secure! - www.microsoft.com/security
| | >| >
| | >| >This posting is provided "AS IS" with no warranties
| | and
| | >| confers no rights.
| | >| >You should not reply this mail directly, "Online"
| | should
| | >| be removed before
| | >| >sending, Thanks!
| | >| >
| | >| >--------------------
| | >| >| Content-Class: urn:content-classes:message
| | >| >| From: "Mauricio C. Pires"
| | >| <[email protected]>
| | >| >| Sender: "Mauricio C. Pires"
| | >| <[email protected]>
| | >| >| Subject: Form Ont Top All Applications
| | >| >| Date: Thu, 25 Sep 2003 14:12:47 -0700
| | >| >| Lines: 2
| | >| >| Message-ID: <003201c383a9$c5002aa0 [email protected]>
| | >| >| MIME-Version: 1.0
| | >| >| Content-Type: text/plain;
| | >| >| charset="iso-8859-1"
| | >| >| Content-Transfer-Encoding: 7bit
| | >| >| X-Newsreader: Microsoft CDO for Windows 2000
| | >| >| X-MimeOLE: Produced By Microsoft MimeOLE
| | V5.50.4910.0300
| | >| >| Thread-Index: AcODqcUAVG8WC+GMQXWrm9PWg/Cqtg==
| | >| >| Newsgroups:
| | >| microsoft.public.dotnet.framework.windowsforms
| | >| >| Path: cpmsftngxa06.phx.gbl
| | >| >| Xref: cpmsftngxa06.phx.gbl
| | >|
microsoft.public.dotnet.framework.windowsforms:53157
| | >| >| NNTP-Posting-Host: TK2MSFTNGXS01 10.40.2.125
| | >| >| X-Tomcat-NG:
| | >| microsoft.public.dotnet.framework.windowsforms
| | >| >|
| | >| >| Someone know how to make a Form on top all
| | applications?
| | >| >| Tanks.
| | >| >|
| | >| >
| | >| >.
| | >| >
| | >|
| | >
| | >.
| | >
| |
|
|

.
 
Hi Mauricio,
After a long research, I think we can't find a work around to this problem
when there are not only one top most window.

The cause of the problem is the datagrid removes the WS_EX_TOPMOST style
flag int its paint event. I believe it uses the Windows API SetWindowPos
to implement this, which will take effect instantly, sending the normal
window back behind the other TopMost windows. And our workaround could only
try to re-add the flag as soon as possible to keep it topmost, and
quickest way is putting the TopMost = true in the Datagrid.Paint event.
That's why you see the window went top and sometime flicking when the
dataset changed.

The bug seems really wierd when there are more than two topmost windows,
I'll write to our developer team to let them know. As for now, I'm regret
to say we are unable to provide a work around, maybe you should try some
3rd party datagrid.

If you still have questions on this issue, please let me know.
Thanks!


Best regards,

Ying-Shen Yu [MSFT]
Microsoft Online Partner Support
Get Secure! - www.microsoft.com/security

This posting is provided "AS IS" with no warranties and confers no rights.
You should not reply this mail directly, "Online" should be removed before
sending, Thanks!

--------------------
| Content-Class: urn:content-classes:message
| From: "Mauricio Pires" <[email protected]>
| Sender: "Mauricio Pires" <[email protected]>
| References: <[email protected]>
<[email protected]>
<[email protected]>
<[email protected]>
<[email protected]>
<[email protected]>
<486y#[email protected]>
| Subject: RE: Form Ont Top All Applications
| Date: Tue, 7 Oct 2003 08:11:42 -0700
| Lines: 316
| Message-ID: <[email protected]>
| MIME-Version: 1.0
| Content-Type: text/plain;
| charset="iso-8859-1"
| Content-Transfer-Encoding: 7bit
| X-Newsreader: Microsoft CDO for Windows 2000
| Thread-Index: AcOM5VCODBOTv6V2Tyaf9AqAcLR7kw==
| X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4910.0300
| Newsgroups: microsoft.public.dotnet.framework.windowsforms
| Path: cpmsftngxa06.phx.gbl
| Xref: cpmsftngxa06.phx.gbl
microsoft.public.dotnet.framework.windowsforms:53885
| NNTP-Posting-Host: TK2MSFTNGXA12 10.40.1.164
| X-Tomcat-NG: microsoft.public.dotnet.framework.windowsforms
|
| Ying-Shen Yu,
| The effect of SetWindowPos() is the same of TopMost=true.
| I still have a problem when there are two or more top most
| forms with datagrid. If you click on the datagrid of one
| of background forms, it doesn't go on top but gets the
| focus. If you click on the form but not on the datagrid,
| it's ok.
| Thanks,
| Mauricio C. Pires
|
| >-----Mensagem original-----
| >Hi Mauricio,
| > I'm really sorry for the long delay, I've been Out of
| Office for
| >several days.
| >After some researching, I think I got a work around.
| >here is the code snippet, we can try setting the
| WS_EX_TOPMOST style by
| >ourselves
| >using the SetWindowPos API, and set it when the Form
| deactivated.
| >If you still have problems on it, please be free to let
| me know.
| >Thanks!
| ><code>
| >[DllImport("user32.dll")]
| >public extern static int SetWindowPos(IntPtr hWnd,
| > IntPtr hWndInsertAfter,int X,int Y,int cx,int
| cy,uint uFlags);
| >private const int HWND_TOPMOST = -1;
| >private const uint SWP_NOOWNERZORDER = 0x0200;
| >private const uint SWP_NOREDRAW =0x0008;
| >private void makeTopMost()
| >{
| > if(SetWindowPos(this.Handle,(IntPtr)
| HWND_TOPMOST,this.Left,this.Top,
| >
| this.Width,this.Height,SWP_NOOWNERZORDER|SWP_NOREDRAW)
| >== 0)
| > {
| > System.Diagnostics.Debug.WriteLine
| ("SetWindowPos error");
| > }
| >}
| >private void Form1_Deactivate(object sender,
| System.EventArgs e)
| >{
| > makeTopMost();
| >}
| ></code>
| >
| >
| >Best regards,
| >
| >Ying-Shen Yu [MSFT]
| >Microsoft Online Partner Support
| >Get Secure! - www.microsoft.com/security
| >
| >This posting is provided "AS IS" with no warranties and
| confers no rights.
| >You should not reply this mail directly, "Online" should
| be removed before
| >sending, Thanks!
| >
| >--------------------
| >| X-Tomcat-ID: 265229212
| >| References: <[email protected]>
| ><[email protected]>
| ><[email protected]>
| ><[email protected]>
| ><[email protected]>
| >| MIME-Version: 1.0
| >| Content-Type: text/plain
| >| Content-Transfer-Encoding: 7bit
| >| From: (e-mail address removed) (Ying-Shen Yu[MSFT])
| >| Organization: Microsoft
| >| Date: Tue, 30 Sep 2003 11:50:33 GMT
| >| Subject: RE: Form Ont Top All Applications
| >| X-Tomcat-NG:
| microsoft.public.dotnet.framework.windowsforms
| >| Message-ID: <[email protected]>
| >| Newsgroups:
| microsoft.public.dotnet.framework.windowsforms
| >| Lines: 161
| >| Path: cpmsftngxa06.phx.gbl
| >| Xref: cpmsftngxa06.phx.gbl
| >microsoft.public.dotnet.framework.windowsforms:53443
| >| NNTP-Posting-Host: TOMCATIMPORT2 10.201.218.182
| >|
| >| Hi Mauricio,
| >| I'm researching on this issue, however because it's
| closly related to
| >| the internal implementation of the Datagrid class, I'm
| not sure if we can
| >| find a work around. Any way I'll try my best to look
| for it.
| >| If I get some work out, I'll update you as soon as
| possible.
| >| Thanks!
| >|
| >| Best regards,
| >|
| >| Ying-Shen Yu [MSFT]
| >| Microsoft Online Partner Support
| >| Get Secure! - www.microsoft.com/security
| >|
| >| This posting is provided "AS IS" with no warranties and
| confers no rights.
| >| You should not reply this mail directly, "Online"
| should be removed
| >before
| >| sending, Thanks!
| >|
| >| --------------------
| >| | Content-Class: urn:content-classes:message
| >| | From: "Mauricio Pires"
| <[email protected]>
| >| | Sender: "Mauricio Pires"
| <[email protected]>
| >| | References: <[email protected]>
| >| <[email protected]>
| >| <[email protected]>
| >| <[email protected]>
| >| | Subject: RE: Form Ont Top All Applications
| >| | Date: Mon, 29 Sep 2003 10:20:42 -0700
| >| | Lines: 144
| >| | Message-ID: <[email protected]>
| >| | MIME-Version: 1.0
| >| | Content-Type: text/plain;
| >| | charset="iso-8859-1"
| >| | Content-Transfer-Encoding: 7bit
| >| | X-Newsreader: Microsoft CDO for Windows 2000
| >| | X-MimeOLE: Produced By Microsoft MimeOLE
| V5.50.4910.0300
| >| | Thread-Index: AcOGrgK9bqD2JBEKRhuJfZjHbJ8q5A==
| >| | Newsgroups:
| microsoft.public.dotnet.framework.windowsforms
| >| | Path: cpmsftngxa06.phx.gbl
| >| | Xref: cpmsftngxa06.phx.gbl
| >| microsoft.public.dotnet.framework.windowsforms:53399
| >| | NNTP-Posting-Host: TK2MSFTNGXA14 10.40.1.166
| >| | X-Tomcat-NG:
| microsoft.public.dotnet.framework.windowsforms
| >| |
| >| | Hi Ying-Shen Yu,
| >| | These work around aren't good, because in case that
| has
| >| | more than one form with TopMost property set true and
| with
| >| | a datagrid, when the dataset changes the data, the
| form
| >| | that owns the dataset always goes on top.
| >| | I continue with the problem.
| >| |
| >| | >-----Mensagem original-----
| >| | >Hi Mauricio,
| >| | > Thanks for your kind help, we have noticed this
| >| | problem and our
| >| | >product team is investigating on it. It's ok to set
| the
| >| | TopMost to true in
| >| | >On_Paint, but maybe you can put it in On_Deactivate
| >| | event, it will be
| >| | >helpful to the performance of your program.
| >| | >If it does not work using this way, please let me
| know.
| >| | >Thanks for using Microsoft MSDN Newsgroup!
| >| | >
| >| | >
| >| | >Best regards,
| >| | >
| >| | >Ying-Shen Yu [MSFT]
| >| | >Microsoft Online Partner Support
| >| | >Get Secure! - www.microsoft.com/security
| >| | >
| >| | >This posting is provided "AS IS" with no warranties
| and
| >| | confers no rights.
| >| | >You should not reply this mail directly, "Online"
| should
| >| | be removed before
| >| | >sending, Thanks!
| >| | >
| >| | >--------------------
| >| | >| Content-Class: urn:content-classes:message
| >| | >| From: "Mauricio Pires"
| >| | <[email protected]>
| >| | >| Sender: "Mauricio Pires"
| >| | <[email protected]>
| >| | >| References: <003201c383a9$c5002aa0
| [email protected]>
| >| | ><[email protected]>
| >| | >| Subject: RE: Form Ont Top All Applications
| >| | >| Date: Fri, 26 Sep 2003 07:04:52 -0700
| >| | >| Lines: 72
| >| | >| Message-ID: <0df501c38437$2806ae20
| [email protected]>
| >| | >| MIME-Version: 1.0
| >| | >| Content-Type: text/plain;
| >| | >| charset="iso-8859-1"
| >| | >| Content-Transfer-Encoding: 7bit
| >| | >| X-Newsreader: Microsoft CDO for Windows 2000
| >| | >| X-MimeOLE: Produced By Microsoft MimeOLE
| V5.50.4910.0300
| >| | >| Thread-Index: AcOENygGzC1995R8TPmW8NMATnz8ew==
| >| | >| Newsgroups:
| >| | microsoft.public.dotnet.framework.windowsforms
| >| | >| Path: cpmsftngxa06.phx.gbl
| >| | >| Xref: cpmsftngxa06.phx.gbl
| >| | >microsoft.public.dotnet.framework.windowsforms:53206
| >| | >| NNTP-Posting-Host: TK2MSFTNGXA08 10.40.1.160
| >| | >| X-Tomcat-NG:
| >| | microsoft.public.dotnet.framework.windowsforms
| >| | >|
| >| | >| Hi Ying-Shen Yu,
| >| | >| I set the TopMost property to true in the On_Load
| event
| >| | >| handler of my form. This work around doesn't
| always
| >| | work
| >| | >| because if you change some DataGrid property after
| the
| >| | >| On_Load event, the form doesn't stay on top, so I
| set
| >| | the
| >| | >| TopMost to true in the On_Paint event handler of
| the
| >| | >| DataGrid. I think that it's the best work around.
| >| | >| Thank you very much for your attention and help.
| >| | >|
| >| | >| Do you know if has some manner to comunicate
| Microsoft
| >| | >| about this problem?
| >| | >|
| >| | >|
| >| | >| Best Regards,
| >| | >|
| >| | >| Mauricio Pires.
| >| | >|
| >| | >|
| >| | >| >-----Mensagem original-----
| >| | >| >Hi Mauricio,
| >| | >| > It's a bit strange behaviour, but you may
| try set
| >| | >| the Topmost property
| >| | >| >to true in the On_Load event handler of your
| form.
| >| | This
| >| | >| work around works
| >| | >| >on my system, if it doens't work for you, please
| let
| >| | me
| >| | >| know. Thanks!
| >| | >| >
| >| | >| >
| >| | >| >Best regards,
| >| | >| >
| >| | >| >Ying-Shen Yu [MSFT]
| >| | >| >Microsoft Online Partner Support
| >| | >| >Get Secure! - www.microsoft.com/security
| >| | >| >
| >| | >| >This posting is provided "AS IS" with no
| warranties
| >| | and
| >| | >| confers no rights.
| >| | >| >You should not reply this mail directly, "Online"
| >| | should
| >| | >| be removed before
| >| | >| >sending, Thanks!
| >| | >| >
| >| | >| >--------------------
| >| | >| >| Content-Class: urn:content-classes:message
| >| | >| >| From: "Mauricio C. Pires"
| >| | >| <[email protected]>
| >| | >| >| Sender: "Mauricio C. Pires"
| >| | >| <[email protected]>
| >| | >| >| Subject: Form Ont Top All Applications
| >| | >| >| Date: Thu, 25 Sep 2003 14:12:47 -0700
| >| | >| >| Lines: 2
| >| | >| >| Message-ID: <003201c383a9$c5002aa0
| [email protected]>
| >| | >| >| MIME-Version: 1.0
| >| | >| >| Content-Type: text/plain;
| >| | >| >| charset="iso-8859-1"
| >| | >| >| Content-Transfer-Encoding: 7bit
| >| | >| >| X-Newsreader: Microsoft CDO for Windows 2000
| >| | >| >| X-MimeOLE: Produced By Microsoft MimeOLE
| >| | V5.50.4910.0300
| >| | >| >| Thread-Index: AcODqcUAVG8WC+GMQXWrm9PWg/Cqtg==
| >| | >| >| Newsgroups:
| >| | >| microsoft.public.dotnet.framework.windowsforms
| >| | >| >| Path: cpmsftngxa06.phx.gbl
| >| | >| >| Xref: cpmsftngxa06.phx.gbl
| >| | >|
| >microsoft.public.dotnet.framework.windowsforms:53157
| >| | >| >| NNTP-Posting-Host: TK2MSFTNGXS01 10.40.2.125
| >| | >| >| X-Tomcat-NG:
| >| | >| microsoft.public.dotnet.framework.windowsforms
| >| | >| >|
| >| | >| >| Someone know how to make a Form on top all
| >| | applications?
| >| | >| >| Tanks.
| >| | >| >|
| >| | >| >
| >| | >| >.
| >| | >| >
| >| | >|
| >| | >
| >| | >.
| >| | >
| >| |
| >|
| >|
| >
| >.
| >
|
 
Hi Mauricio,
If you are only changing the dataset in programming way, you may try
working around the window goes on top when dataset changes problem in this
way.
declare a boolean variable ,
bool needSetTopMost = true;
check the bool before setting TopMost = true in datagrid.Paint.
then set the needSetTopMost to false before changing the dataset and reset
it to true after changed.
However, the flicking problem couldn't be fixed.
Thanks!


Best regards,

Ying-Shen Yu [MSFT]
Microsoft Online Partner Support
Get Secure! - www.microsoft.com/security

This posting is provided "AS IS" with no warranties and confers no rights.
You should not reply this mail directly, "Online" should be removed before
sending, Thanks!

--------------------
| X-Tomcat-ID: 277664677
| References: <[email protected]>
<[email protected]>
<[email protected]>
<[email protected]>
<[email protected]>
<[email protected]>
<486y#[email protected]>
<[email protected]>
| MIME-Version: 1.0
| Content-Type: text/plain
| Content-Transfer-Encoding: 7bit
| From: (e-mail address removed) (Ying-Shen Yu[MSFT])
| Organization: Microsoft
| Date: Thu, 09 Oct 2003 12:22:47 GMT
| Subject: RE: Form Ont Top All Applications
| X-Tomcat-NG: microsoft.public.dotnet.framework.windowsforms
| Message-ID: <[email protected]>
| Newsgroups: microsoft.public.dotnet.framework.windowsforms
| Lines: 323
| Path: cpmsftngxa06.phx.gbl
| Xref: cpmsftngxa06.phx.gbl
microsoft.public.dotnet.framework.windowsforms:54051
| NNTP-Posting-Host: TOMCATIMPORT1 10.201.218.122
|
| Hi Mauricio,
| After a long research, I think we can't find a work around to this
problem
| when there are not only one top most window.
|
| The cause of the problem is the datagrid removes the WS_EX_TOPMOST style
| flag int its paint event. I believe it uses the Windows API SetWindowPos
| to implement this, which will take effect instantly, sending the normal
| window back behind the other TopMost windows. And our workaround could
only
| try to re-add the flag as soon as possible to keep it topmost, and
| quickest way is putting the TopMost = true in the Datagrid.Paint event.
| That's why you see the window went top and sometime flicking when the
| dataset changed.
|
| The bug seems really wierd when there are more than two topmost windows,
| I'll write to our developer team to let them know. As for now, I'm regret
| to say we are unable to provide a work around, maybe you should try some
| 3rd party datagrid.
|
| If you still have questions on this issue, please let me know.
| Thanks!
|
|
| Best regards,
|
| Ying-Shen Yu [MSFT]
| Microsoft Online Partner Support
| Get Secure! - www.microsoft.com/security
|
| This posting is provided "AS IS" with no warranties and confers no rights.
| You should not reply this mail directly, "Online" should be removed
before
| sending, Thanks!
|
| --------------------
| | Content-Class: urn:content-classes:message
| | From: "Mauricio Pires" <[email protected]>
| | Sender: "Mauricio Pires" <[email protected]>
| | References: <[email protected]>
| <[email protected]>
| <[email protected]>
| <[email protected]>
| <[email protected]>
| <[email protected]>
| <486y#[email protected]>
| | Subject: RE: Form Ont Top All Applications
| | Date: Tue, 7 Oct 2003 08:11:42 -0700
| | Lines: 316
| | Message-ID: <[email protected]>
| | MIME-Version: 1.0
| | Content-Type: text/plain;
| | charset="iso-8859-1"
| | Content-Transfer-Encoding: 7bit
| | X-Newsreader: Microsoft CDO for Windows 2000
| | Thread-Index: AcOM5VCODBOTv6V2Tyaf9AqAcLR7kw==
| | X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4910.0300
| | Newsgroups: microsoft.public.dotnet.framework.windowsforms
| | Path: cpmsftngxa06.phx.gbl
| | Xref: cpmsftngxa06.phx.gbl
| microsoft.public.dotnet.framework.windowsforms:53885
| | NNTP-Posting-Host: TK2MSFTNGXA12 10.40.1.164
| | X-Tomcat-NG: microsoft.public.dotnet.framework.windowsforms
| |
| | Ying-Shen Yu,
| | The effect of SetWindowPos() is the same of TopMost=true.
| | I still have a problem when there are two or more top most
| | forms with datagrid. If you click on the datagrid of one
| | of background forms, it doesn't go on top but gets the
| | focus. If you click on the form but not on the datagrid,
| | it's ok.
| | Thanks,
| | Mauricio C. Pires
| |
| | >-----Mensagem original-----
| | >Hi Mauricio,
| | > I'm really sorry for the long delay, I've been Out of
| | Office for
| | >several days.
| | >After some researching, I think I got a work around.
| | >here is the code snippet, we can try setting the
| | WS_EX_TOPMOST style by
| | >ourselves
| | >using the SetWindowPos API, and set it when the Form
| | deactivated.
| | >If you still have problems on it, please be free to let
| | me know.
| | >Thanks!
| | ><code>
| | >[DllImport("user32.dll")]
| | >public extern static int SetWindowPos(IntPtr hWnd,
| | > IntPtr hWndInsertAfter,int X,int Y,int cx,int
| | cy,uint uFlags);
| | >private const int HWND_TOPMOST = -1;
| | >private const uint SWP_NOOWNERZORDER = 0x0200;
| | >private const uint SWP_NOREDRAW =0x0008;
| | >private void makeTopMost()
| | >{
| | > if(SetWindowPos(this.Handle,(IntPtr)
| | HWND_TOPMOST,this.Left,this.Top,
| | >
| | this.Width,this.Height,SWP_NOOWNERZORDER|SWP_NOREDRAW)
| | >== 0)
| | > {
| | > System.Diagnostics.Debug.WriteLine
| | ("SetWindowPos error");
| | > }
| | >}
| | >private void Form1_Deactivate(object sender,
| | System.EventArgs e)
| | >{
| | > makeTopMost();
| | >}
| | ></code>
| | >
| | >
| | >Best regards,
| | >
| | >Ying-Shen Yu [MSFT]
| | >Microsoft Online Partner Support
| | >Get Secure! - www.microsoft.com/security
| | >
| | >This posting is provided "AS IS" with no warranties and
| | confers no rights.
| | >You should not reply this mail directly, "Online" should
| | be removed before
| | >sending, Thanks!
| | >
| | >--------------------
| | >| X-Tomcat-ID: 265229212
| | >| References: <[email protected]>
| | ><[email protected]>
| | ><[email protected]>
| | ><[email protected]>
| | ><[email protected]>
| | >| MIME-Version: 1.0
| | >| Content-Type: text/plain
| | >| Content-Transfer-Encoding: 7bit
| | >| From: (e-mail address removed) (Ying-Shen Yu[MSFT])
| | >| Organization: Microsoft
| | >| Date: Tue, 30 Sep 2003 11:50:33 GMT
| | >| Subject: RE: Form Ont Top All Applications
| | >| X-Tomcat-NG:
| | microsoft.public.dotnet.framework.windowsforms
| | >| Message-ID: <[email protected]>
| | >| Newsgroups:
| | microsoft.public.dotnet.framework.windowsforms
| | >| Lines: 161
| | >| Path: cpmsftngxa06.phx.gbl
| | >| Xref: cpmsftngxa06.phx.gbl
| | >microsoft.public.dotnet.framework.windowsforms:53443
| | >| NNTP-Posting-Host: TOMCATIMPORT2 10.201.218.182
| | >|
| | >| Hi Mauricio,
| | >| I'm researching on this issue, however because it's
| | closly related to
| | >| the internal implementation of the Datagrid class, I'm
| | not sure if we can
| | >| find a work around. Any way I'll try my best to look
| | for it.
| | >| If I get some work out, I'll update you as soon as
| | possible.
| | >| Thanks!
| | >|
| | >| Best regards,
| | >|
| | >| Ying-Shen Yu [MSFT]
| | >| Microsoft Online Partner Support
| | >| Get Secure! - www.microsoft.com/security
| | >|
| | >| This posting is provided "AS IS" with no warranties and
| | confers no rights.
| | >| You should not reply this mail directly, "Online"
| | should be removed
| | >before
| | >| sending, Thanks!
| | >|
| | >| --------------------
| | >| | Content-Class: urn:content-classes:message
| | >| | From: "Mauricio Pires"
| | <[email protected]>
| | >| | Sender: "Mauricio Pires"
| | <[email protected]>
| | >| | References: <[email protected]>
| | >| <[email protected]>
| | >| <[email protected]>
| | >| <[email protected]>
| | >| | Subject: RE: Form Ont Top All Applications
| | >| | Date: Mon, 29 Sep 2003 10:20:42 -0700
| | >| | Lines: 144
| | >| | Message-ID: <[email protected]>
| | >| | MIME-Version: 1.0
| | >| | Content-Type: text/plain;
| | >| | charset="iso-8859-1"
| | >| | Content-Transfer-Encoding: 7bit
| | >| | X-Newsreader: Microsoft CDO for Windows 2000
| | >| | X-MimeOLE: Produced By Microsoft MimeOLE
| | V5.50.4910.0300
| | >| | Thread-Index: AcOGrgK9bqD2JBEKRhuJfZjHbJ8q5A==
| | >| | Newsgroups:
| | microsoft.public.dotnet.framework.windowsforms
| | >| | Path: cpmsftngxa06.phx.gbl
| | >| | Xref: cpmsftngxa06.phx.gbl
| | >| microsoft.public.dotnet.framework.windowsforms:53399
| | >| | NNTP-Posting-Host: TK2MSFTNGXA14 10.40.1.166
| | >| | X-Tomcat-NG:
| | microsoft.public.dotnet.framework.windowsforms
| | >| |
| | >| | Hi Ying-Shen Yu,
| | >| | These work around aren't good, because in case that
| | has
| | >| | more than one form with TopMost property set true and
| | with
| | >| | a datagrid, when the dataset changes the data, the
| | form
| | >| | that owns the dataset always goes on top.
| | >| | I continue with the problem.
| | >| |
| | >| | >-----Mensagem original-----
| | >| | >Hi Mauricio,
| | >| | > Thanks for your kind help, we have noticed this
| | >| | problem and our
| | >| | >product team is investigating on it. It's ok to set
| | the
| | >| | TopMost to true in
| | >| | >On_Paint, but maybe you can put it in On_Deactivate
| | >| | event, it will be
| | >| | >helpful to the performance of your program.
| | >| | >If it does not work using this way, please let me
| | know.
| | >| | >Thanks for using Microsoft MSDN Newsgroup!
| | >| | >
| | >| | >
| | >| | >Best regards,
| | >| | >
| | >| | >Ying-Shen Yu [MSFT]
| | >| | >Microsoft Online Partner Support
| | >| | >Get Secure! - www.microsoft.com/security
| | >| | >
| | >| | >This posting is provided "AS IS" with no warranties
| | and
| | >| | confers no rights.
| | >| | >You should not reply this mail directly, "Online"
| | should
| | >| | be removed before
| | >| | >sending, Thanks!
| | >| | >
| | >| | >--------------------
| | >| | >| Content-Class: urn:content-classes:message
| | >| | >| From: "Mauricio Pires"
| | >| | <[email protected]>
| | >| | >| Sender: "Mauricio Pires"
| | >| | <[email protected]>
| | >| | >| References: <003201c383a9$c5002aa0
| | [email protected]>
| | >| | ><[email protected]>
| | >| | >| Subject: RE: Form Ont Top All Applications
| | >| | >| Date: Fri, 26 Sep 2003 07:04:52 -0700
| | >| | >| Lines: 72
| | >| | >| Message-ID: <0df501c38437$2806ae20
| | [email protected]>
| | >| | >| MIME-Version: 1.0
| | >| | >| Content-Type: text/plain;
| | >| | >| charset="iso-8859-1"
| | >| | >| Content-Transfer-Encoding: 7bit
| | >| | >| X-Newsreader: Microsoft CDO for Windows 2000
| | >| | >| X-MimeOLE: Produced By Microsoft MimeOLE
| | V5.50.4910.0300
| | >| | >| Thread-Index: AcOENygGzC1995R8TPmW8NMATnz8ew==
| | >| | >| Newsgroups:
| | >| | microsoft.public.dotnet.framework.windowsforms
| | >| | >| Path: cpmsftngxa06.phx.gbl
| | >| | >| Xref: cpmsftngxa06.phx.gbl
| | >| | >microsoft.public.dotnet.framework.windowsforms:53206
| | >| | >| NNTP-Posting-Host: TK2MSFTNGXA08 10.40.1.160
| | >| | >| X-Tomcat-NG:
| | >| | microsoft.public.dotnet.framework.windowsforms
| | >| | >|
| | >| | >| Hi Ying-Shen Yu,
| | >| | >| I set the TopMost property to true in the On_Load
| | event
| | >| | >| handler of my form. This work around doesn't
| | always
| | >| | work
| | >| | >| because if you change some DataGrid property after
| | the
| | >| | >| On_Load event, the form doesn't stay on top, so I
| | set
| | >| | the
| | >| | >| TopMost to true in the On_Paint event handler of
| | the
| | >| | >| DataGrid. I think that it's the best work around.
| | >| | >| Thank you very much for your attention and help.
| | >| | >|
| | >| | >| Do you know if has some manner to comunicate
| | Microsoft
| | >| | >| about this problem?
| | >| | >|
| | >| | >|
| | >| | >| Best Regards,
| | >| | >|
| | >| | >| Mauricio Pires.
| | >| | >|
| | >| | >|
| | >| | >| >-----Mensagem original-----
| | >| | >| >Hi Mauricio,
| | >| | >| > It's a bit strange behaviour, but you may
| | try set
| | >| | >| the Topmost property
| | >| | >| >to true in the On_Load event handler of your
| | form.
| | >| | This
| | >| | >| work around works
| | >| | >| >on my system, if it doens't work for you, please
| | let
| | >| | me
| | >| | >| know. Thanks!
| | >| | >| >
| | >| | >| >
| | >| | >| >Best regards,
| | >| | >| >
| | >| | >| >Ying-Shen Yu [MSFT]
| | >| | >| >Microsoft Online Partner Support
| | >| | >| >Get Secure! - www.microsoft.com/security
| | >| | >| >
| | >| | >| >This posting is provided "AS IS" with no
| | warranties
| | >| | and
| | >| | >| confers no rights.
| | >| | >| >You should not reply this mail directly, "Online"
| | >| | should
| | >| | >| be removed before
| | >| | >| >sending, Thanks!
| | >| | >| >
| | >| | >| >--------------------
| | >| | >| >| Content-Class: urn:content-classes:message
| | >| | >| >| From: "Mauricio C. Pires"
| | >| | >| <[email protected]>
| | >| | >| >| Sender: "Mauricio C. Pires"
| | >| | >| <[email protected]>
| | >| | >| >| Subject: Form Ont Top All Applications
| | >| | >| >| Date: Thu, 25 Sep 2003 14:12:47 -0700
| | >| | >| >| Lines: 2
| | >| | >| >| Message-ID: <003201c383a9$c5002aa0
| | [email protected]>
| | >| | >| >| MIME-Version: 1.0
| | >| | >| >| Content-Type: text/plain;
| | >| | >| >| charset="iso-8859-1"
| | >| | >| >| Content-Transfer-Encoding: 7bit
| | >| | >| >| X-Newsreader: Microsoft CDO for Windows 2000
| | >| | >| >| X-MimeOLE: Produced By Microsoft MimeOLE
| | >| | V5.50.4910.0300
| | >| | >| >| Thread-Index: AcODqcUAVG8WC+GMQXWrm9PWg/Cqtg==
| | >| | >| >| Newsgroups:
| | >| | >| microsoft.public.dotnet.framework.windowsforms
| | >| | >| >| Path: cpmsftngxa06.phx.gbl
| | >| | >| >| Xref: cpmsftngxa06.phx.gbl
| | >| | >|
| | >microsoft.public.dotnet.framework.windowsforms:53157
| | >| | >| >| NNTP-Posting-Host: TK2MSFTNGXS01 10.40.2.125
| | >| | >| >| X-Tomcat-NG:
| | >| | >| microsoft.public.dotnet.framework.windowsforms
| | >| | >| >|
| | >| | >| >| Someone know how to make a Form on top all
| | >| | applications?
| | >| | >| >| Tanks.
| | >| | >| >|
| | >| | >| >
| | >| | >| >.
| | >| | >| >
| | >| | >|
| | >| | >
| | >| | >.
| | >| | >
| | >| |
| | >|
| | >|
| | >
| | >.
| | >
| |
|
|
 
Back
Top