首页 > 编程 > .NET > 正文

VB.NET窗口渐淡关闭

2024-07-10 13:00:59
字体:
来源:转载
供稿:网友
private sub form1_closing(byval sender as object, byval e as system.componentmodel.canceleventargs) handles mybase.closing
if msgbox("請注意看關閉的視窗", msgboxstyle.question + msgboxstyle.okcancel, "關閉") = msgboxresult.ok then
dim d as double
for d = 1 to 0 + 0.2 step -0.2
system.threading.thread.sleep(50)
application.doevents()
me.opacity = d
me.refresh()
next d
else
e.cancel = true
end if
'1.設視窗為form1
'2.將變數命名為d
'3.依物件名稱適當更改程式碼
end sub

--蓝色小铺(http://www.blueshop.com.tw/skillboard/show.asp?repno=1232&page=1&pgmtype=asp.net)


发表评论 共有条评论
用户名: 密码:
验证码: 匿名发表