While we appreciate comments from our users, please follow our posting guidelines. Have you tried the Cyotek Forums for support from Cyotek and the community?

Styling with Markdown is supported

Original Comment

Gravatar

Darin

# Reply

Thank you for your work. I found this very useful.

Also, your note "Opened dialogs were frequently displayed behind existing windows of other applications." is an easily fixable issue. Google [C# messagebox.show "new form"], replacing "messagebox.show" with the type of dialog you want, and then search within each result's page for "new form". You will find it is hit and miss but you will find some people writing code like this (This example is from code I'm actively using..): var OFD = new OpenFileDialog() { Title = Title, Filter = Filter, FilterIndex = 1, RestoreDirectory = true, CheckFileExists = CheckExist, ValidateNames = true, Multiselect = false, InitialDirectory = FolderPath, }; if (OFD.ShowDialog(new Form() { TopMost = true, TopLevel = true }) == DialogResult.OK) { <<Code to process the user's selected file>> }

This works because ShowDialog takes on the properties, or one might say persona, of its owner ("new Form()" in this case). I believe the "new form()" is short lived and its memory is recycled. The new form does not show on the screen and has worked flawlessly every time I've used it.

Gravatar

Richard Moss

# Reply

Darin,

Thanks for the comments. Interesting approach for solving the modal issue, not a solution I would have thought of trying given it's slightly hackish nature. Useful to know, "just in case"!

Thanks again;
Richard Moss