c# - Making a form be invisible when it first loads -
currently, form's opacity 0%, when loads, should invisible, when form loads, it's visible few seconds. since default opacity set 0% , form's visibility set false before it's opacity set 100%, think form should invisible until tell to.
public formmain() { initializecomponent(); this.visible = false; this.opacity = 1.00; }
how can make form invisible default?
it's possible. have prevent application class making form visible. cannot tinker application, that's locked up. works:
protected override void setvisiblecore(bool value) { if (!this.ishandlecreated) { this.createhandle(); value = false; } base.setvisiblecore(value); }
this one-time cancellation, next call show() or setting visible = true make visible. you'd need kind of trigger, notifyicon context menu typical. beware load event won't run until gets visible. else works normal, calling close() method terminates program.
Comments
Post a Comment