Why do we need to use the delegated solution?
Cause: 1. declare the main form object call (New frmmain () in other subforms (). c_nfiserver.showballoontip (100, "system prompt", value, tooltipicon. info);), two System Tray icons are generated. 2. Call a method. The method must be declared as a static method, but the form object cannot be called within the static method. Instance 1: frmmain. CS: Public Delegate void showballoontipdelegate (string value ); Public static showballoontipdelegate; Public frmmain () {initializecomponent (); c_nbcmian.groups.clear (); this. lookandfeel. skinname = loginmng. logininfo. person. personskin; _ formmng = new formmng (this, classname, loginmng. logininfo. person. personskin ); Showballoontipdelegate = showballoontipinfo; } Private void frmmain_load (Object sender, eventargs e) {frmwaiting. Show (this, true, "the interface is being initialized. Please wait! "); Creategroupmain (1); this. Text + =" v "+ application. productversion; OpenForm (" Homepage "," frmfirstinfo "," officeautomation. baseinfo. frmfirstinfo "); String value = "Welcome," + loginmng. logininfo. Person. personname + "! "; Showballoontipdelegate (value ); Frmwaiting. Hide (this);} private void showballoontipinfo (string value ){ C_nfiserver.showballoontip (100, "system prompt", value, tooltipicon. info ); } Other subform calls: String showinfo = "recharge complete! \ R \ n "; Frmmain. showballoontipdelegate (showinfo );