Solved

Add minimize and maximize button to fixed dialog

Posted on 2006-11-09
2
313 Views
Last Modified: 2008-01-09
Hi guys,

I want to have a form that has typical set of title buttons. Min/Max/Close. I want to block Max. What I have right now is a sizeable form with Max button blocked and also I use this code to prevent user from resizing manually:

Public Declare Function GetSystemMenu Lib "user32" (ByVal hwnd As Long, ByVal bRevert As Long) As Long
Public Declare Function DeleteMenu Lib "user32" (ByVal hMenu As Long, ByVal nPosition As Long, ByVal wFlags As Long) As Long
Public Const SC_SIZE = &HF000&
Public Const MF_BYCOMMAND = &H0&

Private Sub Form_Load()
    Dim hMenu As Long
    Dim fSuccess As Long
   
    hMenu = GetSystemMenu(Me.hwnd, 0)
    fSuccess = DeleteMenu(hMenu, SC_SIZE, MF_BYCOMMAND)
End Sub

It won't let resize but whenever I put mouse over the border it shows that resize arrow cursor. I want a regular cursor.

Is there a way to show default cursor in this case? If no, how can I add min and max buttons (with max being blocked) on form set to fixed dialog?
0
Comment
Question by:RealSnaD
2 Comments
 
LVL 85

Accepted Solution

by:
Mike Tomlinson earned 500 total points
ID: 17909407
How about using?...
   
    BorderStyle = 1- Fixed Single
    MaxButton = False
    MinButton = True
    ShowInTaskBar = False
0
 
LVL 7

Author Comment

by:RealSnaD
ID: 17909456
How about an A?

Thanks.
0

Featured Post

Complete VMware vSphere® ESX(i) & Hyper-V Backup

Capture your entire system, including the host, with patented disk imaging integrated with VMware VADP / Microsoft VSS and RCT. RTOs is as low as 15 seconds with Acronis Active Restore™. You can enjoy unlimited P2V/V2V migrations from any source (even from a different hypervisor)

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I’ve seen a number of people looking for examples of how to access web services from VB6.  I’ve been using a test harness I built in VB6 (using many resources I found online) that I use for small projects to work out how to communicate with web serv…
The debugging module of the VB 6 IDE can be accessed by way of the Debug menu item. That menu item can normally be found in the IDE's main menu line as shown in this picture.   There is also a companion Debug Toolbar that looks like the followin…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…

772 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question