VB.NET - Borderless MDI child form issue on shown -
i working on project mdi forms. problem when open mdi child borderless form. moment see this...
and appears ok...
any idea can cause this? note title bar , bottom bar custom controls. formborderstyle
none
!!!
windows doesn't support changing border style mdi child windows. operating system lets it, unsupported configuration , quite buggy.
winforms supposed insulate these types of concerns, design flaw. should throwing exception when try modify formborderstyle
property of mdi child. implementing mdi support wasn't microsoft's biggest priority. dead when winforms first released way in 2001-ish. entire mdi paradigm no longer supported, , no longer recommended use in software.
as you've seen, can hack kind of works. flickering effect because windows trying draw non-client area supposed there.
two better ideas:
stop using obsolete mdi paradigm , find different, more user-friendly way implement ui. example, separate, top-level forms. or series of tabs.
stop using ugly custom "skins" break operating system's standard visual appearance, cannot customized or disabled user, , tend buggy.
if absolutely have this, , want make good, have re-implement mdi paradigm yourself. create standard form serve de-facto parent. then, instead of using mdi child forms, use series of usercontrol classes (or form toplevel
property set false
). can remove system-drawn border, allowing draw yourself. usercontrol objects displayed children of "main" form, other control be. far, good. now, ugly part you'll responsible managing these children yourself: showing them when necessary, hiding them when necessary, allowing user drag them around within "main" form, logic "maximizing" , "minimizing" them, etc. you'll have write own code that. recommend against it; getting type of thing right going rather difficult , of dubious value once finished.
Comments
Post a Comment