How to hide textbox cursor in Windows Forms c#
I finally found two working ways for solving this:
1. Send textbox focus away
Sending focus to another component on Form initialization:
public Form1(){
InitializeComponent();
textBox1.Enter += (s, e) => { textBox1.Parent.Focus(); };
}
2. Create a Label and customize it
In the label properties, set:
BorderStyle = Fixed3D
BackColor = Window
AutoSize = False
And resize the label in the form design view
Disable iBeam pointer in TextBox using VB.NET
Use the HideCaret() API call from the GotFocus() event of your TextBox:
Private Declare Function HideCaret Lib "user32.dll" (ByVal hWnd As IntPtr) As Boolean
Private Sub TextBox1_GotFocus(sender As Object, e As EventArgs) Handles TextBox1.GotFocus
HideCaret(TextBox1.Handle)
End Sub
disable field but allow to put the cursor on it and allow to copy from it
use cursor:pointer; in inline style and readonly="true"
check this
<input style = "width:100px;cursor:pointer;" readonly ="true" value="hellohellohell"/>
Related Topics
Pass an Array of Integers to ASP.NET Web API
Download File from an ASP.NET Web API Method Using Angularjs
How to Insert Programmatically a New Line in an Excel Cell in C#
Documentdb With Azure Functions
Deserialize Multiple Xml Elements With the Same Name Through Xmlserializer Class in C#
Generate All Combinations from Multiple (N) Lists
How to Specify the Linq Orderby Argument Dynamically
Checking Whether a Number Contains Numbers 1 to N as Factors
How to Change Background Colour of Tab Control in Winforms
401 Unauthorized on Second Httpclient/Httpwebrequest Call
Reading Large Text Files With Streams in C#
Configurationmanager.Appsettings Getting Null
Asp.Net MVC - How to Call Void Controller Method Without Leaving the View
Select Multiple Fields Group by and Sum
Create Global Variable in .Net Core 2.0 to Use in Razor Views
Select Multiple Records Based on List of Id'S With Linq
File Being Used by Another Process After Using File.Create()
Convert Date Format of String to Datetime Mm/Dd/Yyyy When System Date Formate Is Dd/Mm/Yyyy