Re: EM_GetModify Problem!
You just need to reset the Textbox's Modified status, i.e.private Declare Function SendMessage Lib "user32" Alias "SendMessageA" (byval hwnd as Long, byval wMsg as Long, byval wParam as Long, lParam as Any) as Long
private Const EM_GETMODIFY = &HB8
private Const EM_SETMODIFY = &HB9
private Sub Form_Resize()
Text1.Move 0, 0, ScaleWidth, ScaleHeight
End Sub
private Sub Form_QueryUnload(Cancel as Integer, UnloadMode as Integer)
If SendMessage(Text1.hwnd, EM_GETMODIFY, 0, byval 0) then
Cancel = (MsgBox("Cancel all changes and exit?", vbYesNoCancel + vbDefaultButton3, "Cancel Edits") <> vbYes)
End If
End Sub
private Sub mnuNew_Click()
Text1 = ""
SendMessage Text1.hwnd, EM_SETMODIFY, 0, byval 0
End Sub
Aaron Young
Senior Programmer Analyst
[email protected]
Certified AllExperts Expert: http://www.allexperts.com/displayExp...p?Expert=11884