Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How do I make a form look like an image

Status
Not open for further replies.

hojoho

Technical User
Mar 8, 2003
44
0
0
US
How do I make a form look like an image in VB 6.0. It is a simple image, nothing complicated.
Thanks
 
Load your image into the .Picture property of the form.

- Andy.
 
But then you can see the corners of the form behind the image. I need something similar to skins. If I could make the form transparent and the image visible, it would work the way I need it to work.
Thanks
 
Try
or from codearchive

Private Declare Function CreateEllipticRgn Lib "gdi32" (ByVal X1 As Long, ByVal Y1 As Long, ByVal X2 As Long, ByVal Y2 As Long) As Long
Private Declare Function SetWindowRgn Lib "user32" (ByVal hWnd As Long, ByVal hRgn As Long, ByVal bRedraw As Long) As Long

Private Sub Form_Load()
Dim hr&, dl&
Dim usew&, useh&
usew& = Me.Width / Screen.TwipsPerPixelX
useh& = Me.Height / Screen.TwipsPerPixelY
hr& = CreateEllipticRgn(0, 0, usew, useh)
dl& = SetWindowRgn(Me.hWnd, hr, True)

End Sub

There are loads of references to this sort of thing. Try Google. Change the parameters of CreateEllipticRgn and you can have any shape you like. Peter Meachem
peter@accuflight.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top