ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   VB6 form show Minimize button (https://www.excelbanter.com/excel-programming/330916-vb6-form-show-minimize-button.html)

RB Smissaert

VB6 form show Minimize button
 
Using a VB6 form in Excel as in the book Professional Excel Development.
This is the VB6 code that loads the form:

Public Sub ShowVB6Form()

Dim frmHelloWorld As FHelloWorld
Set frmHelloWorld = New FHelloWorld

Load frmHelloWorld
SetWindowLongA frmHelloWorld.hwnd, GWL_HWNDPARENT, mlXLhWnd
frmHelloWorld.Show 0

Set frmHelloWorld = Nothing

End Sub

Despite doing show Minimize button is True in the VB6 form properties, the
minimize button doesn't show.
The form can be minimized though via the title bar right-click menu.
How do I make the minimize button show?


RBS


Rob Bovey

VB6 form show Minimize button
 
Hi RB,

If you're working off the sample project from the CD, you'll need to
change the BorderStyle property of the VB6 form to either Fixed Single or
Single and set the MinButton property to True. The current Fixed Dialog
border style doesn't support minimize and maximize buttons.

--
Rob Bovey, Excel MVP
Application Professionals
http://www.appspro.com/

* Take your Excel development skills to the next level.
* Professional Excel Development
http://www.appspro.com/Books/Books.htm

"RB Smissaert" wrote in message
...
Using a VB6 form in Excel as in the book Professional Excel Development.
This is the VB6 code that loads the form:

Public Sub ShowVB6Form()

Dim frmHelloWorld As FHelloWorld
Set frmHelloWorld = New FHelloWorld

Load frmHelloWorld
SetWindowLongA frmHelloWorld.hwnd, GWL_HWNDPARENT, mlXLhWnd
frmHelloWorld.Show 0

Set frmHelloWorld = Nothing

End Sub

Despite doing show Minimize button is True in the VB6 form properties, the
minimize button doesn't show.
The form can be minimized though via the title bar right-click menu.
How do I make the minimize button show?


RBS




RB Smissaert

VB6 form show Minimize button
 
Rob,

BorderStyle Fixed Single did the trick, thanks.
Didn't see the option Single.

RBS

"Rob Bovey" wrote in message
...
Hi RB,

If you're working off the sample project from the CD, you'll need to
change the BorderStyle property of the VB6 form to either Fixed Single or
Single and set the MinButton property to True. The current Fixed Dialog
border style doesn't support minimize and maximize buttons.

--
Rob Bovey, Excel MVP
Application Professionals
http://www.appspro.com/

* Take your Excel development skills to the next level.
* Professional Excel Development
http://www.appspro.com/Books/Books.htm

"RB Smissaert" wrote in message
...
Using a VB6 form in Excel as in the book Professional Excel Development.
This is the VB6 code that loads the form:

Public Sub ShowVB6Form()

Dim frmHelloWorld As FHelloWorld
Set frmHelloWorld = New FHelloWorld

Load frmHelloWorld
SetWindowLongA frmHelloWorld.hwnd, GWL_HWNDPARENT, mlXLhWnd
frmHelloWorld.Show 0

Set frmHelloWorld = Nothing

End Sub

Despite doing show Minimize button is True in the VB6 form properties,
the minimize button doesn't show.
The form can be minimized though via the title bar right-click menu.
How do I make the minimize button show?


RBS






All times are GMT +1. The time now is 06:16 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com