?
Solved

System button (close)

Posted on 2006-04-10
6
Medium Priority
?
220 Views
Last Modified: 2010-04-05
Hi.

I would like to make the system close button (x) appear out of the title bar...
Somewhere inside the form so i dont have to use the title bar at all. (BorderStyle--->bsNone).
Is that possible without a component ?

Thanks in advance.
0
Comment
Question by:CodedK
  • 3
  • 2
6 Comments
 
LVL 15

Accepted Solution

by:
mikelittlewood earned 1400 total points
ID: 16416429
This is an integrated part of the title bar so no. You would have to use your own component, say a speed button if you wanted it to look similar.
0
 
LVL 16

Author Comment

by:CodedK
ID: 16416731
I've found this components :

http://www.soft-gems.net/ThemeManager.php
http://www.soft-gems.net/supplement/download.php?ID=46

There is a demo exe that can make the system button appear outside of the titlebar...
0
 
LVL 15

Assisted Solution

by:mikelittlewood
mikelittlewood earned 1400 total points
ID: 16417107
Note that this one will only work with XP as it is theme based
0
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

 
LVL 16

Author Comment

by:CodedK
ID: 16417766
:/ I dont want to use it though i justwanted to know if there is something i could do to force
the close button appear somewhere else...
0
 
LVL 4

Assisted Solution

by:tobjectpascal
tobjectpascal earned 600 total points
ID: 16418578
Other than...

procedure TForm1.Button1Click(Sender: TObject);
begin
  Close;
end;

If you simply don't want the person using the X in the top right, you could disable it.

var
  Form1: TForm1;
  CanExit: Boolean;

Then onCreate (of the form)


procedure TForm1.FormCreate(Sender: TObject);
begin
 CanExit:=False;
end;


Then click on the Form > Events

procedure TForm1.FormCloseQuery(Sender: TObject; var CanClose: Boolean);
begin
 CanClose:=CanExit;
end;


Then one more thing to add :)

Click on your button

procedure TForm1.Button1Click(Sender: TObject);
begin
  CanExit:=True;
  Close;
end;

or make your own close routine.

Procedure MyClose;
Begin
  CanExit:=True;
  Form.Close; //whatever your main form is?
End;
0
 
LVL 16

Author Comment

by:CodedK
ID: 16419050
Thank tobjectpascal  but i know all that stuff i was just wondering
if i can move out of the tilte bar the system button :)

Thanks anyway.
0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Hello everybody This Article will show you how to validate number with TEdit control, What's the TEdit control? TEdit is a standard Windows edit control on a form, it allows to user to write, read and copy/paste single line of text. Usua…
In my programming career I have only very rarely run into situations where operator overloading would be of any use in my work.  Normally those situations involved math with either overly large numbers (hundreds of thousands of digits or accuracy re…
Exchange organizations may use the Journaling Agent of the Transport Service to archive messages going through Exchange. However, if the Transport Service is integrated with some email content management application (such as an anti-spam), the admin…
We’ve all felt that sense of false security before—locking down external access to a database or component and feeling like we’ve done all we need to do to secure company data. But that feeling is fleeting. Attacks these days can happen in many w…
Suggested Courses

850 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