Nevron Forum
Back
Login
Register
Login
Register
Home
»
Nevron Vision for NET
»
Nevron Diagram for .NET
»
Position
Position
Post Reply
Position
View
Flat Ascending
Flat Descending
Threaded
Options
Subscribe to topic
Print This Topic
Goto Topics Forum
Author
Message
Golay Jean-Philippe
Golay Jean-Philippe
posted 15 Years Ago
ANSWER
Topic Details
Group: Forum Members
Posts: 8,
Visits: 1
I want to know the drop position of a library shape to create a new shape at the same place
I tried this code using mouseInDevice but the shape result out to the drawing view
Any help thanks
void EventSinkService_NodeInserted(NChildNodeEventArgs args) {
try {
if (args.Child is NErmShape) {
NErmShape nErmShape = (NErmShape)args.Child;
NPointF mouseInDevice = nDrawingView1.GetMousePositionInDevice();
if (wizExcelForm.newqwMapping != null) {
wizExcelForm.newqwMapping.X = mouseInDevice.X ;
wizExcelForm.newqwMapping.Y = mouseInDevice.Y ;
wizExcelForm.newqwMapping.CustomLocation = true;
Program.EcoSpace.UpdateDatabase();
DrawShema();
}
}
} finally {
wizExcelForm.Close();
}
} else if (nErmShape.Tag == "oledb") {
}
}
} catch (Exception ex) {
QwUtils.MessageError(ex, "EventSinkService_NodeInserted");
} finally {
}
}
Reply
Like
0
Nevron Support
Nevron Support
posted 15 Years Ago
ANSWER
Post Details
Group: Administrators
Posts: 3.1K,
Visits: 4.2K
Hi,
You should use the GetMousePositionInScene method, as it will return the position of the mouse in document scene coordinates. The GetMousePositionInDevice method returns the mouse position in drawing view client coordinates.
Best Regards,
Nevron Support Team
Reply
Like
0
GO
Merge Selected
Merge into selected topic...
Merge into merge target...
Merge into a specific topic ID...
Open Merge
Post Reply
Similar Topics
Post Quoted Reply
Reading This Topic
Login
Login
Remember Me
Reset Password
Resend Validation Email
Login
Explore
Messages
Mentions
Search