'使用picturebox控件,然后定义以下api Public Declare Function SetCapture Lib "user32" (ByVal hWnd As Long) As Long Public Declare Function ReleaseCapture Lib "user32" () As Long '再在picturebox的mousemove事件中 Private Sub PictureBox1_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single) Dim MouseExit As BooleanMouseExit = (0 <= X) And (X <= PictureBox1.Width) And (0 <= Y) And (Y <= PictureBox1.Height)If MouseExit Then '保存图片的按键不见 SetCapture PictureBox1.hWnd
Else '保存图片的按键可见 PictureBox1.BorderStyle = 0 ReleaseCaptureEnd If End Sub'保存图片方面另谋高就
保存文章的做法,,,,...Private Sub munsave_Click() CommonDialog1.Filter = "text files(*.text)|*.txt|" & "all files(*.*)|*.*" CommonDialog1.Flags = &H4 CommonDialog1.ShowSave If fpath_name <> "" Then CommonDialog1.FileName = fpath_name If CommonDialog1.FileName = "" Then Exit Sub Open frmmain.CommonDialog1.FileName For Output As #1 Print #1, Me.Text1.Text Close #1 fpath_name = CommonDialog1.FileName modified = False Me.Caption = CommonDialog1.FileTitleEnd Sub
Public Declare Function SetCapture Lib "user32" (ByVal hWnd As Long) As Long
Public Declare Function ReleaseCapture Lib "user32" () As Long
'再在picturebox的mousemove事件中
Private Sub PictureBox1_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
Dim MouseExit As BooleanMouseExit = (0 <= X) And (X <= PictureBox1.Width) And (0 <= Y) And (Y <= PictureBox1.Height)If MouseExit Then
'保存图片的按键不见
SetCapture PictureBox1.hWnd
Else
'保存图片的按键可见
PictureBox1.BorderStyle = 0
ReleaseCaptureEnd If
End Sub'保存图片方面另谋高就
http://community.csdn.net/Expert/topic/3267/3267634.xml?temp=.8282892
CommonDialog1.Filter = "text files(*.text)|*.txt|" & "all files(*.*)|*.*"
CommonDialog1.Flags = &H4
CommonDialog1.ShowSave
If fpath_name <> "" Then CommonDialog1.FileName = fpath_name
If CommonDialog1.FileName = "" Then Exit Sub
Open frmmain.CommonDialog1.FileName For Output As #1
Print #1, Me.Text1.Text
Close #1
fpath_name = CommonDialog1.FileName
modified = False
Me.Caption = CommonDialog1.FileTitleEnd Sub
是IE插件