Coba anda copy pastekan di form anda program dibawah ini, semoga berhasil

 

Option Explicit

 

Private Declare Function GetWindowLong Lib "user32" _

Alias "GetWindowLongA" (ByVal hWnd As Long, _

ByVal nIndex As Long) As Long

 

Private Declare Function SetWindowLong Lib "user32" _

Alias "SetWindowLongA" (ByVal hWnd As Long, _

ByVal nIndex As Long, ByVal dwNewLong As Long) _

As Long

 

Private Const GWL_STYLE = (-16)

Private Const WS_MINIMIZEBOX = &H20000

Private Const WS_MAXIMIZEBOX = &H10000

 

Public Sub NoMaxBox(f As Form)

  Dim l As Long

  l = GetWindowLong(f.hWnd, GWL_STYLE)

  l = l And Not (WS_MAXIMIZEBOX)

  l = SetWindowLong(f.hWnd, GWL_STYLE, l)

End Sub

 

Public Sub NoMinBox(f As Form)

  Dim l As Long

  l = GetWindowLong(f.hWnd, GWL_STYLE)

  l = l And Not (WS_MINIMIZEBOX)

  l = SetWindowLong(f.hWnd, GWL_STYLE, l)

End Sub

 

Private Sub Form_Load()

    NoMaxBox Me

End Sub

 

   _____  

From: Agus Sudana [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, December 26, 2006 3:54 PM
To: [email protected]
Subject: [Programmer-VB] non-aktifkan tombol maximize form

 

dear all, 
ada yg tahu coding utk matikan(non--aktifkan) tombol maximize pada suatu
form..?
krn, waktu saya pakai border style (properties) = 2-sizeable, semua fungsi
(minimize,maximize,-close) aktif semua.
kalopun diganti pake style yang lain, tombol minimize-nya tidak ada.
please help..
terima kasih,

-agus-

____________-_________-_________-_________-_________-__
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around 
HYPERLINK "http://mail.yahoo.com"http://mail.-yahoo.com 

 


--
No virus found in this incoming message.
Checked by AVG Free Edition.
Version: 7.5.432 / Virus Database: 268.15.27/602 - Release Date: 12/25/2006
10:19 AM



-- 
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.5.432 / Virus Database: 268.15.27/602 - Release Date: 12/25/2006
10:19 AM
 

Kirim email ke