i am trying to display a msgbox that if a filename is empty then a user needs to enter some name for this picture
i cant figure it out
this is my code
i cant figure it out
this is my code
Code:
Dim bm As Image
SendMessage hHwnd, WM_CAP_EDIT_COPY, 0, 0
ClosePreviewWindow
PaintPictureWithPreserveAspectRatio picCapture, Clipboard.GetData
CommonDialog1.CancelError = True
CommonDialog1.FileName = ""
CommonDialog1.Filter = "All Picture Files|*.bmp;*.jpg;*.gif;*.png|JPEG (*.jpg)|*.jpg|Bitmap (*.bmp)|*.bmp|Graphics Interchange Format (*.gif)|*.gif|Portable Network Graphic (*.png)|*.png"
On Error GoTo NoSave
CommonDialog1.ShowSave
If Len(CommonDialog1.FileName) <> 0 Then
MsgBox "Please choose a name for this picture", vbInformation
End If
SavePicture picCapture.Image, CommonDialog1.FileName
NoSave:
cmdSave.Enabled = False
cmdStart.Enabled = False
TakePic.Enabled = False
clear.Enabled = False
BttnnCancel.Enabled = True
Call OpenPreviewWindow