0

I know the question is very general but, still,I don't get the cross arrow like I need when the pointer is over the textbox,

the following code is my function to fullfil what I need

private void textBox1_MouseEnter(object sender, EventArgs e)
    {
        textBox1.Cursor = Cursors.Cross;
    }

and some how, it doesn't work.

what component do I need to check to make the pointer changed correctly ?

is there any missing components or reference to my computer ? I have tried to another pointer (Help pointer) and still not working,

update current code :

 using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace Image_Processor
{
    public partial class Form1 : Form
    {

        Validator val = new Validator();

        public Form1()
        {
            InitializeComponent();
            val.isValidateFree();
            this.Text = identitas.judul_App;
            textBox1.Cursor = Cursors.Help;
        }

        private void textBox1_MouseEnter(object sender, EventArgs e)
        {
            Cursor.Current = Cursors.Help;
        }
    }
}

still not working

General Grievance
  • 4,555
  • 31
  • 31
  • 45
Cignitor
  • 891
  • 3
  • 16
  • 36

1 Answers1

1

Events like MouseEnter will not be triggered if the control.Enable = false

Eric
  • 5,675
  • 16
  • 24
  • lol! how did you know my textbox is disabled ? so how do i make it work on disabled textbox ? – Cignitor Jan 13 '15 at 15:00
  • update : i just change the disabled textbox into readonly textbox – Cignitor Jan 13 '15 at 15:04
  • hmm, because I did the same thing in the past. Whatever, there is a heavy workaround on simulating the event for disabled control, see http://stackoverflow.com/a/19294450/1287352 – Eric Jan 13 '15 at 15:06