I want to display a text in the taskbar like the NetSpeedMonitor program . I thought about how Windows did that with der Date and Time display, but I couldn't find any answer. I want to do this with C# and .Net 4.x
C# Display text on the taskbar | Windows 10
Asked Answered
1. Create Brush -> create bitmap -> create graphics -> Draw text on graphics -> convert to icon –
Dichogamy
@ZachSchulze I already did that, but my Icon was always small, even when I used a bigger bitmap. I found a top about the max icon size: #32762963 –
Pitchfork
What you're looking for is not a tray icon, but a panel. –
Mahogany
@Mahogany can you give me a small example please? –
Pitchfork
@Pitchfork codeproject.com/Articles/2219/… –
Dichogamy
@Pitchfork I also didn't know how this things are called. I've made a quick search and it seems that this functionality is often called "taskbar applet" (clocks, calculators, etc. built into taskbar on the left of the tray area, just as it is shown on your screenshot). Unfortunately, this functionality is not available in .Net, so you'd need to work with P\Invoke in order to use it. UPD: While I was typing, the link was posted above =) –
Mahogany
i answered to question dont forget approve it and if there was aany other question about it tell me freaand –
Ileostomy
if you watch this pic
you see every thing in windows application have an handle(HWND) and if you get it you can change this app parameters and add or remove any thing on if look at this link there is sample for it in console application you just need just doing same thing on taskbar. I created a dll for all office apps to use them in c# like this and i done this by using handles of office and my app
I downloaded the File Win32Controls.cs and put in into my project. But I get an error at "using System.Windows.Native;" that its not there and that this is probably a assembly reference. –
Pitchfork
what is your Full error.? for using this functions you dont need more assembly you just import them by code too your project –
Ileostomy
Ok I translate the error in english: "The Type or Namespacename "Native" is not avaible in the Namespace "System.Windows. using-directive is unessescery". I just delete this line and the error is gone. I hope it didn´t affect the functionality. I am a c# beginner my main language is java :). Thx for helping. –
Pitchfork
You'r Wellcome friend –
Ileostomy
© 2022 - 2024 — McMap. All rights reserved.