小弟使用 Image1 設計出一個按鈕 : 程式碼如下
===========================================================
Private Sub Form_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
圖形1.Visible = True
圖形2.Visible = False
圖形3.Visible = False
===========================================================
Private Sub 圖形1_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
圖形2.Visible = True: 圖形1.Visible = False
End Sub
Private Sub 圖形2_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
圖形3.Visible = True: 圖形2.Visible = False
End Sub
Private Sub 圖形3_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
圖形1.Visible = True: 圖形2.Visible = False: 圖形3.Visible = False
text1.Text = "點及按鈕"
End Sub
===========================================================
但是執行時候 滑鼠在圖形位置移動切換圖形時候會出現閃耀現象
請問有哪位知識名人可以幫我解答怎樣寫圖形才能正常切換不會出現閃耀
===========================================================
2006-11-07 09:02:47 · 1 個解答 · 發問者 leecach 2 in 電腦與網際網路 ➔ 程式設計
感謝 W.J.S. : 解答但是一樣出現換圖時候閃耀:我是故意移動滑鼠讓 圖形1 與 圖形2 來回的切換來回幾下就會出現閃耀有一張全部黑色的圖快速出現又消失的現象
2006-11-07 13:27:13 · update #1
'你是否要當滑鼠離開.移至及按下時會出現不同圖片?抱歉之前我把你的問題想錯了,但我在我的電腦試不會有你說的問題,要不你改成這樣看看:Private Sub Form_Load() 圖形2.ZOrder 圖形1.ZOrderEnd SubPrivate Sub Form_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single) If 圖形1.Visible = False Then 圖形1.Visible = TrueEnd SubPrivate Sub 圖形1_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single) If 圖形1.Visible Then 圖形1.Visible = FalseEnd SubPrivate Sub 圖形2_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single) 圖形2.Visible = False Text1.Text = "點及按鈕"End SubPrivate Sub 圖形2_Mouseup(Button As Integer, Shift As Integer, X As Single, Y As Single) 圖形2.Visible = TrueEnd Sub
2006-11-07 09:40:34 · answer #1 · answered by W.J.S. 7 · 0⤊ 0⤋