Still need help with this if possible!
Tried the following, but it didn't work:
Tried the following, but it didn't work:
Function SetReadOnly(Gadget, ReadOnly) Local EM_SETREADONLY = $CF Local ES_READONLY = $800 ; 2048 Local NOT_ES_READONLY = -2049 Local GWL_STYLE = -16 Local Hwnd_Gadget Local Hwnd_Edit Local hWnd% = QueryObject(Gadget, 1) hWnd = GetParent(hWnd) ; Get the handle of the gadget. ;Hwnd_Gadget = QueryObject(Gadget, 1) ; Get the edit field handle. Hwnd = FindWindowEx(Hwnd, 0, "", "") SetWindowLong(Hwnd, GWL_STYLE, GetWindowLong(Hwnd, GWL_STYLE) And NOT_ES_READONLY) ;If Hwnd_Edit <> 0 ; Set or remove the read-only flag. (ES_ReadOnly) ; SendMessage(Hwnd_Edit, EM_SETREADONLY, ReadOnly, 0) ;End If End Function