Private Declare Function SendMessage Lib "user32" Alias "SendMessageA" (ByVal hwnd As Long, ByVal wMsg As Long, ByVal wParam As Long, lParam As Any) As LongConst WM_USER = &H400
Const EM_SETREADONLY = (WM_USER + 31)'使用
Dim RetVal As Long
RetVal = SendMessage(text1.hwnd, EM_SETREADONLY + 1, True, ByVal 0&)以上是让文件框只读的代码,怎么不灵呀?为什么?