Home
Search
 
What's New
Index
Books
Links
Q & A
Newsletter
Banners
 
Feedback
Tip Jar
 
 
 
 
 
 
 
 
Old Pages
 
Old Index
Site Map
What's New
 
Books
How To
Tips & Tricks
Tutorials
Stories
Performance
Essays
Links
Q & A
New in VB6
Free Stuff
Pictures
 
 
 
TitleMake a picture-shaped form in VB .NET
Keywordspicture-shaped form, shaped form, transparent, VB.NET
CategoriesGraphics, VB.NET
 
Set the form's BackgroundImage property to the picture. Make the picture red where you don't want the form to appear. Then set the form's TransparencyKey property to red.

That's all there is to it. This program also resizes the form at runtime to fit the picture but you can do that at design time if you like. You may also want to set the form's FormBorderStyle property to None.

 
Private Sub Form1_Load(ByVal sender As System.Object, ByVal _
    e As System.EventArgs) Handles MyBase.Load
    ' Fit the form to the picture.
    Width = Me.BackgroundImage.Width
    Height = Me.BackgroundImage.Height
End Sub
 
 
Copyright © 1997-2003 Rocky Mountain Computer Consulting, Inc.   All rights reserved.
  Updated