Article | 60000975 |
Type | HowTo |
Product | Engine |
Version | 6 |
Date Added | 10/12/2009 |
Submitted by | Esen Karaduman |
Keywords |
private void Form1_Load(object sender, EventArgs e)
{
vdFramedControl1.BaseControl.vdMouseEnter += new VectorDraw.Professional.Control.MouseEnterEventHandler(BaseControl_vdMouseEnter);
} private bool show_pointer = true; // a flag in the form that controls if the cursor will be visible or not. void BaseControl_vdMouseEnter(EventArgs e, ref bool cancel)
{
if (show_pointer) return; // show the cursor
//else hide the cursor with the code below
cancel = true;
vdFramedControl1.BaseControl.ActiveDocument.GlobalRenderProperties.ShowCursor = false; //Hide cursor
vdFramedControl1.BaseControl.ActiveDocument.ActiveLayOut.MouseEnter(this, e); // this is needed
} private void button7_Click(object sender, EventArgs e) // Button to set the cursor to another cursor
{
vdFramedControl1.BaseControl.SetCustomMousePointer(Cursors.PanNW); // set the cursor to another cursor
//using GetCustomeMousePointer you can get the cursor.
} private void button8_Click(object sender, EventArgs e) //Button to set the cursor to default VDF cross
{
vdFramedControl1.BaseControl.SetCustomMousePointer(null); // set the cursor to VDF cross
} private void button9_Click(object sender, EventArgs e)//Button to Hide the cursor
{
show_pointer = false;
vdFramedControl1.BaseControl.ActiveDocument.GlobalRenderProperties.ShowCursor=false; //Hide cursor
} private void button10_Click(object sender, EventArgs e) //Button to show the cursor
{
show_pointer = true;
vdFramedControl1.BaseControl.ActiveDocument.GlobalRenderProperties.ShowCursor=true; //Show cursor
}
private void button9_Click(object sender, EventArgs e)
{
vdFramedControl1.BaseControl.SetCustomMousePointer(new Cursor(WindowsApplication1.Properties.Resources.Icon1.Handle)); // set the cursor to an "empty/transparent" cursor Icon1.
} private void button10_Click(object sender, EventArgs e)
{
vdFramedControl1.BaseControl.SetCustomMousePointer(null); // set it to the default (visible)
}