| --------------------------------- // 實現關閉窗體時的動態效果 // ------------------------------- // 函數名:gf_closequery // 參數說明: // window window類型,調用窗口的名字 // closetype integer類型,窗口關閉方式,value = 0~10 // ------------------------------- // 申明局部變量 int li_x ,li_y,li_width,li_height,li_ceny,li_cenx,li_xminusy,li_wminush Integer li_gd // 取出當前窗口的坐標值、大小值 li_x = window.x li_y = window.y li_width = window.width li_height = window.height // 設置窗體關閉前的動畫效果 // 關鍵是看哪個值發生了變化——x、y、h、w CHOOSE CASE closetype CASE 0 // closetype = 0,從下到上逐漸消失 for li_gd = li_height to 0 step -1 window.height = li_gd window.show() next CASE 1 // closetype = 1,從上到下逐漸消失 for li_gd = li_y to li_height+li_y step 1 window.y = li_gd window.height = li_height+li_y - li_gd window.show() next CASE 2 // closetype = 2,從右到左逐漸消失 for li_gd = li_width to 0 step -1 window.width = li_gd next CASE 3 // closetype = 3,從左到右逐漸消失 for li_gd = li_x to li_x+li_width step 1 window.x = li_gd window.width = li_x+li_width - li_gd window.show() next case 4 // closetype = 4,從上下向中間擠壓逐漸消失 li_ceny = li_y+li_height/2 for li_gd = li_y to li_ceny step 1 window.y = li_gd |