Convert Visio windows application GUI diagram to Visual Studio (V

I

IMTaller

Does anyone know if there is a way to export a mockup GUI for a windows app
from Visio directly into Visual Studio.. say VB or VC?

All I really want it to do is create the list boxes, buttons, etc on a VB
form which I've diagrammed in Visio. That way I've got the layout of my
project complete before I even start on the coding..

Thanks a bunch!

im
 
C

Chris Roth [ Visio MVP ]

I've thought about this about 10^6 times, but never got around to doing it.

You could certainly do something via code - a little VBA in the document is
usually the easiest way to start. I'm sure more than one person has tried,
but I don't know if any code is laying around out there.

Some general code fragments that will help get you going:

' Shape size and position:
w = shp.Cells("Width").ResultIU
h = shp.Cells("Height").ResultIU
x = shp.Cells("PinX").ResultIU
y = shp.Cells("PinY").ResultIU

' Master of shape - use to map to VS controls:
shp.Master.Name or .NameU

' Shape text:
shp.Text

' Properties of shape:
shp.Cells("Prop.Whatever").Formula or .Result

' Getting a shape:

For i = 1 to ActivePage.Shapes.Count
set shp = ActivePage.Shapes(i)
Next i

--

Hope this helps,

Chris Roth
Visio MVP
 

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