Product : Engine, Version : 5.1.1.1040, ArticleID : 41024232

HowTo : Mouse cursor disapears in cmds

Article41024232
TypeHowTo
ProductEngine
Version5.1.1.1040
Date Added5/25/2006
Submitted byJongHyun Kim
Keywords

Subject

Mouse cursor disapears in cmds

Summary

When the user is doing a cmd like cmdCopy then after a mouse click he doesn't move the mouse then the mouse pointer disappears from the screen. After moving the mouse waiting for the user another point then the cursor appears again. How can I bypass this?

Solution

This is not a bug, this is how the commands and the cursor behaves.
 

There is a way (a how-to) to bypass this issue, and this by doing a refresh of the mouse coordinates like (in your C# 2005 (.NET) project. In BOLD are the changes) :


private void mnuCopy_Click(object sender, System.EventArgs e)
{
VDrawPro.UndoMode = false;
VDrawPro.FreezeDrawEvents(1);
VDrawPro.FreezeEntityEvents(1);
VDrawPro.CommandAction.CmdCopy("USER", "USER", "USER");
Application.DoEvents();
refresh_mouse();
//VDrawPro.UndoMode = true;
}

private void VDrawPro_JobMouseDown(object sender, AxVDProLib5._DVdrawEvents_JobMouseDownEvent e)
{refresh_mouse();}


private void VDrawPro_JobEnd(object sender, AxVDProLib5._DVdrawEvents_JobEndEvent e)
{refresh_mouse();}


private void refresh_mouse()
{
Point ScrPT = System.Windows.Forms.Cursor
.Position; //store the mouse position
Point
ScrPT2 = ScrPT; ScrPT2.X = 1; ScrPT2.Y = 1;
System.Windows.Forms.Cursor
.Position = ScrPT2; //set the mouse position to 1,1
System.Windows.Forms.Cursor
.Position = ScrPT;//set back the mouse position to its original value
}


Note that when VectorDraw is in a big loop (like when regen, redraw or add 1000 lines) no cursor or wait cursor is displayed and this cannot be changed.