M
Mauricio C. Pires
Someone know how to make a Form on top all applications?
Tanks.
Tanks.
Mauricio said:Someone know how to make a Form on top all applications?
Tanks.
-----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!
-----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.
| >|
| >
| >.
| >
|
.
-----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.
| | >| >|
| | >| >
| | >| >.
| | >| >
| | >|
| | >
| | >.
| | >
| |
|
|
.