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

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.

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.

What should I use to open windows explorer in different positions? [duplicate]

This question already has answers here:
Opening process and changing window position
(3 answers)
Closed 3 years ago.
I recently posted this question but didn't get any response on it:
Need help opening 2 windows explorer windows to two different spots
I still would like any help that can be given in this case. One thing that I thought might have been confusing about my previous post is that both of the examples I noted were using SetWindowPos. I really don't care about the method used to solve this problem only that A) it uses c# and B) that it meets the desired criteria as posted in my previous post. Please, if there is further clarification needed please ask me. Thanks!
Use a mouse. Click the corner of the window and drag it until it is the desired size.

Making a form that marks end of screen [duplicate]

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

injecting text to process without injecting dll [duplicate]

This question already has answers here:
Closed 10 years ago.
Possible Duplicate:
Is there a way to overlay an application over a full-screened program?
Is it possible in C# to inject a text to process (like fraps for example), but without using any .dll injections?
Thanks in advance for responses.
#update
"A text" means some fast refreshing labels or something, which will show informations e.g.:
Name:Test
Pos: x=123,y=456,z=0
Level: Unknown
Something.....
You can use automation to send keyboard actions and suchlike to another program. Otherwise if there is no exposed API then things look bleak. See this question for an overview on the methods you use to send keystrokes.
EDIT: What you're asking for is not injection, it's an overlay. What you're looking to do is take control of the display buffer so that your overlay always has a higher z-index than whatever is being rendered. Take a look at this answer

Single Instance program in C# [duplicate]

This question already has answers here:
Closed 11 years ago.
Possible Duplicate:
single instance and notify in system tray
I am trying to implement a program in C#.NET. My program uses the notification icon. I have made my program a single instance program using the class singleinstance.cs from codeproject.
Now, what I am trying to do is, if I close the main window and then if I run the application again, it should open the main window of the already running program instance in the system tray.
I have googled a lot over this but didn't find something useful for me.
You need to maximize the window of an existing process, correct?
Here is an example of another question: Maximize another process' Window in .NET
To note, in the future, this is a borderline duplicate question, in my opinion. You could have used the search box in the top right of this page to find this answer on your own.

Categories