This content has been marked as final.
Show 5 replies
-
Insert block with block attached to mouse.
1-ISR6BG May 20, 2009 7:04 AM (in response to 1-CY6L7M)That's what i'm needed too, but not solved this problem now -
Insert block with block attached to mouse.
Deepak Gupta May 20, 2009 8:47 AM (in response to 1-CY6L7M)Tim Not sure how to do that but you can ask user to specify the insertion point by picking/clicking on the sheet.-
Insert block with block attached to mouse.
1-CY6L7M May 27, 2009 7:02 PM (in response to Deepak Gupta)This will solve the problem. It starts the drag/drop operation as if the user drags the block onto the drawing. Written here in C#.<br /><br />private void AttachBlockToMouse(string blockFile)<br /> {<br /> string[] fList = new string[1];<br /> fList[0] = blockFile;<br /> DataObject dataObj = new DataObject(DataFormats.FileDrop, fList);<br /> dataObj.GettingData += new EventHandler<EventArgs>(dataObj_GettingData);<br /> DragDropEffects eff = DoDragDrop(dataObj, DragDropEffects.Link | DragDropEffects.Copy);<br /> }-
Re: Insert block with block attached to mouse.
Sanjay Phadke Feb 17, 2012 5:23 AM (in response to 1-CY6L7M)Hello Tim,
Can you please tell us the same code in VB
I want Insert block with block attached to mouse through VB
- Sanjay Phadke
-
Re: Insert block with block attached to mouse.
Sanjay Phadke Jan 10, 2014 3:50 AM (in response to Sanjay Phadke)Hello All,
Can anybody tell me how to attach block to mouse using VB Code
Dim hWndForm2 As Long
Dim lLeftForm2 As Long
Dim lTopForm2 As Long
Public Function ms_MouseMoveNotify(ByVal x As Long, ByVal y As Long, ByVal wParam As Long) As Long
SetOwner hWndForm2, hWndOriginalParent
hWndOriginalParent = SetOwner(hWndForm2, hWndSolidWorks)
SetWindowPos hWndForm2, HWND_NOTOPMOST, lLeftForm2, lTopForm2, 0, 0, SWP_NOSIZE
pic = c:\bl.sldblk
test.PaintPicture pic, X, Y, 50, 50, X, Y, 50, 50
test.Refresh
test.Show vbModeless
End Function
- Sanjay
-
-
-