Hi guys,
How do i create forms of irregular shapes?
Printable View
Hi guys,
How do i create forms of irregular shapes?
Use the
API Functions. The CombineRgn API is used to crate more complex regions.Code:Public Declare Function CreateEllipticRgn Lib "gdi32" Alias "CreateEllipticRgn" (ByVal X1 As Long, ByVal Y1 As Long, ByVal X2 As Long, ByVal Y2 As Long) As Long
Public Declare Function CreateRoundRectRgn Lib "gdi32" Alias "CreateRoundRectRgn" (ByVal X1 As Long, ByVal Y1 As Long, ByVal X2 As Long, ByVal Y2 As Long, ByVal X3 As Long, ByVal Y3 As Long) As Long
Public Declare Function CombineRgn Lib "gdi32" Alias "CombineRgn" (ByVal hDestRgn As Long, ByVal hSrcRgn1 As Long, ByVal hSrcRgn2 As Long, ByVal nCombineMode As Long) As Long
Public Declare Function SetWindowRgn Lib "user32" Alias "SetWindowRgn" (ByVal hWnd As Long, ByVal hRgn As Long, ByVal bRedraw As Boolean) As Long
Code:'example
SetWindowRgn Form1.hWnd, CreateEllipticRgn(10, 10, 550, 550), True
'combine the numbers according to your needs
Do a search for "Alex Vallat VB Shaped Form Creator".
i made lovely form for using
download it from
www.samawat.4mg.com
its name is Neo.zip
bUe
here is the link to get the shapped form creator, i use it it is free and great
http://www.comports.com/AlexV/VBSFC.html
hope it helps
Merlin ?