?
Solved

Add minimize and maximize button to fixed dialog

Posted on 2006-11-09
2
Medium Priority
?
318 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

On Demand Webinar: Networking for the Cloud Era

Ready to improve network connectivity? Watch this webinar to learn how SD-WANs and a one-click instant connect tool can boost provisions, deployment, and management of your cloud connection.

Question has a verified solution.

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

If you have ever used Microsoft Word then you know that it has a good spell checker and it may have occurred to you that the ability to check spelling might be a nice piece of functionality to add to certain applications of yours. Well the code that…
This article describes some techniques which will make your VBA or Visual Basic Classic code easier to understand and maintain, whether by you, your replacement, or another Experts-Exchange expert.
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 process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
Suggested Courses

649 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