Launching application with parameter -hidden, trayicon crash c# -
i found code parameters in program:
static void main(string[] args) { bool minimalised = false; if (args.length > 0 && args[0] != null && args[0] == "-hidden") minimalised = true; application.enablevisualstyles(); application.setcompatibletextrenderingdefault(false); application.run(new main(minimalised));
in main:
public main(bool minimalised) { initializecomponent(); if (minimalised) this.windowstate = formwindowstate.minimized; else this.show();
when parse -hidden programme beeing shown in tray, when click icon crashes error:
http://i.stack.imgur.com/hvpjm.png
i want aplication remain minimalised if lauched parameter, able maxymalise after click on trayicon.
what doing wrong?
this.showintaskbar = false;
i don't know why exacly, helped. #fixed
c# parameters tray
No comments:
Post a Comment