| ■20853 / ) |
Re[4]: notifyicon多重表示回避 |
□投稿者/ れれれ (69回)-(2008/06/18(Wed) 12:50:20)
|
■No20845 (επιστημη さん) に返信 >> private void button1_Click(object sender, EventArgs e) //シリアル通信をおこなう >> { >> Mainclass main = new Mainclass(); // notifyicon多重表示 >> ・・・ >> } > > ボタンが押されるたんびに Mainclass が生成されてますが、これが"正しい使い方"なのですか? > どこかで最初に一個だけ作っておいて、使いまわしてはいかんのでしょうか。 > private void button1_Click(object sender, EventArgs e) //シリアル通信をおこなう { Mainclass main = new Mainclass(); // notifyicon多重表示 ・・・ main.Dispose(); } としたらnotifyiconが多重表示されなくなりました(表示されてすぐ消える。)
|
解決済み
|