Click here to Skip to main content
15,902,492 members
Home / Discussions / C#
   

C#

 
QuestionDisabling the Close (X) command in Windows Pin
TheJudeDude9-May-06 9:58
TheJudeDude9-May-06 9:58 
AnswerRe: Disabling the Close (X) command in Windows Pin
Christian Graus9-May-06 10:36
protectorChristian Graus9-May-06 10:36 
GeneralRe: Disabling the Close (X) command in Windows Pin
TheJudeDude9-May-06 18:15
TheJudeDude9-May-06 18:15 
GeneralRe: Disabling the Close (X) command in Windows Pin
Christian Graus10-May-06 10:06
protectorChristian Graus10-May-06 10:06 
AnswerRe: Disabling the Close (X) command in Windows Pin
User 17164929-May-06 10:38
professionalUser 17164929-May-06 10:38 
GeneralRe: Disabling the Close (X) command in Windows Pin
TheJudeDude9-May-06 18:16
TheJudeDude9-May-06 18:16 
GeneralRe: Disabling the Close (X) command in Windows Pin
User 171649210-May-06 0:00
professionalUser 171649210-May-06 0:00 
AnswerRe: Disabling the Close (X) command in Windows Pin
Luis Alonso Ramos9-May-06 17:48
Luis Alonso Ramos9-May-06 17:48 
I didn't understand your question very well, but if you only want to disable the Close button on your C# form, just add this property to your Form:
class MyForm : Form
{
    ...
 
    protected override CreateParams CreateParams
    {
        get
        {
            CreateParams createParams = base.CreateParams;
            createParams.ClassStyle |= 0x200;  // CS_NOCLOSE
            return createParams;
        }
    }
 
    ...
}
I hope this helps!

Luis Alonso Ramos
Intelectix
Chihuahua, Mexico

Not much here: My CP Blog!
GeneralRe: Disabling the Close (X) command in Windows Pin
TheJudeDude9-May-06 18:17
TheJudeDude9-May-06 18:17 
QuestionC# winsock getdata problem Pin
_tasleem9-May-06 9:30
_tasleem9-May-06 9:30 
QuestionDefining DataType to DataColumn Pin
NaNg152419-May-06 9:14
NaNg152419-May-06 9:14 
QuestionNetwork Traffic Pin
SoftcodeSoftware9-May-06 9:08
SoftcodeSoftware9-May-06 9:08 
AnswerRe: Network Traffic Pin
Ravi Bhavnani9-May-06 10:41
professionalRavi Bhavnani9-May-06 10:41 
GeneralRe: Network Traffic Pin
SoftcodeSoftware9-May-06 11:13
SoftcodeSoftware9-May-06 11:13 
QuestionCustom collections with DataGridView Pin
Wjousts9-May-06 8:13
Wjousts9-May-06 8:13 
QuestionRemoving white spaces from an ArrayList Pin
Rizwan Rathore9-May-06 7:47
Rizwan Rathore9-May-06 7:47 
AnswerRe: Removing white spaces from an ArrayList Pin
cshivaprasad9-May-06 7:51
cshivaprasad9-May-06 7:51 
AnswerRe: Removing white spaces from an ArrayList Pin
Wjousts9-May-06 8:04
Wjousts9-May-06 8:04 
AnswerRe: Removing white spaces from an ArrayList Pin
Christian Graus9-May-06 10:37
protectorChristian Graus9-May-06 10:37 
Questiontab char Pin
Manu_819-May-06 7:45
Manu_819-May-06 7:45 
AnswerRe: tab char Pin
Wjousts9-May-06 8:14
Wjousts9-May-06 8:14 
GeneralRe: tab char Pin
Manu_819-May-06 8:16
Manu_819-May-06 8:16 
GeneralRe: tab char Pin
NaNg152419-May-06 9:18
NaNg152419-May-06 9:18 
Questionaccesing form from another Class Pin
cshivaprasad9-May-06 7:41
cshivaprasad9-May-06 7:41 
AnswerRe: accesing form from another Class Pin
led mike9-May-06 8:45
led mike9-May-06 8:45 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.