English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
所有分類

請問一下
VB是不是可以使picture box完全透明
可是我又可以用有顏色的線在這個picture box 上畫圖
簡單來說
我希望可以在我電腦可以看的到的地方隨便劃圖
不知道這有沒有可能

謝謝

2006-04-17 04:52:46 · 2 個解答 · 發問者 ? 2 in 電腦與網際網路 軟體

感謝以晴的回覆
其實我只要picture box變透明
可以在透明的box 上面劃有顏色的圖就可以
因為picture box 會透明
所以下面的東西可以看的見
謝謝喔

2006-04-17 05:22:33 · update #1

沒關西
我只是希望弄成picture box 透明可是我又可以用有顏色的線在picture box 上畫圖

2006-04-23 07:04:26 · update #2

2 個解答

picture box下面的東西可以看的見?那表單被picture box蓋住的地方也應該透明吧?否則就只能看到表單而已.

2006-04-24 18:24:33 補充:
'以下方式只能讓表單上所有物件都變透明,但無法只讓PictureBox單獨透明(只支援2000以上)'表單上置1個PictureBox及1個HScrollBarConst LWA_ALPHA = &H2Const GWL_EXSTYLE = (-20)Const WS_EX_LAYERED = &H80000Private Declare Function GetWindowLong Lib "user32" Alias "GetWindowLongA" (ByVal hWnd As Long, ByVal nIndex As Long) As LongPrivate Declare Function SetWindowLong Lib "user32" Alias "SetWindowLongA" (ByVal hWnd As Long, ByVal nIndex As Long, ByVal dwNewLong As Long) As LongPrivate Declare Function SetLayeredWindowAttributes Lib "user32" (ByVal hWnd As Long, ByVal crKey As Long, ByVal bAlpha As Byte, ByVal dwFlags As Long) As LongDim Xx&, Yy&Private Sub Form_Load()SetWindowLong Me.hWnd, GWL_EXSTYLE, GetWindowLong(Me.hWnd, GWL_EXSTYLE) Or WS_EX_LAYEREDHScroll1.Min = 0HScroll1.Max = 255HScroll1 = 250End SubPrivate Sub HScroll1_Change()SetLayeredWindowAttributes Me.hWnd, 0, HScroll1, LWA_ALPHAEnd SubPrivate Sub HScroll1_Scroll()HScroll1_ChangeEnd SubPrivate Sub Picture1_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)If Button = 1 Then Picture1.PSet (X, Y), vbRed: Xx = X: Yy = YEnd SubPrivate Sub Picture1_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)If Button = 1 Then Picture1.Line -(X, Y), vbRedEnd Sub

2006-04-24 14:24:33 · answer #1 · answered by W.J.S. 7 · 0 0

請問,是整個畫面都可以畫
還是侷限於表單(picture box )的地方?

2006-04-17 05:07:03 · answer #2 · answered by 以晴 2 · 0 0

fedest.com, questions and answers