• Advertisement

Archived

This topic is now archived and is closed to further replies.

Unclosable Window (C#)

This topic is 5218 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hello, How do you make a window so it cannot be closed by ''Alt & F4'' or by the ''Close Button (X)'' at the top of the window? Any C# coders want to tell me? Cheers, Rob

Share this post


Link to post
Share on other sites
Advertisement
Guest Anonymous Poster
just take the message but don''t process it.

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
Using winforms, handle the Closing event and set the .Handled parameter of the CancelEventArgs to true.

Share this post


Link to post
Share on other sites

protected override void WndProc(ref Message m)
{
if(m.Msg == 0x10)
return;

base.WndProc (ref m);
}

Share this post


Link to post
Share on other sites
Martee, that''s not a good thing to do. Better do exactly as the anonymous poster said.

ZixThree

Share this post


Link to post
Share on other sites
Thanks a lot! I have never made a ''MultiWindow'' game before in C#. How do I make a form called ''FeatureBoard'' become visble as well as the main form ''form1''?


Thanks again,
Rob

Share this post


Link to post
Share on other sites

  • Advertisement