Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Windows Forms / WinForm General / April 2005

Tip: Looking for answers? Try searching our database.

How can I turn off the ControlBox but still have Close in the upper right of a form?

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Michael Howes - 31 Mar 2005 20:20 GMT
   I know I've done this in the past but can't remember how I did it.
How can I turn off the ControlBox but still have the Close X in the upper
right of a Form?

It's some combo of FixedDialog and ControlBox = false

thanks
mike
Rodger Constandse - 31 Mar 2005 21:19 GMT
If you set the FormBorderStyle to FixedDialog and leave the ControlBox set to
true, the dialog should show the Close X but not the "Control Box".

In the particular Form that I checked I also had the MaximizeBox/MinimizeBox
properties set to false and ShowInTaskbar was also set to false.

I've noticed in the past that for some of my dialogs, sometimes the Control Box
shows in the designer but not when you run the app.

Hope this helps

--
Rodger Constandse

<http://www.SequenceDiagramEditor.com>
Sequence Diagram Editor - A quick and easy way to draw and edit sequence diagrams

>     I know I've done this in the past but can't remember how I did it.
>  How can I turn off the ControlBox but still have the Close X in the upper
[quoted text clipped - 4 lines]
> thanks
> mike
Michael Howes - 01 Apr 2005 19:51 GMT
> I've noticed in the past that for some of my dialogs, sometimes the
> Control Box shows in the designer but not when you run the app.

this is exactly what was happening. Ugh...I had forgotten..that bug has
been in the designer for a long time

mike
Tim Wilson - 31 Mar 2005 21:32 GMT
If you're just looking to remove the min and max buttons, then you could set
the MaximizeBox and MinimixeBox properties to false.

Signature

Tim Wilson
.Net Compact Framework MVP

>     I know I've done this in the past but can't remember how I did it.
>  How can I turn off the ControlBox but still have the Close X in the upper
[quoted text clipped - 4 lines]
> thanks
> mike
Herfried K. Wagner [MVP] - 31 Mar 2005 21:34 GMT
"Michael Howes" <mhowes@xfortebio.com> schrieb:
>    I know I've done this in the past but can't remember how I did it.
> How can I turn off the ControlBox but still have the Close X in the upper
> right of a Form?
>
> It's some combo of FixedDialog and ControlBox = false

Set 'FormBorderStyle' to 'FixedDialog', 'MaximizeBox' and 'MinimizeBox' to
'False'.  At runtime set the form's 'Icon' property to 'Nothing'/'null'.

Signature

M S   Herfried K. Wagner
M V P  <URL:http://dotnet.mvps.org/>
V B   <URL:http://classicvb.org/petition/>


Rate this thread:







Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.