Sunday, December 11, 2011

How do I make an image re size itself in VB.net according to the persons resolution when the window is maxed?

I'm making a prank program, no harm really, just when my friend presses a button an image of a blue screen of death will show up. It's just how can I make it so the image will automatically re size according to my friends monitor resolution? The screen will be maximized.How do I make an image re size itself in VB.net according to the persons resolution when the window is maxed?
Create a borderless form and set the form's WindowState property to Maximized and the TopMost property to True. Add a PictureBox and set the PictureBox's Dock property to Fill and the InitialImage property to your blue screen image. When the new form loads, hide the cursor by calling the System.Windows.Forms.Cursor.Hide method. Viola! A blue screen. You'll need to add some code to close the form and show the cursor, but that's fairly easy.

No comments:

Post a Comment