tags:

views:

73

answers:

3

How can I show something on screen wihtout using forms?

Actually, I want to show some text and images popping on screen.

A: 

I don't think you can: a form is equivalent to a window, and Windows applications draw into a window and not directly onto the screen (unless perhaps it's the backgroun/wallpaper, which I don't know about).

ChrisW
A: 

I think that's overdoing it but XNA will allow you to draw to the screen, but it is meant to be used for games so you will have trouble fitting it to a normal application.

Ziv
+1  A: 

EDIT: just like i said HERE

What you can do is to create a alphatransparent form that draws the PNG and position it at the correct location and bind move etc.

alt text

http://www.codeproject.com/KB/GDI-plus/perpxalpha_sharp.aspx

PerPixelAlphaForm transparentImageForm = new PerPixelAlphaForm();
transparentImageForm.SetBitmap(<IMAGE GOES HERE>,<OPACITY GOES HERE>);

//opacity is the opacity that the image will be drawn with, a value of 255 = all transparent parts will be alpha/transparent just as much as the original PNG etc.. and you can put a timer that calls SetBitmap and changes the Opacity to fade in/out the image on the screen

And you can generate the text (on the fly) in a nice way with code from THIS article and pass that image to the SetBitmap of the AlphaTransparent form.

alt text

EDIT: OR GO TO WPF.

Chris Schroeder
Technically, this is still using a form, but may be what the OP needs to achieve their goal
ck
Yes its still a form, i used this for the exact same thing sometimes.And the regular .Net Forms "Transparent Color Key" doesn't cut it.You can even use this as a "outer form" to create custom header/border/shadow styles for your "none" border forms.But this is fully supported in WPF without the need of interop! FYI
Chris Schroeder