Source Code :
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 MDIForm) 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 MDIForm) 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 MDIForm_Load() NoMaxBox Me 'NoMinBox Me End Sub Private Sub MDIForm_Resize() 'Ganti 4800 di bawah dgn lebar form yg fix Anda tentukan 'Ganti 3600 di bawah dgn tinggi form yg fix Anda tentukan If Me.Width <> 4800 Then Me.Width = 4800 If Me.Height <> 3600 Then Me.Height = 3600 End Sub
Related Post :
Form
VB6
- Project - SMS Gateway Sederhana Dengan ActiveXpert
- Runtime Error 430 - Class Does Not Support Automation or Does Not Support Expected Interface
- Functions for calculating the Min, Max and StdDev
- Recordset Sementara Dengan Desimal
- Mengambil Log Data di Fingerprint CZKEM
- Multi Column Combo Box ActiveX
- Show Data With Store Procedure And RecordSet In VB6
- Hapus User Info di Fingerprint CZKEM
- Koneksi Fingerprint CZKEM
- Wrap Text Function (VB 6)
- Wrap Text
- Copy Paste Clipboard
- Cegah Aplikasi Visual Basic Bisa Dijalankan Dua Kali
- 10 Tips and Trick Visual Basic From Vb Bego Forum
- Mencari Tanggal Terakhir di Suatu Bulan
- Menonaktifkan tombol Maximize yang terdapat di MDIForm
- Getting the Windows and System Directory
- Make a form with a gradient background
0 comments:
Post a Comment