2 questions: ActiveX drawing control and disable "search shape" feature

M

Matt

Hi everybody

I'm pretty new to VBA coding but I'm very impressed with the
possiblities of the new visio 2003 drawing control - so please bear
with my silly sounding questions.

What I want to do:

Having Access 2002 database where I want to place the control in a
subform showing Visio drawings related to the different records (sync.
of Main- and subform no problem so far). Set my Visio template (vst)
as scr.

Problems:
1. The control doesn't keep the width and height values that I put in
the control's properties during designmode - always goes back to the
same size when in running mode. How can I change this? I tried to
integrate the control into a regular html-page and there it keeps the
size. Any advice how to achieve that in an Access form?

2. Everytime you open a template with stencil in Visio 2003 the
stencil has the "Shape search" window. Because it's taking a lot of
space, I want to disable it - how do I do that - the
"Windows(1).ItemFromID(Visio.visWinIDShapeSearch).Visible = False"
from the MSDN Visio 2003 page doens't work (I put it as it is in my
form_open procedure).


Who can help me please - kept on trying for hours now, but can't get
it to work.

Any help is highly appreciated!

Regards
Matt
 
M

Matt

Hi Chris

Thanks for your help pls. see my answer in the German group. Got the code to
work but the sizing problem with the control persists. I' guess I'm using
the TR version.
See you in the German group

Regards
Matt
 
M

Matt

Hello everybody

Again more questions about the new drawing control:

1. Chris (or any other helpful MS insider) are you 100% shure that the
sizing bug of the control will be gone in the Final? Is there meanwhile
maybe a workaround - the control keeps it's size if embeded in a web page
but it goes always back to a pretty small format if put in an Access form
:-((
I need to know how fast MS will solve this problem because we intend to use
the control in an Access project.

2. At the moment I'm creating drawings with the control, use the saveas
procedure and load the files back when I'm working with the record. Is there
a way to store the drawings from the control into the database instead of
saving them outside? Can you then kind of restore them to the drawing
control if you want to modify them?
Is there a way or did I mistake the whole concept?

Sorry for all these questions but I'd really like to use this exiting
control to it's max.

Best regards
Matt
 
C

Chris Roth

I set the Anchor properties for the control, and it behaves just fine - the
control sizes with the form. Other than the Anchor, I didn't do anything
special other than drop the control on the form. Did you uninstall the Beta
2 before installing the Beta 2 refresh?

There is also a visControlPageSizingBehavior, but this is for the drawing
page.

Saving to database: I haven't done this personally, but Senaj has done it
with stencils. I think he simply gets a reference to a Document object, then
serializes it using .NET stuff. Then you have a nice blob for the database.
Or, perhaps you could save to a temporary .vdx (xml Visio format), then
write the text of that to the database...

--

Hope this helps,

Chris Roth
Visio MVP

(e-mail address removed)

Need stencils or ideas? http://www.mvps.org/visio/3rdparty.htm
Need VBA examples? http://www.mvps.org/visio/VBA.htm
Common Visio Questions http://www.mvps.org/visio/common_questions.htm
 
M

Matt

Hi Chris

thanks for your fast reply again!
I tried the pageSizing - as you mentioned it only sizes the drawing not the
control window.
How did you set the anchor properties? Can you give a little code example
please for form1 and control1 on it - what do I have to set where?
(Sorry to be so newbie...)

Thank you for your help!

regards
Matt
 
M

Matt

Hi Chris

Did I overlooked something?
Checked the objectcatalogue in Access but couldn't find the anchor
properties for an embeded visio drawing control :-(
Do I have to reference some dll or OCX othe than the drawing.ocx and the
Visio 11 type library?

The Anchor Property is a .NET feature - How did you get this in Access VBA?

Any advice is highly appreciated

Best regards
Matt
 
M

Matt

would you recommend to do this in .NET?
Is .NET a lot different fromVBA?

What's your suggestion if I want to combine Acces database and Visio?

Regrads Matt
 

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