Senin, 26 April 2010

Form Ellips/Bulat Pada Visual Basic

[+]Browser » Home » » Form Ellips/Bulat Pada Visual Basic
,
Source code berikut untuk membuat form berbentuk ellips/bulat pada Visual Basic dengan hanya beberapa baris kode.
Buat 1 project dengan :
1 Form
1 Module

Public Declare Function CreateEllipticRgn Lib "gdi32" _
    (ByVal X1 As Long, ByVal Y1 As Long, ByVal X2 As Long, _
    ByVal Y2 As Long) As Long
 
Public Declare Function SetWindowRgn Lib "user32" _
    (ByVal hWnd As Long, ByVal hRgn As Long, _
    ByVal bRedraw As Boolean) As Long
Sementara coding untuk di Form seperti berikut :
Private Sub Form_Load()
    SetWindowRgn hWnd, CreateEllipticRgn(0, 0, 300, 200), True
End Sub

.::Artikel Menarik Lainnya::.

0 Respon to “ Form Ellips/Bulat Pada Visual Basic ”

[ Berikan Komentar ]