Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
 
  HOME    TRACKER    Visual Basic




How To Remove The Close Button Of The Form Without Removing The Minimize And Maximize


Hi! I need some help help. I want to remove the close button of the form but retains the minimize and maximize buttons. I'm using VB6.

Thanks!




View Complete Forum Thread with Replies

See Related Forum Messages: Follow the Links Below to View Complete Thread
Remove Close,minimize And Maximize Button But Retain The Icon
I would like to put icon on the title bar without the close,maximize and minimize buttons. Is this possible?

Multiple Set Of Minimize/maximize/close Button On The MDI Form
I have been getting multiple set of form tool buttons on the MDI form and when I close the child forms they still remain. I have tried many unloads and all but stilll it persist. Please help.



Edited by - ezejoe on 10/31/2007 9:01:34 AM

Removing Minimize/maximize Button Of MDIForm's Caption Bar
Hi Gurus!
How can I do in order to remove minimize/maximize/close button of MDIForm's caption bar?

Could anyone let me know?

DonYoung,Jeong

Removing Minimize/maximize Button Of MDIForm's Caption Bar
Hi Gurus!
How can I do in order to remove minimize/maximize/close button of MDIForm's caption bar?

Could anyone let me know?

DonYoung,Jeong

Minimize, Maximize, Close And -my- Button
hi,
how can i put my own button next to minimize, maximize and close?

and question 2:
can i use the '?' button for other use (instead of help)?

thanks..

Add Another Button Next To The Minimize,maximize, Close Buttons
is there away to add another button to the left of the minimize butotn in the control bar of my program?? i know theres away, im just tring to figure out how...kinda like how the all api guid program has that lil . that puts it in the tray

How To Disable The Minimize, Maximize & Close Buttons On A Form??
Greetings every1,
can any1 plz tell me if there is a way to disable the minimize,maximize and close button on a form. I dont want to use the ControlBox property, i want the buttons to be visible but they must be disabled. I know this is possible, but just dont know the method. This should be done using APIs.

How To Disable The Minimize, Maximize & Close Buttons On A Form??
Greetings every1,
can any1 plz tell me if there is a way to disable the minimize,maximize and close button on a form. I dont want to use the ControlBox property, i want the buttons to be visible but they must be disabled. I know this is possible, but just dont know the method. This should be done using APIs.

How To Disable The Minimize, Maximize & Close Buttons On A Form??
Greetings every1,
can any1 plz tell me if there is a way to disable the minimize,maximize and close button on a form. I dont want to use the ControlBox property, i want the buttons to be visible but they must be disabled. I know this is possible, but just dont know the method. This should be done using APIs

Disable Minimize And Maximize Button Of A Form?
Hello, Everyone:
I would like to disable minimize and maximize button of a Form. I don't know why the code in this link doesn't work. Also, who can tell me how I disable them by doing so before creating the window? And I want to only keep X close window?
Thank you very much!
Charlie


http://www.mangovision.com/vbapi/ref/r/removemenu.html

Remove Maximize Button From MDI Form
How can I remove the maximize button from a MDI form, leaving the minimize and the close buttons?

I know how to prevent it from getting maximized, but I'd like to REMOVE the button.

ANA MONTEIRO

Remove Maximize Button On MDI Form???
How can one remove the maximize button on a MDI form??? And also make the form not resizeable...???

/Smirre

The Close Maximize And Minimize Buttons
how do i remove them from my program is it possible?

Word 2000: Add The Minimize Maximize Button To A Word Form
Using VBA and possibly the AppendMenu API, has anyone had any success adding the Minimize and Maximize button next to the X (Close) button in the upper right hand corner of a Word Form?

Removing The Tooltip For The Close Button Of A Form
Hello

is it possible to remove the tooltip of the close button(top right x) button of a form?

Remove Close-Button On A Form?
Hello everybody,
how can I remove the close button on a form?
I already now the API-Function 'RemoveMenu'.
But although the function is called remove.. with this function the close button will be only disabled
and not really removed. (it's still visible)
Is there any other function, which really remove the button or at least make it unvisible so that the user
can't see it nor click on it?
Thanks in advance
Greets
Swisslupo

How To Remove Form Close Button?
Can anybody teach me how to remove the close button from form. I'm able to remove the max and min button, but not for close button.

Thank you.

Minimize/maximize Button In MDI
Hi,

I have a graphical problem with the minimize/maximize buttons (control box) of MDI children.
See this attachment:
http://www.xtremevbtalk.com/attachme...id=26080&stc=1

there are displayed to times the control box.
when i click on the minimize/maximize button the second disappears and only one is drawn correctly aft6erwards. did anyone experience similiar problems?
whats a solution to this? programming a click on the buttons??

thanks

Minimize, Maximize And X Button
I don't know what happened

Hi,

At the top of a form, we have minimize, maximize and X button... If I want to program when I quit with the X button, how can I catch the X button?

Thanks in advance

Mel

Detecting Maximize/minimize Button Presses
Which event handler would I use to detect the form maximize/minimize button presses how do I detect them ?

thanks

Showing The Minimize And Maximize Button On The Title Bar?
Now now now.....I've a form whereby I set the border style property to Fixed Dialog. Now, after setting this style, there doesn't seem to be any Minimize or Maximize buttons on the form's title bar.

Is there a way to show this? Thanks a lot!

How To Disable Minimize & Maximize Button Of MDI Child Forms
Hi all,

How to Disable Minimize & Maximize Button of MDI Child Forms

thanks

Capture Minimize/Maximize Button Click Event
Hi,
can i capture click event if user click Minimize/Maximize buttons of a regular vb form? any other way except form resize event.

Thanx in advance

Mdi Form Minimize Maximize
how can i remove/disable the minimize and maximize button on my mdi form? tx

How 2 Do Form Minimize, Maximize
Hi All,
I wanted to make a borderless windows with minimize and maximize functions ......i wanted to add this functionality to my software using command buttons and not the control box... how can this be done ....please help me with some source code....i'm using vb6.0.

Minimize / Maximize VB Form
Hi everyone,

In my coding for a form (say, form_A.frm), I wish to minimize it (form_A.frm) after user presses a button. Likewise, I want to maximize the form (form_A.frm) later when an event is triggered.

I know there is a Shell command that allows maximize of an application by using 'vbMaximizedFocus' as WindowStyle. But this is meant for applications, and not VB forms, am I right? How do I get a form minimized / maximized?

Thankies in advance!

Removing The Restore Down/Maximize Button From Title Bar
I wanted the option in the title bar to minimize and then maximize the userform in my vba program, and I happened to come across this API code which works very well (shown below). The problem is the button in the titel bar inbetween the Close Button and Minimize button, which I believe is called the restored down/maximize button (puts your form to fullscreenmode) is active and I would very much like it not to be. At this point, I do not understand enough about the API process to modify this code myself, so if anyone could modify this code to simply disable that restore down button that would be great! Or if it's easier to present a new code, that would be appreciated as well.

Thank you.

Option Explicit

Private Declare Function FindWindow Lib "user32" Alias "FindWindowA" (ByVal lpClassName As String, ByVal lpWindowName As String) As Long
Private Declare Function GetWindowLong Lib "user32" Alias "GetWindowLongA" (ByVal hwnd As Long, ByVal nIndex As Long) As Long
Private Declare Function SetWindowLong Lib "user32" Alias "SetWindowLongA" (ByVal hwnd As Long, ByVal nIndex As Long, ByVal dwNewLong As Long) As Long
Private Declare Function DrawMenuBar Lib "user32" (ByVal hwnd As Long) As Long
Private Declare Function ShowWindow Lib "user32" (ByVal hwnd As Long, ByVal nCmdShow As Long) As Long

Private Const GWL_STYLE As Long = (-16) 'Sets a new window style
Private Const WS_SYSMENU As Long = &H80000 'Windows style
Private Const WS_MINIMIZEBOX As Long = &H20000
Private Const WS_MAXIMIZEBOX As Long = &H10000
Private Const SW_SHOWMAXIMIZED = 3

Private Sub userform_activate()
Dim lFormHandle As Long, lStyle As Long
'===========================================
'= Originally from Dax =
'= Modified with comments by Ivan F Moala =
'= 22/07/01 =
'===========================================

'Lets find the UserForm Handle the function below retrieves the handle
'to the top-level window whose class name ("ThunderDFrame" for Excel)
'and window name (me.caption or UserformName caption) match the specified strings.
lFormHandle = FindWindow("ThunderDFrame", Me.Caption)

'The GetWindowLong function retrieves information about the specified window.
'The function also retrieves the 32-bit (long) value at the specified offset
'into the extra window memory of a window.
lStyle = GetWindowLong(lFormHandle, GWL_STYLE)

'lStyle is the New window style so lets set it up with the following
lStyle = lStyle Or WS_SYSMENU 'SystemMenu
lStyle = lStyle Or WS_MINIMIZEBOX 'With MinimizeBox
lStyle = lStyle Or WS_MAXIMIZEBOX 'and MaximizeBox

'Now lets set up our New window the SetWindowLong function changes
'the attributes of the specified window , given as lFormHandle,
'GWL_STYLE = New windows style, and our Newly defined style = lStyle
SetWindowLong lFormHandle, GWL_STYLE, (lStyle)

'Remove >'< if you want to show form Maximised
'ShowWindow lFormHandle, SW_SHOWMAXIMIZED 'Shows Form Maximized

'The DrawMenuBar function redraws the menu bar of the specified window.
'We need this as we have changed the menu bar after Windows has created it.
'All we need is the Handle.
DrawMenuBar lFormHandle

End Sub

Making A Form's Close/&"X&" Button Minimize Application To System Tray
I can minimize my application to the system tray by clicking Minimize or "_" but how do I set the form to minimize by clicking "X" in the top right? Users complain that it should minimize to their system trays like their IM programs, rather than closing as it does now.

Maximize And Minimize Form With Code
Hi! How to maximize and minimize form with code?
Thanks

Form Resize, Maximize, Minimize, Etc.
How do I fire up an event when the maximize/minimize/resize button was clicked on the title bar of a form?
I guess there's a way if you have the timer running when it checks for window state, but I am looking for more "intelligent" way to do it
Thanks!

Remove Exit Button But Leave Minimize Button
How can I remove the exit button on the top right corner of a form, while leaving the minimize button?

Using Minimize And Maximize Option In VBA User Form
hi everyone........
I have to two excel sheets with one having User form....when i try to restore the 2nd sheet the the sheet with the user form gets restored.....
Can some one tell me is there any event related to minimization or maximisation of Excel sheet????? Or else By any means can i use minimize and maximize button in User form???/
PLease mail me at ranjan.amit@tcs.com
with regards.....
Amitt

Remove Minimize Button From Calculator
I'm having difficulty getting the minimize button to stop working on the windows calculator program. I don't want people to be able to minimize the program, but force them to close it.

the minimize menu item will disapper, but the button is still active.
thanks


VB Code:
Public Sub OpenCalculator()Dim nhwnd As LongDim ncount As Long nhwnd = FindWindowEx(0, 0, vbNullString, "Calculator")   If nhwnd = 0 Then   Shell "calc.exe"   nhwnd = FindWindow(vbNullString, "Calculator")   ncount = GetMenuItemCount(GetSystemMenu(nhwnd, 0))   RemoveMenu GetSystemMenu(nhwnd, 0), ncount - 4, MF_BYPOSITION Or MF_REMOVE   DrawMenuBar nhwnd   SetParent nhwnd, MDIForm1.hwnd  Else   ShowWindow nhwnd, SW_NORMALEnd IfEnd Sub

Close Button And Minimize Button (RESOLVED)
Is there anyway to disable/get rid of the Close button on a form, but still have the minimize button? I want people to click Exit on my app, in order to clean up some things, rather than clicking the close button. Any help or suggestions would be appreciated.



Edited by - jakohler on 6/1/2004 10:28:28 AM

To Disable Minimize And Close Button In VB6
I have created one form in VB which after validating proper user id and password allows internet access to the user. So if user is authorised to log in, form creates object of IE. But I've hide taskbar and also have disabled alt+tab key. so I want to keep atleast one window of IT to be open. So for that I want to disable minimize key and close button. So plz help me.

Thanks

How Do I Minimize A Form Without Clicking The Minimize Button???
Hi,

I would like to mimimize a form with a button called cmdMinimize???

Thanks

Removing Close Button
Hi
Can anyone tell me how to remove the "Close" button on the top right of a form please?
Thanking you in advance
PORRASTAR

How To REMOVE The X Close Button?
Umm, ive searched the forums but cant find how to REMOVE the x(close) not disable it?? anyone know how to??

Add A Button In Front Of The Minimize-button Kind Of 'minimize-to-system-tray-button'
At the moment I'm trying to add an icon in the system tray for my app - maybe i'll make it.
When I have made it I'd like to add a button in front of the min-button on the title bar of the apps form (like the one on All-API's API-Guide ), in order to empower the user to minimize the app even further, i.e. to the system tray - how can this be achieved?

thx,

Helger

How To Remove Control Box (close Button)
Hi all, I woul like to know how to remove the control box in a form at run time.

I appreciate for any comments.

Remove Workbook Close Button
I am trying to remove the x button from a workbook running in my VB-automated excel application. I used API calls to remove the x button, but it only disappears when the workbook window is minimized. When it is maximized, the x button re-appears in the menu bar. Has anybody had that problem before? Thanks a ton!

Remove Close Button From App Window
How do I remove the close (X) button from my Application window ? What is the API call to do this, and what are the steps please .

Thanx in advance.

Remove Close Button From InputBox Function
Is there any way to remove the close button from the InputBox function ?

Form Maximize Button
How do i disable the maximize button on the form, i cant do the borderstyle, it doesnt show a style that disables the maximize button, how do i?

Maximize Button On MDI Form
Hi...
How can I make disable maximize button on MDI form?
Thanks..

How To Disable Maximize Button In MDI Form
Hello There,
Can anyone please tell me how to disable maximize button in MDI Form. I also want to disable form resize function on that MDI Form. I have a little idea that if I use API programming I could do it. But I dont know how to do it. Plz help me...THANKS

Disabling Maximize Button On A MDI Form
How can I disable the Maximize button on my MDI form? Can't find the property. I know the button is there for a reason but I don't wanna write code to resize all the child forms.

Sand Hawk

Disable Maximize Button On MDI Form?
hi

is there any way i can disable the maximize button on a MDI form..

before anyone tells me to disable the maxbutton in the properties the MDI forms dont have that option.

Cheers, Philly



Edited by - CopyrightPhilly2k4 on 11/9/2004 5:09:14 PM

Disable VB MDI Form Maximize Button
Hi,
How can I disable the MDI maximize button in Visual Basic 6.0.

Copyright © 2005-08 www.BigResource.com, All rights reserved