c# - Why is ShowInTaskbar freezing the application? -


i need hide form @ startup of operating system(windows 7).
accomplish that, tried solution:-

if (program.args == "/startup") {     this.hide();     this.showintaskbar = false; } 

i had above code in form1_load event, program.args command line argument supplied program.

what wrong in above code?

how can accomplish hiding of form through command line arguments?

as people suggested use
this.windowstate = formwindowstate.minimized
this.showintaskbar = false tried application freezes, this:-

enter image description here

if comment out line
this.showintaskbar = false
runs shows icon in task bar.

normal of application :-

enter image description here

try changing visibility. error code on code because of conversion of args string ... works fine.

private void form1_load(object sender, eventargs e) {     this.visible = false;     this.showintaskbar = false; } 

Comments

Popular posts from this blog

python - Subclassed QStyledItemDelegate ignores Stylesheet -

java - HttpClient 3.1 Connection pooling vs HttpClient 4.3.2 -

SQL: Divide the sum of values in one table with the count of rows in another -