topmost

Opening a WinForms Form with TopMost = true but not having it steal focus?

穿精又带淫゛_ 提交于 2019-12-17 09:47:58
问题 I have a form that pops up on a user's screen and has TopMost=true , but it steals the focus. How can I get it to not steal focus when it first appears? 回答1: Paste this code in your form: protected override bool ShowWithoutActivation { get { return true; } } 回答2: This is what worked for me. It provides TopMost but without focus-stealing. protected override bool ShowWithoutActivation { get { return true; } } private const int WS_EX_TOPMOST = 0x00000008; protected override CreateParams

Do Asp.net webform controls have topmost feature like Winforms controls do?

拜拜、爱过 提交于 2019-12-12 06:04:31
问题 im wondering if i can make a group of control that will stay on screen even someone on another webpage while my webpage open in another tab,in asp.net.Like winform's topmost feature. 回答1: No, you can not do this. If you're expecting to port a winforms application to webforms feature for feature, you're going to be greatly disappointed. WebForms is still just a thin veneer over the http protocol; one that tends to peel up at the corner. If you're trying to keep something on top via the web,

Non-overlapped transparent control

微笑、不失礼 提交于 2019-12-11 00:25:54
问题 I'm trying to make a tooltip for my video player. I use a windows media player embedded into my winform's app on c# ( AxWMPLib.AxWindowsMediaPlayer ) for playing video. And I have created a control that shows a current position of a media. This control is transparent. Control's code is below: namespace player.Controls { public partial class TransparentToolTip : System.Windows.Forms.UserControl { public enum PointerLocation : byte { ... } #region Private data // ... #endregion Timer Wriggler =

TopMost form in a thread?

天涯浪子 提交于 2019-12-08 15:58:22
问题 I am using the following code to open a form in a new thread: private void button1_Click(object sender, EventArgs e) { Thread thread = new Thread(ThreadProc); thread.Start(); } public void ThreadProc() { Form form = new Form(); form.TopMost = true; form.ShowDialog(); } But the newly created form isn't TopMost even though I set it to true. How can I make a form in a thread TopMost ? 回答1: Usually you don't need another thread, you open the form as usual in modal or non modal mode, if the form

Delphi: Balloon Form with fsStayOnTop not working in Win7

两盒软妹~` 提交于 2019-12-07 09:21:13
问题 I have an application that uses my own balloon form. This is a non-bordered, fsStayOnTop kind form. I show it with this code: ShowWindow(Handle, SW_SHOWNOACTIVATE); Visible := True; Today I realized that if I activate another application then the balloon is not appearing! So it is loosing it's stay on top style. Environment: Win7/x64 Delphi 6 Professional What I can do with it? Thanks: dd 回答1: What worked for me in the past when struggling with stay-on-top forms: Form := TMyForm.Create(Self);

Really annoying bug with TopMost property in Windows Forms

假装没事ソ 提交于 2019-12-07 05:12:33
问题 I have this Windows Forms application where it sits in the notification area. Clicking on the icon brings it up front, clicking it again (or clicking on the app X icon) sends it back. This is the type of app that having the window always on top is important when it's displayed by clicking the icon (it's optional though). Right-clicking the icon brings up a context menu where one can select to enable the "always on top" option or not. When the application first starts up, the app settings are

Delphi: Balloon Form with fsStayOnTop not working in Win7

ⅰ亾dé卋堺 提交于 2019-12-05 18:18:35
I have an application that uses my own balloon form. This is a non-bordered, fsStayOnTop kind form. I show it with this code: ShowWindow(Handle, SW_SHOWNOACTIVATE); Visible := True; Today I realized that if I activate another application then the balloon is not appearing! So it is loosing it's stay on top style. Environment: Win7/x64 Delphi 6 Professional What I can do with it? Thanks: dd What worked for me in the past when struggling with stay-on-top forms: Form := TMyForm.Create(Self); Application.NormalizeTopMosts; SetWindowPos(Form.Handle, HWND_TOPMOST, 0, 0, 0, 0, SWP_NOACTIVATE + SWP

Really annoying bug with TopMost property in Windows Forms

只愿长相守 提交于 2019-12-05 11:01:49
I have this Windows Forms application where it sits in the notification area. Clicking on the icon brings it up front, clicking it again (or clicking on the app X icon) sends it back. This is the type of app that having the window always on top is important when it's displayed by clicking the icon (it's optional though). Right-clicking the icon brings up a context menu where one can select to enable the "always on top" option or not. When the application first starts up, the app settings are read from an XML file and I'm 99% that this is working as it should, the TopMost property is properly

Why isn't MessageBox TopMost?

落爺英雄遲暮 提交于 2019-12-03 05:26:25
问题 I recently found out that by default MessageBoxes were not the top most form when displayed by default and I was wondering if anyone knew any circumstances when you wouldn't want the messagebox to be shown on top of other windows? I found the issue when I started to show splash screens whilst loading an application, and it looked like my program was still running but there was a MessageBox behind the splash screen that was waiting for input.. The splash screen was shown on a different thread

Why isn't MessageBox TopMost?

北城以北 提交于 2019-12-02 18:45:49
I recently found out that by default MessageBoxes were not the top most form when displayed by default and I was wondering if anyone knew any circumstances when you wouldn't want the messagebox to be shown on top of other windows? I found the issue when I started to show splash screens whilst loading an application, and it looked like my program was still running but there was a MessageBox behind the splash screen that was waiting for input.. The splash screen was shown on a different thread to the thread that called the messagebox so I imagine this is why it didn't appear above the splash;