How can I show a grey transparent overlay in C#? - c#

How can I show a grey transparent overlay in C#?
It should overlay other process which are not owned by the application doing the overlay.

Create a transparent window the size of the whole screen, mark it always-on-top, calculate the regions of your other application windows, and make the non-window regions of the top window grey.
I suppose you could just position your own application windows on top of the transparent grey one, with it being above all the other ones, but getting a tricky z-order scenario like that right, especially in conjunction with other apps that might also be doing z-order tricks, is tough.

Here a little app which do more or less the functionnality you want :
http://www.anappaday.com/downloads/2006/09/day-10-jedi-concentrate.html

Related

Complete interaction through a form using C#

I am making an overlay program with C# that will have an overlay for games. I am currently using a borderless form with a transparent background and a picture box to draw pictures to the screen, but I can't click the window behind the form. I have set the form to be always on top so that I can play games and the UI stays, but every time the mouse goes over the form in the game if I click the focused window switches to my form, preventing game interaction.
I have tried using functions to just draw images to the screen without using forms, but I cannot work out how to do that.
All I want is things like an external menu/crosshair and such, for use in minecraft. As for the menu, I could make my own media controls and such, and the crosshair would be useful because I hate the default crosshair. I could draw shapes to the screen, but if I don't use pictures the crosshair might look tacky.
A possible solution is a per pixel alpha blending window.
Here is a good starting point: Per Pixel Alpha Blend in C#
The example source code should give you the idea.
Hope this helps

How to make a nice overlay with variable transparency using WinForms?

I'm looking for a way to make a WinForm transparent and allow to use semi-transparent images on it.
The common solutions are:
Changing the total opacity of the form and all of its content;
Make only a certain color fully transparent, while the rest will have to be fully opaque;
Use multiple forms to make only some controls transparent.
None of these ways allow to display images or controls which have variable per-pixel transparency value. And I'd like to achieve a cool interface like Steam does with its in-game overlay.
Is there maybe some video game technique that can be used to draw a nice overlay for the whole screen? It's okay if it will have to use 3D graphics drawing libraries and whatnot.

Changing size of Notify Icon

As we know when we use notifyicon control in c# and place it in systemtray and it is displayed, windows overrides its size and make it 16*16 so can we somehow change its size? make it little bigger like system "date and time" display or like "input method type" in windows 8. I want to display certain text there.
Thanks in adv.
The system draws the icon, and it decides what size it is. For what it is worth, notification icons are the system's small icon size. So in fact you should not assume that they will be 16px icons. For font scalings larger than 100% the small icon size will be larger than 16px.
At the Win32 level, the application supplies an HICON, and the system draws that. If it needs to resize it, it will. You cannot custom draw in the notification area.
Imagine if applications could custom draw in the notification area? All it would take would be for a couple of applications to decide that they were so awesomely important that they had to custom draw large amounts of information. And then there'd be no room left for the rest of the taskbar.
So, the bottom line here is that you will need to find some other UI approach to solve your problem.

XNA - Showing a texture without a window?

I wanted to know whether it's possible to show a 2D Texture in XNA without a window that contains it. Just like drawing a picture/texture (maybe with the SpriteBatch.draw()-method?) simply onto the screen, independent from a seperated window. (What comes to my mind here is the Photoshop-opening window)
Is this possible in XNA? I can't find anything like this for SpriteBatch. Do I have to write totally new code/method?
If you mean splash image, it might be drawn from another application before launch (aka launcher) or you can show border-less window with image while loading application content in background.
Unfortunately XNA does not support border-less window, however there is walk-around using windows forms: https://gamedev.stackexchange.com/questions/37109/is-there-a-simpler-way-to-create-a-borderless-window-with-xna-4-0
If you will be able to create borderless window with XNA, then you need to change window size in constructor to splash image size, and draw same size image while loading content.
I would not recommend displaying splash image as it serves no real purpose, if you want to display some logo while starting the game - simply start game in fullscrean and draw image on black background while loading content, this is the way all modern games does it.

Wpf Show underneath blurry

In wpf how can I make controls underneath a transparent control blurry like windows Aero?
I need this for my custom modal windows with a border in outside for locking mouse
You can use the pixel shader effects to mimic that effect. Here is a tool for building/testing pixel shaders.

Categories

Resources