|
-
Sep 18th, 2000, 05:26 PM
#1
Thread Starter
Frenzied Member
how do I only show the X disabled in the top right corner, no Max or Min, and also no Icon?
NXSupport - Your one-stop source for computer help
-
Sep 18th, 2000, 05:31 PM
#2
Set the MinButton to False
Set the MaxButton to False
Set the Icon to (None) (By highlighing the icon property and pressing Delete)
Set the BorderStyle to Fixed Dialog
Add the following code to your Form to disable the X.
Code:
Private Declare Function GetSystemMenu Lib "user32" (ByVal hwnd As Long, ByVal bRevert As Long) As Long
Private Declare Function RemoveMenu Lib "user32" (ByVal hMenu As Long, ByVal nPosition As Long, ByVal wFlags As Long) As Long
Private Const MF_BYPOSITION = &H400&
Private Sub Form_Load()
RemoveMenu GetSystemMenu(hwnd, 0), 6, MF_BYPOSITION
End Sub
-
Sep 18th, 2000, 05:39 PM
#3
Thread Starter
Frenzied Member
NXSupport - Your one-stop source for computer help
-
Sep 18th, 2000, 06:51 PM
#4
Hello,
Sorry to bust in on this thread, but is there also away to disable the Maximize button on a MDI form? I have been trying to find a way to do this for some time but with not luck so far!
Best
-
Sep 18th, 2000, 06:54 PM
#5
Thread Starter
Frenzied Member
Make a normal form think that its an mdi parent by this code that I got from megatron:
Code:
Private Declare Function SetParent Lib "user32" (ByVal hWndChild As Long, ByVal hWndNewParent As Long) As Long
Private Sub Form_Load()
form1.Show
SetParent form2.hwnd, form1.hwnd
End Sub
NXSupport - Your one-stop source for computer help
-
Sep 18th, 2000, 07:12 PM
#6
This will disable the max button in an mdi form.
Code:
Private Declare Function GetSystemMenu Lib "user32" (ByVal hwnd As Long, ByVal bRevert As Long) As Long
Private Declare Function RemoveMenu Lib "user32" (ByVal hMenu As Long, ByVal nPosition As Long, ByVal wFlags As Long) As Long
Private Const MF_BYPOSITION = &H400&
Private Sub MDIForm_Load()
RemoveMenu GetSystemMenu(hWnd, 0), 4, F_BYPOSITION
End Sub
-
Sep 18th, 2000, 08:10 PM
#7
Great I'll give it a shot thanks a bunch!
-
Sep 19th, 2000, 02:54 AM
#8
Conquistador
if you set icon to (none), the icon is replaced by a windows icon (at least it was on mine?)
-
Sep 19th, 2000, 05:48 AM
#9
Thread Starter
Frenzied Member
smae thing happened to me, but I'm OK with it
NXSupport - Your one-stop source for computer help
-
Sep 19th, 2000, 02:58 PM
#10
Originally posted by da_silvy
if you set icon to (none), the icon is replaced by a windows icon (at least it was on mine?)
Did you remember to change your borderstyle to FixedSingle or FixedDialog?
-
Sep 19th, 2000, 03:01 PM
#11
Thread Starter
Frenzied Member
I had it set ot a single, now I changed it to a FixDialog, and it doesn't show the icon
NXSupport - Your one-stop source for computer help
-
Sep 19th, 2000, 03:03 PM
#12
Isn't that what you wanted?
-
Sep 19th, 2000, 03:04 PM
#13
Thread Starter
Frenzied Member
yea it is, I'm just saying that if you set it to single it will still show the icon
NXSupport - Your one-stop source for computer help
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|