Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 209
Default Minimize a form

Hi!!

I have a form and in this form i have a button there open another
file , when i do this i want the first form to be minimize can't i do this?
my form name is priser i have try to find a code to minimize this form
but..........?

Alvin


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,452
Default Minimize a form

Look at this website:
http://www.bmsltd.ie/excel/SBXLPage.asp
Find FormFun.zip

But maybe it is easier just to make a button on the form
to set the height, width and top of the form.

RBS

"Alvin Hansen" wrote in message
...
Hi!!

I have a form and in this form i have a button there open another
file , when i do this i want the first form to be minimize can't i do
this?
my form name is priser i have try to find a code to minimize this form
but..........?

Alvin



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 77
Default Minimize a form

Hi

Go to www.vbusers.com and download flex controls. They are free and give you
controls you can drop an a vba userform to do form resizing and add min/max
buttons. Just drag it onto the form and set the properties.No programming at
all for min/max buttons.

You do have to register the control using regsvr32.


HTH

Ken


  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,452
Default Minimize a form

I had a go with that, but came to the conclusion that it was better to make
your own simple control (command button) that does exactly what you want.

RBS


"Ken Macksey" wrote in message
...
Hi

Go to www.vbusers.com and download flex controls. They are free and give
you controls you can drop an a vba userform to do form resizing and add
min/max buttons. Just drag it onto the form and set the properties.No
programming at all for min/max buttons.

You do have to register the control using regsvr32.


HTH

Ken


  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 209
Default Minimize a form

Thanks i try that

alvin


"RB Smissaert" skrev:

I had a go with that, but came to the conclusion that it was better to make
your own simple control (command button) that does exactly what you want.

RBS


"Ken Macksey" wrote in message
...
Hi

Go to www.vbusers.com and download flex controls. They are free and give
you controls you can drop an a vba userform to do form resizing and add
min/max buttons. Just drag it onto the form and set the properties.No
programming at all for min/max buttons.

You do have to register the control using regsvr32.


HTH

Ken





  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 24
Default Minimize a form

Hello

I just could not find flex controls at www.vbusers.com
(I'm looking for simple control to minimise userform)
any suggestions appreciated
Thanks
K




Alvin Hansen wrote:
Thanks i try that

alvin


"RB Smissaert" skrev:


I had a go with that, but came to the conclusion that it was better to make
your own simple control (command button) that does exactly what you want.

RBS


"Ken Macksey" wrote in message
.. .

Hi

Go to www.vbusers.com and download flex controls. They are free and give
you controls you can drop an a vba userform to do form resizing and add
min/max buttons. Just drag it onto the form and set the properties.No
programming at all for min/max buttons.

You do have to register the control using regsvr32.


HTH

Ken



  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 77
Default Minimize a form

Go To

www.vbusers.com

Enter the site, click Downloads on the left side menu. Item # 3 on the page
that opens.

HTH

Ken


"kurb" wrote in message
...
Hello

I just could not find flex controls at www.vbusers.com
(I'm looking for simple control to minimise userform)
any suggestions appreciated
Thanks
K




Alvin Hansen wrote:
Thanks i try that

alvin


"RB Smissaert" skrev:


I had a go with that, but came to the conclusion that it was better to
make
your own simple control (command button) that does exactly what you want.

RBS


"Ken Macksey" wrote in message
. ..

Hi

Go to www.vbusers.com and download flex controls. They are free and give
you controls you can drop an a vba userform to do form resizing and add
min/max buttons. Just drag it onto the form and set the properties.No
programming at all for min/max buttons.

You do have to register the control using regsvr32.


HTH

Ken





  #8   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 214
Default Minimize a form

Hi kurb,
not need dll or activeX
In UserForm module:
Option Explicit
Private Declare Function FindWindow& Lib "user32" Alias _
"FindWindowA" (ByVal lpClassName$, ByVal lpWindowName$)
Private Declare Function SetWindowLong& Lib "user32" Alias _
"SetWindowLongA" (ByVal hWnd&, ByVal nIndex& _
, ByVal dwNewLong&)
Private Declare Function EnableWindow& Lib "user32" _
(ByVal hWnd&, ByVal fEnable&)
Private Declare Function ShowWindow& Lib "user32" _
(ByVal hWnd&, ByVal nCmdShow&)
Private hWnd As Long

' Minimize in application
Private Sub UserForm_Initialize()
' Min: &H20000 / Max: &H10000 / Resize: &H40000
'Dim Style As Long
'Style = &H84C80080 Or &H20000 Or &H40000 ' = &H84CE0080
hWnd = FindWindow(vbNullString, Me.Caption)
SetWindowLong hWnd, -16, &H84CE0080
End Sub

Private Sub UserForm_Activate()
' Minimize in TaskBar (activate following lines)
'ShowWindow hWnd, 0
'SetWindowLong hWnd, -20, &H40101
'ShowWindow hWnd, 1
' no modal userform for xl97
EnableWindow FindWindow(vbNullString, Application.Caption), 1
End Sub

In standard module:
Sub FormShow()
#If VBA6 Then
UserForm1.Show 0
#Else
UserForm1.Show
#End If
End Sub

Regards,
MP

"kurb" a écrit dans le message de
...
Hello

I just could not find flex controls at www.vbusers.com
(I'm looking for simple control to minimise userform)
any suggestions appreciated
Thanks
K




Alvin Hansen wrote:
Thanks i try that

alvin


"RB Smissaert" skrev:


I had a go with that, but came to the conclusion that it was better to

make
your own simple control (command button) that does exactly what you

want.

RBS


"Ken Macksey" wrote in message
.. .

Hi

Go to www.vbusers.com and download flex controls. They are free and

give
you controls you can drop an a vba userform to do form resizing and add
min/max buttons. Just drag it onto the form and set the properties.No
programming at all for min/max buttons.

You do have to register the control using regsvr32.


HTH

Ken




  #9   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,452
Default Minimize a form

Thanks, that is nice and simple.
Would there be a way to have the maximize button on the form, but let the
application
run code when this gets pressed and not maximize the form?

RBS


"Michel Pierron" wrote in message
...
Hi kurb,
not need dll or activeX
In UserForm module:
Option Explicit
Private Declare Function FindWindow& Lib "user32" Alias _
"FindWindowA" (ByVal lpClassName$, ByVal lpWindowName$)
Private Declare Function SetWindowLong& Lib "user32" Alias _
"SetWindowLongA" (ByVal hWnd&, ByVal nIndex& _
, ByVal dwNewLong&)
Private Declare Function EnableWindow& Lib "user32" _
(ByVal hWnd&, ByVal fEnable&)
Private Declare Function ShowWindow& Lib "user32" _
(ByVal hWnd&, ByVal nCmdShow&)
Private hWnd As Long

' Minimize in application
Private Sub UserForm_Initialize()
' Min: &H20000 / Max: &H10000 / Resize: &H40000
'Dim Style As Long
'Style = &H84C80080 Or &H20000 Or &H40000 ' = &H84CE0080
hWnd = FindWindow(vbNullString, Me.Caption)
SetWindowLong hWnd, -16, &H84CE0080
End Sub

Private Sub UserForm_Activate()
' Minimize in TaskBar (activate following lines)
'ShowWindow hWnd, 0
'SetWindowLong hWnd, -20, &H40101
'ShowWindow hWnd, 1
' no modal userform for xl97
EnableWindow FindWindow(vbNullString, Application.Caption), 1
End Sub

In standard module:
Sub FormShow()
#If VBA6 Then
UserForm1.Show 0
#Else
UserForm1.Show
#End If
End Sub

Regards,
MP

"kurb" a écrit dans le message de
...
Hello

I just could not find flex controls at www.vbusers.com
(I'm looking for simple control to minimise userform)
any suggestions appreciated
Thanks
K




Alvin Hansen wrote:
Thanks i try that

alvin


"RB Smissaert" skrev:


I had a go with that, but came to the conclusion that it was better to

make
your own simple control (command button) that does exactly what you

want.

RBS


"Ken Macksey" wrote in message
.. .

Hi

Go to www.vbusers.com and download flex controls. They are free and

give
you controls you can drop an a vba userform to do form resizing and
add
min/max buttons. Just drag it onto the form and set the properties.No
programming at all for min/max buttons.

You do have to register the control using regsvr32.


HTH

Ken





Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Controling Your Customized Form? Can I minimize it? Mcasteel[_49_] Excel Programming 0 November 18th 04 02:51 PM
Minimize the VB form FuzzyLogic Excel Programming 0 October 29th 03 04:46 PM
Minimize the VB form FuzzyLogic Excel Programming 0 October 29th 03 04:16 PM
Minimize a form Bruce Roberson Excel Programming 2 August 22nd 03 10:13 PM
How to minimize a form using VB Jean Oct Excel Programming 2 July 28th 03 08:00 PM


All times are GMT +1. The time now is 09:35 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"