Referencing this question:
How to flash/blink taskbar icon in vb.net?
I am aiming to do the opposite and stop the taskbar icon from flashing.
My big attempt has been to override OnNotifyMessage
Protected Overrides Sub OnNotifyMessage(m As Message)
'MyBase.OnNotifyMessage(m)
End Sub
This however seems to mess with my placement of the forms, seems to prevent processing of Top Left commands from executing.
Still, no solution to this particular problem but my workaround was to hide the toolbar icon and create a tray icon instead. Not the ideal solution but at least don't have to see that annoying blinking every time, I activate or deactivate an app.
Related
I have created a program that I want to show in the taskbar the whole time. It launches a few keyboard shortcuts when I press their buttons. The program works great, but the windows taskbar needs to be set to always on-top or programs will maximize over it too.
If I have both my programs and the windows taskbar set to be always on top, My program is on-top of the taskbar until I click anywhere in the taskbar, for example to activate another program.
My code is as follows:
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) _
Handles MyBase.Load
Me.Bounds = Screen.PrimaryScreen.Bounds
Me.TopMost = True
'...
End Sub
I considered using a timer to activate my program once in a while, but the downside to that approach is, that if I am typing in another application and the focus is moved to my program, this is very annoying.
So my question is as follows: Is there a way I can interact with the taskbar so my program is always ontop of it, regardless of anything else, or is it possible to periodically restore the on-top status so my program becomes on-top of the taskbar again without the focus going to my program?
I prefer that my program is always ontop if the taskbar, and clicking the taskbar does not temporarily make my program invisible. For example, if I can set the z-order of my application to a higher level than the taskbar, that would be best. If otherwise I can somehow spawn my program as part of the taskbar, that would also work.
PS: I have enabled the search bar in the taskbar and my program is supposed to cover it entirely. I don't use the search bar and it gives me a dedicated space without worrying covering any open programs.
PS2: This is just for me, no need to worry about anyone who has different preferences. My goal is to optimize my workflow, so the least hastle I have daily, the better.
This is what it looks like when the app runs, but clicking the taskbar makes the window invisible.:
So... How can I make sure my program stays on-top of the taskbar, even if I click somewhere in the taskbar?
Apparently the solution was pretty simple.
I was afraid of side-effects, but the solution I applied works perfectly.
I added a timer, enabled it, and every tick it simply does:
me.Topmost = true
If I now click the taskbar, the program is obviously pushed to the back, but every 100ms when the timer ticks, the program is automatically put back on top without the app actually receiving focus.
My question is the opposite of this one (Remove "X" button at the end of a TextBox).
I have a vanilla TextBox (with TextWrapping set to NoWrap), but I'm not seeing the clear cross delete button.
This is a store/universal/winrt app, so it's a Windows.UI.Xaml.Controls.TextBox.
I haven't got any overrides for the default template in App.xaml either.
Any ideas?
If you can afford it, you can use Telerik UI for Windows Phone. It has a textbox control with a built in clear button.
Other route would be implementing your own user control. It should be rather easy.
I am using a MenuStrip in my application like this:
Private top_menu As New MenuStrip
Private menu_item_file As New ToolStripMenuItem("File")
and I add items to the menu like this:
With top_menu
.Items.Add(menu_item_file)
End With
With menu_item_file
.DropDownItems.Add(sub_menu_item_show_all)
.DropDownItems.Add(sub_menu_item_show_reg)
End With
The menu drops down and it has a shadow (by default). It works fine in Windows7, but when I test it in XP, the shadow remains after the user moves away from the menu (or clicks the item). I can't figure out what is causing this. The menu continues to work fine and drops down every time the user hovers over it, but the shadow never goes away. The menu does drop down over an existing panel which has a picture in it, but I don't think that is causing this behavior.
It's some kind of bug in Win XP. Only appears when you have set your picture to your bacground. Cured by turning off shadows in Win XP.
http://www.codeproject.com/Articles/19277/Let-Your-Form-Drop-a-Shadow
I have a program set up that causes a NotifyIcon to appear by the clock under certain conditions, and then disappear under other conditions, using NotifyIcon1.visible = True/False and using the Taskbar properties in Windows to set it's behavior to "Show icon and notifications". But, when it's invisible, I can't see if it's running without opening up Task Manager.
I'd like to be able to switch between having the icon show next to the clock and having it hidden with all of the other icons (the way other programs do when you select "Only show notifications"), but I can't figure out how to do that without using a balloon tip.
I have a program which runs mainly though a NotifyIcon in the bottum right of my windows screen (XP). Whenever I open the ContextMenuStrip that appears when the icon is right clicked, a box also appears in the task bar. I also have nested menus inside the menu (mouse over one item leads to another menu), and each additional menu also creates a taskbar box upon appearing. So once I am at the third or fourth nested menu, there would be 3 or 4 windows appearing in the taskbar. After the menu disapears, so do the windows in the taskbar.
How can I stop the taskbar from displaying boxes to represent these menus? I have done nothing in my code as far as I know to create this type of behavior. I have searched for similar problems but have found nothing similar. There is no "showintaskbar" property for these items as far as I can see, and no other property that I can find which would affect this. I have investigated the owner of the contextmenustrip since I read the owner may effect these type of behaviors, but that doesnt seem to be helpful as there isn't an owner property of the contextmenustrip.
I don't know what else to search for, so I am here hoping someone can give me a clue as to what else may effect this type of behavior.
Any help is greatly appreciated. Thank you!
If you are using the ContextMenuStrip.Show() method, it will display in the taskbar as you describe. Try assigning your menu to the NotifyIcon.ContextMenuStrip property instead.