?
Solved

Add minimize and maximize button to fixed dialog

Posted on 2006-11-09
2
Medium Priority
?
317 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:Yury Merezhkov
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 86

Accepted Solution

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

Author Comment

by:Yury Merezhkov
ID: 17909456
How about an A?

Thanks.
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

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

Most everyone who has done any programming in VB6 knows that you can do something in code like Debug.Print MyVar and that when the program runs from the IDE, the value of MyVar will be displayed in the Immediate Window. Less well known is Debug.Asse…
Enums (shorthand for ‘enumerations’) are not often used by programmers but they can be quite valuable when they are.  What are they? An Enum is just a type of variable like a string or an Integer, but in this case one that you create that contains…
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…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…
Suggested Courses
Course of the Month13 days, 12 hours left to enroll

801 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