Jump to content
Xtreme .Net Talk

Recommended Posts

  • *Gurus*
Posted

Try this. Obviously, change the path to whatever bitmap you want to load and display.

 

   Private backgroundBitmap As Bitmap

   Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
       Dim c As Control

       backgroundBitmap = New Bitmap("c:\windows\coffee bean.bmp")

       For Each c In Controls
           If TypeOf c Is MdiClient Then
               AddHandler c.Paint, AddressOf PaintMyImage
               Exit For
           End If
       Next
   End Sub

   Private Sub PaintMyImage(ByVal sender As Object, ByVal e As System.Windows.Forms.PaintEventArgs)
       e.Graphics.DrawImage(backgroundBitmap, 0, 0)
   End Sub

MVP, Visual Developer - .NET

 

Now you see why evil will always triumph - because good is dumb.

 

My free .NET Windows Forms Controls and Articles

Posted

Real simple way :

 

In the MDIForm_Load event :

 

Me.Dock = DockStyle.Fill

Me.Backgroundimage =Me.backgroundimage.FromFile ("C:\myuglyface.jpg")

 

;)

What I don't know keeps me excited...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...