Making a form that marks end of screen [duplicate] - c#

This question already has answers here:
How do you do AppBar docking (to screen edge, like WinAmp) in WPF?
(8 answers)
Closed 7 years ago.
Sorry for the vague title but I wasn't sure how to describe my wish/problem.
A while ago I made a sidebar with a few widgets that I can add.
It displays time, date, windows volume, how many % my phone is charged (once connected), some equalizer bars and song + artist currently playing on Spotify.
At the moment the bar is on the right hand side of my main monitor. What I want is to put it on the left side of my secondary monitor. (not quite relevant)
I would like this sidebar to act as if its the end of the screen.
So if I would maximize an application it would end at the border of my sidebar.
I made a little image to illustrate the goal.
Red is the sidebar and blue is a random application.
Does anyone know if and how this can be achieved?
If anything else is unclear let me know :)
Thanks in advance.

You can use WpfAppBar to add such functionality

Related

How would I go about drawing a rectangular selection on-screen when the mouse is dragged and then getting a screenshot of the selected area? [duplicate]

This question already has answers here:
.NET Equivalent of Snipping Tool
(3 answers)
Closed 5 years ago.
I'm looking for a way to draw a rectangular selection-visualiser, basically similar to Gyazo.
If any of you are familiar with iOS jailbreaking and have used Snapper 2 before, I'm trying to do that but for Windows. For those of you who aren't, it allows you to select an area you want for a screenshot and then keeps it on top of everything else, allowing you to drag it around, save it etc. It's really useful for phone numbers, WiFi passwords among other things.
The only issue is that I don't know how I'd go about drawing a selection area and grabbing an image of it.
Any help would be appreciated.
Windows since 7 has the Snipping tool. It might be close enough to the droid you are looking for: https://support.microsoft.com/en-us/help/13776/windows-use-snipping-tool-to-capture-screenshots
If you mean .NET with C#, there is Graphics.CopyFromScreen. Note that it does not work from Windows services - a interactive session is required and Services are barred from those by default since Vista.
One issues is having this thing be drawn "on top". Generally the topmost game is one you and the user can only loose. Everything that is able to win it is either part of Windows itself. Or uses a "intercept GPU output, draw something on top" approach, wich is not trivial.

.NET | How to keep form on fullscreen game [duplicate]

This question already has answers here:
How to make a window always stay on top in .Net?
(14 answers)
Closed 8 years ago.
I googled some sites but can't find. I want to keep form on fullscreen game. I make gametool software and that feature is important. I need *VB.NET or C# example for this.
Thank you!
NOT: I saw that topic:How to make a window always stay on top in .Net?. Bu the answer not work on games.
You need to HOOK into the game so you can render with the game (this is a pretty huge topic), unless the game is windowed, in that case you can just force the form to be the top window (Like the link in one of your comments explains).
Beware that this is considered an hack by most anti-cheat software (as it should..).
Things such as Steam are whiteflagged.

Using animation in Picturebox [duplicate]

This question already has answers here:
Can a PictureBox show animated GIF in Windows Application?
(3 answers)
Closed 9 years ago.
Im working in 2D space invaders game and i have done all the important part. Then, I decided to add some animation in the pictureBox to make my game look much better. My idea is to make the background picture as stars and i want to move this stars so it appears that my spaceship is actually moving.In different words, i want to make the background picture moving and repeat it again and again.
i feel there is easy way to make, can help me please with key points to overcome this issue.
thanks in advance
I think this has sort of been answered already in how to use an animated gif for a PictureBox, in this case you'd have your stars moving as part of a gif.
Link to Answer
Although I wouldn't be surprised if it's a better approach to use some other control altogether rather than a PictureBox, but if that's what you're looking to use then hopefully my answer leads you to a solution.

C# or C++ frozen pane that shrinks desktop [duplicate]

This question already has answers here:
Closed 10 years ago.
Possible Duplicate:
How does Microsoft One Note 2010 implement a window that is docked to the desktop?
I was wondering how one would go about making a program (in C# or C++) that would have a frozen pane and shrink the active area of the rest of the screen. A good example of this is the Facebook client chat program in full screen mode because it is always on top as well as shrinks the area of the screen that is active, including shrinking the desktop. What I'm trying to achieve is the green bar in the picture below that can never go away:
(note please ignore the red circle in the photo below, the only picture I could find of what I'm trying to do was from a meme about how on all military sites they have a suicide hotline because the systems are all so slow, they make you want to kill yourself)
It's documented on MSDN as an "AppBar": http://msdn.microsoft.com/en-us/library/windows/desktop/cc144177%28v=vs.85%29.aspx
It's a regular Win32 window anchored to one edge of the screen and also reduces the area for other windows to maximize into.

How to find Windows Taskbar location and size? [duplicate]

This question already has answers here:
How do I get the taskbar's position and size?
(10 answers)
Closed 9 years ago.
I have created an application that runs in the system tray. When the user single- clicks the try icon, a small form comes up in the bottom right corner of the screen, i.e. right above the system tray. The form is basically "sticky" to the tray.
Here is my question: How do I accomplish the same thing, even if the user has the taskbar docked somewhere else? Like at the top of the screen, or one of the sides?
It shouldn't be hard, since I figure all I have to do is find out where the taskbar is. Is it at the bottom, the top, or one of the sides. But I can't find any documentation anywhere, that explains how to get the location and position of the taskbar.
Any one has any idea about this ?
It's a window, so find it's HWND and then get the window coordinates. The class name you're looking for is "TrayNotifyWnd".

Categories