27 Sept 2012

Membuat form agar tidak bisa resize di VB 6.0

Unknown | 22:48 |
Source code berikut untuk membuat form tidak bisa di resize pada Visual Basic.

ikuti langkah-langkah berikut :

1. Buat 1 project Standard.EXE dengan :
  • 1 Form
2. Copy source code berikut pada Form :
Private Const GWL_STYLE = (-16)
Private Const WS_THICKFRAME = &H40000

Private Declare Function SetWindowLong Lib "user32" Alias "SetWindowLongA" _
        (ByVal hwnd As Long, ByVal nIndex As Long, _
        ByVal dwNewLong As Long) As Long

Private Declare Function GetWindowLong Lib "user32" Alias "GetWindowLongA" _
        (ByVal hwnd As Long, ByVal nIndex As Long) As Long

Private Sub Form_Load()
Dim lStyle As Long

    lStyle = GetWindowLong(Me.hwnd, GWL_STYLE)
    lStyle = lStyle And Not WS_THICKFRAME
    Call SetWindowLong(Me.hwnd, GWL_STYLE, lStyle)
End Sub
3. Jalankan Program

Ditulis Oleh : Unknown ~ kudo-share.blogspot.com

Anda sedang membaca sebuah artikel yang berjudul Membuat form agar tidak bisa resize di VB 6.0, Semoga artikel tersebut bermanfaat untuk anda ....

:: Thank you for visiting ! ::

Post a Comment