Problem with Visio ActiveX

M

Mark Wheeler

Hi All,

I have written an Access 2003 application with the Visio ActiveX control
embedded in a form. Everything works fine except that, in form view, the
Visio area is much smaller than the size of the control in design view. I
have tried increasing the size both in design view and programmatically from
the form_open event but it refuses to get any bigger.

Does anyone know: is this a feature? Is the control a fixed size?

Mark
 
P

Peter Huang [MSFT]

Hi

It is strange that I can not reproduce the problem on my side.
Also I have tried to use the code to enlarge the size of the control with
success.
Here is the steps I have done.
1. create a new form in design view in access 2003
2. add the visio drawing control onto the form
3. add a button onto the form
4. handle the form_open event and the button_click event as below.
Option Compare Database

Private Sub Command1_Click()
Me.DrawingControl0.Width = Me.DrawingControl0.Width + 10
Me.DrawingControl0.Height = Me.DrawingControl0.Height + 10
End Sub

Private Sub Form_Open(Cancel As Integer)
MsgBox "hello"
Me.DrawingControl0.Width = Me.DrawingControl0.Width + 10
Me.DrawingControl0.Height = Me.DrawingControl0.Height + 10
End Sub

5. After I show the form in form view, both the form_open or command1_click
will enlarge the drawing control.

You may have a try and let me know the result.
If the problem persists, can you provide a reproduce sample(the mdb file)
in the newsgroup as an attachment so that we will try to reproduce on my
side.

Hope this helps.

Also for access program, you may also try to post in the access queue.
microsoft.public.office.access.forms
microsoft.public.access.Forms
microsoft.public.access.ActiveXControl


Best regards,

Peter Huang
Microsoft Online Partner Support

Get Secure! - www.microsoft.com/security
This posting is provided "AS IS" with no warranties, and confers no rights.
 
P

Peter Huang [MSFT]

Hi

Thank you for your sample and because the code will plus 10 every time open
the form, so I think you may try to use the define number for the size of
the control.
e.g.

Private Sub Form_Open(Cancel As Integer)
Me.InsideWidth = 4000
Me.InsideHeight = 4000
Me.DrawingControl0.Width = 3000
Me.DrawingControl0.Height = 3000
End Sub

Also I think you may also try to post the problem in the access specified
queue so that the experienced experts in access will give more idea.

Thanks!

Best regards,

Peter Huang
Microsoft Online Partner Support

Get Secure! - www.microsoft.com/security
This posting is provided "AS IS" with no warranties, and confers no rights.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top