Jump to content
  • Advertisement

Archived

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

rob64464

Unclosable Window (C#)

This topic is 5398 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
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
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!