主题:求教!
			
 懒生不想懒
				 [专家分:0]  发布于 2008-05-01 17:33:00							
			请问一下,PictureBox怎么让鼠标一到上面他的Appearance变成1-3d 然后移开又变成0-flat?麻烦指点一下,谢谢!
						
					 
		
			
回复列表 (共2个回复)
		
								
				沙发
				
					
tanchuhan [专家分:15140]  发布于 2008-05-01 18:19:00				
				
Option Explicit
Private Declare Function SetCapture Lib "user32" (ByVal hwnd As Long) As Long
Private Declare Function ReleaseCapture Lib "user32" () As Long
Private Sub Picture1_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
    Dim p As PictureBox
    Set p = Picture1
[color=0000FF]    If (X > 0 And X < p.Width) And (Y > 0 And Y < p.Height) Then
        Call SetCapture(p.hwnd)
        p.Appearance = 1
    Else
        Call ReleaseCapture
        p.Appearance = 0
    End If[/color]
End Sub
							 
						
				板凳
				
					
懒生不想懒 [专家分:0]  发布于 2008-05-02 14:27:00				
				
谢谢!
							 
									
			
我来回复