问题
Is there any method to use HideCaret()
.... or in general, just achieve something like described here:
Prevent Blinking Cursor in Textbox
but in a Managed C++ (clr) ?
回答1:
If you're in C++/CLI, just call HideCaret directly, no need for DllImport
.
#include <windows.h>
System::Windows::Forms::TextBox^ textbox1;
HideCaret((HWND)textbox1->Handle.ToPointer());
来源:https://stackoverflow.com/questions/27803394/c-cli-textbox-hidecaret-hide-blinking-cursor