wpf可是很好的設定空間與窗體透明,通過屬性opacity設定(屬性值介於0-1),窗體透明還需設定窗體的allowtransparency屬性為true(允許透明),以及windowstyle為none(窗體無邊框),
示例如下圖:
**如下:
設定滑鼠控制窗體移動事件**如下:
c#: private double oldx, oldy;
private void window_mousedown(object sender, mousebuttoneventargs e)
private void window_mousemove(object sender, mouseeventargs e) }
vb.net**:
class mainwindow
dim oldx as double
dim oldy as double
private sub mainwindow_mousedown(byval sender as object, byval e as system.windows.input.mousebuttoneventargs) handles me.mousedown
oldx = e.getposition(me).x
oldy = e.getposition(me).y
end sub
private sub mainwindow_mousemove(byval sender as object, byval e as system.windows.input.mouseeventargs) handles me.mousemove
if e.leftbutton = mousebuttonstate.pressed then
dim x as double = e.getposition(me).x
dim y as double = e.getposition(me).y
dim dx as double = x - oldx
dim dy as double = y - oldy
me.left += dx
me.top += dy
oldx = x
oldy = y
end if
end sub
end class
python第三課答案 python第三課
字串操作 s alexwusir s1 s.capitalize 首字母大寫 print s1 全大寫,全小寫 s2 s.upper s21 s.lower print s2,s21 大小寫翻轉 s3 s.swapcase print s3 每個隔開 特殊字元或數字 的單詞首字母大寫 s alex ...
python第三課答案 python第三課筆記
以下哪個變數的命名不正確?為什麼?a mm 520 b mm520 c 520 mm d 520 mm 答 c不正確,不能數字開頭 在不上機的情況下,以下 你能猜到螢幕會列印什麼內容嗎?myteacher 小甲魚 yourteacher myteacher yourteacher 黑夜 print ...
python第三課答案 python第三課
1.迴圈物件,主要呼叫next 2.迭代器iterator 在理解上可以和迴圈物件理解為乙個東西。3.生成器 generator 自定義的迴圈物件。4.表推導 list comprehension 是快速生成表的方法。表推導用中括號。l x 2 for x in range 10 練習 f open...