Home > Visual Basic 6 > Form Berbentuk Ellips/Bulat Pada Visual Basic

Form Berbentuk 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

Copy source code berikut pada 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 Berkaitan :

Baca Juga :

  1. No comments yet.
  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: