Simply: how can I do that?
(and I want to have titlebar and an icon and close button in it)
Thanks for any help,
Printable View
Simply: how can I do that?
(and I want to have titlebar and an icon and close button in it)
Thanks for any help,
Set the Form's Moveable property to False.
There is no moveable in VB4
Damn, you can't subclass either :rolleyes:.
So just have a timer, set it's interval at 1, and make the Top and Left property whatever you want them to stay at.
Matthew, you can do it by the RemoveMenu API:
NOTE: But this Position will change upon 1 element is being remove from the menuCode:Option Explicit
'//WIN32API Declare
Private Declare Function RemoveMenu Lib "user32" (ByVal hMenu As Long, ByVal nPosition As Long, ByVal wFlags As Long) As Long
Private Declare Function GetSystemMenu Lib "user32" (ByVal hwnd As Long, ByVal bRevert As Long) As Long
'//WIN32API Constant
Private Const MF_BYPOSITION = &H400&
Private Sub Form_Load()
Dim hMenu As Long
'//Get the Menu handle
hMenu = GetSystemMenu(Me.hwnd, 0)
'//Reference
'// Position 0 is Restore Button
'// Position 1 is Move Button
'// Position 2 is Size Button
'// Position 3 is Max Button
'// Position 4 is Min Button
'// Position 5 is Seperator
'// Position 6 is Close Button
'//Remove the X button
RemoveMenu hMenu, 1, MF_BYPOSITION
End Sub
Ok, thanks, I check it out :rolleyes:
The API thingy didn't work. I also tried removing other things, but it just didn't work. Does it only work with sizable form? Because I tried it only for fixed form.
It work fine for me (when I change it to Fixed Single/Fixed Dialog).
Perhaps you try to copy the GetSystemMenu and RemoveMenu API declare from your VB4.0 API Viewer.
Are you using a 16-bit version of windows?
Nop, Win98.
I try Chris' tip
Okay, it's working, thanks :)