If Right$(DName$, 1) <> "\" Then DName$ = DName$ + "\"
OldMousePointer = Screen.MousePointer
Screen.MousePointer = 11
If (Form2.DestinationPic.ScaleWidth <> Form1.Picture1.ScaleWidth) Or (Form2.DestinationPic.ScaleHeight <> Form1.Picture1.ScaleHeight) Then
Resp% = MsgBox("Do you want to start Paintbrush with the scaled image in the clipboard ready for pasting to create a new file?", 32 + 4)
If Resp% = 6 Then
Clipboard.Clear
Clipboard.SetData Form2.DestinationPic.Image
T% = Shell("pbrush", 1)
Screen.MousePointer = OldMousePointer
Exit Sub
End If
End If
If (Right$(FName$, 4) <> ".bmp") Then
Resp% = MsgBox(UCase$(FName$) + " is not a .BMP file and can't be directly changed in Paintbrush." + Chr$(13) + Chr$(13) + "Do you want to start Paintbrush with the image in the clipboard ready for pasting to create a new file?", 32 + 4)
If Resp% = 6 Then
Clipboard.Clear
Clipboard.SetData Form1.Picture1.Image
T% = Shell("pbrush", 1)
End If
'MsgBox "Sorry! Not a BMP file."
Else
T% = Shell("pbrush " + DName$ + FName$, 1)
End If
Screen.MousePointer = OldMousePointer
End Sub
Sub ClearListBox (Ctrl As Control)
hWndOld% = GetFocus()
tempE% = Ctrl.Enabled
tempV% = Ctrl.Visible
Ctrl.Enabled = True
Ctrl.Visible = True
Ctrl.SetFocus
x = SendMessage(GetFocus(), LB_RESETCONTENT, 0, 0&)