using system;using system.collections.generic;
using system.componentmodel;
using system.data;
using system.drawing;
using system.text;
using system.windows.forms;
using system.threading;
initializecomponent();
worker.workerreportsprogress = true;
worker.workersupportscancellation = true;
//正式做事情的地方
worker.dowork += new doworkeventhandler(dowork);
//任務完稱時要做的,比如提示等等
worker.progresschanged += new progresschangedeventhandler(progesschanged);
//任務進行時,報告進度
worker.runworkercompleted += new runworkercompletedeventhandler(completework);
}//呼叫 runworkerasync 時發生
public void dowork(object sender, doworkeventargs e)
//呼叫 reportprogress 時發生
public void progesschanged(object sender, progresschangedeventargs e)
//當後台操作已完成、被取消或引發異常時發生
public void completework(object sender, runworkercompletedeventargs e)
private int setfromposition(object sender, doworkeventargs e)
else
thread.sleep(5000);
for (int i = 0; i <= this.height + 1; i++)
this.close();
}return -1;
}public void start()
}public void stop()
}private void thisshow_load(object sender, eventargs e)
internal void setfromposition()
for (int i = 0; i < this.height + 30; i++)
this.close();
}private void thisshow_formclosed(object sender, formclosedeventargs e)
}}
private void button3_click(object sender, eventargs e)
winform右下角彈窗
網頁是否經常在電腦右下角彈窗顯示訊息?其實winform也是可以實現的。下面介紹兩種方法。第一步 設計窗體 第二步 實現 第一種方法 引用user32 宣告常量 窗體load事件 窗體formclosing事件?1 2345 6789 1011 1213 1415 1617 1819 2021 22...
右下角彈出視窗(C )
using system using system.collections.generic using system.componentmodel using system.data using system.drawing using system.linq using system.text u...
C 右下角彈出視窗
1.右下角彈出氣泡視窗 用到notifyicon控制項的showballoontip方法,該方法用於在工作列中持續顯示具有指定標題 文字和圖示的氣球提示指定的時間。其語法格式如下 void notifyicon.showballoontip int timeout,string tiptitle,s...