| View previous topic :: View next topic |
| Author |
Message |
coder sal Master Cheater
Reputation: 0
Joined: 11 May 2007 Posts: 304
|
Posted: Fri Feb 08, 2008 1:08 pm Post subject: How to disable maximize button- VB6 |
|
|
In this tut will teach you how to disable the maximize button in Visual Basic 6.0
First go to your declarations and put this in:
| Code: | Option Explicit
Private Const WS_MAXIMIZEBOX = &H10000
Private Const GWL_STYLE = (-16)
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 |
Then go to your form code and put this in:
| Code: | Private Sub Form1_Load()
Dim lngStyle As Long
lngStyle = GetWindowLong(Me.hwnd, GWL_STYLE)
lngStyle = lngStyle And Not (WS_MAXIMIZEBOX)
lngStyle = SetWindowLong(Me.hwnd, GWL_STYLE, lngStyle)
End Sub |
Hope this helped!
|
|
| Back to top |
|
 |
DeletedUser14087 I post too much
Reputation: 2
Joined: 21 Jun 2006 Posts: 3069
|
Posted: Fri Feb 08, 2008 1:21 pm Post subject: |
|
|
| idk if you have this in VB, but you can just select the form and disable the MAximize button (Boarder)
|
|
| Back to top |
|
 |
coder sal Master Cheater
Reputation: 0
Joined: 11 May 2007 Posts: 304
|
Posted: Fri Feb 08, 2008 1:45 pm Post subject: |
|
|
| That takes away the maximize button, in the tut I teach you how to disable the maximize button.
|
|
| Back to top |
|
 |
atom0s Moderator
Reputation: 205
Joined: 25 Jan 2006 Posts: 8587 Location: 127.0.0.1
|
|
| Back to top |
|
 |
coder sal Master Cheater
Reputation: 0
Joined: 11 May 2007 Posts: 304
|
Posted: Tue Feb 12, 2008 9:43 pm Post subject: |
|
|
I didn't get the code from any of those sites. I got it from a weird website really long ago and I made a .txt file for it. After like a while I decided to post the code on CEF, so idk who to give credits to, I would give credits though, I am not a leecher.
|
|
| Back to top |
|
 |
Trow Grandmaster Cheater
Reputation: 2
Joined: 17 Aug 2006 Posts: 957
|
Posted: Wed Feb 13, 2008 3:23 am Post subject: |
|
|
(really, selecting MaxButton and making it False on a standard form does the same thing...)
good for runtime adjustment, yes
_________________
Get kidnapped often. |
|
| Back to top |
|
 |
Tosy How do I cheat?
Reputation: 0
Joined: 20 Jul 2007 Posts: 5
|
Posted: Wed Feb 13, 2008 9:38 am Post subject: |
|
|
Lol..If you know Private declares then its very easy to code in VB
|
|
| Back to top |
|
 |
Heartless I post too much
Reputation: 0
Joined: 03 Dec 2006 Posts: 2436
|
Posted: Wed Feb 13, 2008 3:22 pm Post subject: |
|
|
Or...
You cn click the form and go to properties -> Maximize and change it to false.
_________________
What dosen't kill you, usually does the second time. |
|
| Back to top |
|
 |
XxOsirisxX Grandmaster Cheater Supreme
Reputation: 0
Joined: 30 Oct 2006 Posts: 1597
|
Posted: Wed Feb 13, 2008 3:29 pm Post subject: |
|
|
Sorry Wiccann, but this line is'nt neccessary
| Code: | | Private Const WS_MINIMIZEBOX = &H20000 |
_________________
|
|
| Back to top |
|
 |
atom0s Moderator
Reputation: 205
Joined: 25 Jan 2006 Posts: 8587 Location: 127.0.0.1
|
Posted: Wed Feb 13, 2008 4:35 pm Post subject: |
|
|
| XxOsirisxX wrote: |
Sorry Wiccann, but this line is'nt neccessary
| Code: | | Private Const WS_MINIMIZEBOX = &H20000 |
|
I never said any of the code was needed. I copy pasted from the link I credited just above the code.
_________________
- Retired. |
|
| Back to top |
|
 |
XxOsirisxX Grandmaster Cheater Supreme
Reputation: 0
Joined: 30 Oct 2006 Posts: 1597
|
Posted: Wed Feb 13, 2008 4:40 pm Post subject: |
|
|
| Wiccaan wrote: | | XxOsirisxX wrote: |
Sorry Wiccann, but this line is'nt neccessary
| Code: | | Private Const WS_MINIMIZEBOX = &H20000 |
|
I never said any of the code was needed. I copy pasted from the link I credited just above the code. |
My bad trough, i will read better before post next time =x
_________________
|
|
| Back to top |
|
 |
|