Board index » delphi » Visio and Delphi

Visio and Delphi


2003-09-15 10:20:22 PM
delphi248
Hello,
I am trying to use the Visio 11 Drawing ActiveX Control in a Delphi( 5 or 7)
application.
I imported the ActiveX component, and placed it on a form.
It works fine, except that I am not able to move any shapes in the control.
Adding and resizing works without any problem.
I tried the same in VB6, and had no problem with moving.
This is the only line of code in both the VB(Visual Basic) and Delphi application :
[VB] : DrawingControl1.Document.Pages.Item(1).DrawRectangle 1, 1, 2, 2
[Delphi] : DrawingControl1.Document.Pages.Item[1].DrawRectangle(1, 1, 2, 2);
--
Regards,
Jon-Olav Aa. Hermansen
------
System Consultant -- XXXX@XXXXX.COM
Tlf +47 69 17 70 44 -- Fax +47 69 17 70 12 -- ICQ 92681182
 
 

Re:Visio and Delphi

I have traced the window messages from the Visio ActiveX Control, and have
found that (in Delphi, )when you hold down the left button and tries to drag
an object, the handle of the graphical object is not sendt to windows.
WM_CAPTURECHANGED hwndNewCapture:00000000.
and when you move the mouse, you send a lot of WM_MOUSEMOVE messages.
In VB(Visual Basic) however, the message looks like this:
WM_CAPTURECHANGED hwndNewCapture:000305A2.
When you move the mouse in VB, you send a lot of WM_PAINT messages.
--
Regards,
Jon-Olav Aa. Hermansen
------
System Consultant -- XXXX@XXXXX.COM
"Jon-Olav Hermansen" <XXXX@XXXXX.COM>writes
Quote
Hello,

I am trying to use the Visio 11 Drawing ActiveX Control in a Delphi( 5 or
7)
application.
I imported the ActiveX component, and placed it on a form.
It works fine, except that I am not able to move any shapes in the
control.
Adding and resizing works without any problem.
I tried the same in VB6, and had no problem with moving.

This is the only line of code in both the VB(Visual Basic) and Delphi application :

[VB] : DrawingControl1.Document.Pages.Item(1).DrawRectangle 1, 1, 2, 2

[Delphi] : DrawingControl1.Document.Pages.Item[1].DrawRectangle(1, 1, 2,
2);

--
Regards,
Jon-Olav Aa. Hermansen
------
System Consultant -- XXXX@XXXXX.COM
Tlf +47 69 17 70 44 -- Fax +47 69 17 70 12 -- ICQ 92681182