Articles   Members Online:
-Article/Tip Search
-News Group Search over 21 Million news group articles.
-Delphi/Pascal
-CBuilder/C++
-C#Builder/C#
-JBuilder/Java
-Kylix
Member Area
-Home
-Account Center
-Top 10 NEW!!
-Submit Article/Tip
-Forums Upgraded!!
-My Articles
-Edit Information
-Login/Logout
-Become a Member
-Why sign up!
-Newsletter
-Chat Online!
-Indexes NEW!!
Employment
-Build your resume
-Find a job
-Post a job
-Resume Search
Contacts
-Contacts
-Feedbacks
-Link to us
-Privacy/Disclaimer
Embarcadero
Visit Embarcadero
Embarcadero Community
JEDI
Links
How to disable the close X button on a form? Turn on/off line numbers in source code. Switch to Orginial background IDE or DSP color Comment or reply to this aritlce/tip for discussion. Bookmark this article to my favorite article(s). Print this article
Disable the close X button on a form? 08-Aug-04
Category
Win API
Language
Delphi All Versions
Views
434
User Rating
No Votes
# Votes
0
Replies
0
Publisher:
Darley, F. Joe
Reference URL:
			
1 2 unit Unit1; 3 4 interface 5 6 uses 7 Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, 8 Dialogs; 9 10 type 11 TForm1 = class(TForm) 12 procedure FormCreate(Sender: TObject); 13 private 14 { Private declarations } 15 public 16 { Public declarations } 17 end; 18 19 var 20 Form1: TForm1; 21 22 implementation 23 24 {$R *.dfm} 25 26 procedure TForm1.FormCreate(Sender: TObject); 27 28 var 29 hMenuHandle : HMENU; 30 begin 31 hMenuHandle := GetSystemMenu(Form1.Handle, FALSE); 32 if (hMenuHandle <> 0) then 33 DeleteMenu(hMenuHandle, SC_CLOSE, MF_BYCOMMAND); 34 end; 35 36 end.
Vote: How useful do you find this Article/Tip?
Bad Excellent
1 2 3 4 5 6 7 8 9 10

 

Advertisement
Share this page
Advertisement
Download from Google

Copyright © Mendozi Enterprises LLC