Merging Anchor Windows Programmatically So They Are Tabbed

Started by Nikolay, February 11, 2009, 02:17:29 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Nikolay

I have several "AnchorWindows".
Suppose I have one of them open. How do I open the second one as a "tab"?

In pictures. I have this:


I don't want to have this after Windows.Add:


I want to have this instead:


I believe this has something to do with MergeID and other funny parameters "Windows.Add" method has.
But unfortunately I haven't found any examples or sane documentation on how do I use those..?

I mean, how do I use the Windows.Add (bla-bla-bla, MergeID, MergeClass, MergePosition)
Any help?

Kind regards,
Nikolay.

michelleh

Did you ever figure this out?  I'm trying to do this, too.

Visio Guy

I've put in a question to Microsoft, since this has been a mystery for quite some time.

I've scoured the web, the SDK, the SDK help file, the code library, Even Graham Wideman's Visio 2003 Developer's Survival Pack and David Parker's Visualizing Information with Microsoft Visio 2007 haven't solved it in their wonderful books.

I found several attempts to tackle this on my hard drive, so the question has evidently been around for awhile, and unsolved it seems.
For articles, tips and free content, see the Visio Guy Website at http://www.visguy.com
Get my Visio Book! Using Microsoft Visio 2010

michelleh

Thanks.  At least now I can stop digging for an answer.

JuneTheSecond

#4
Hi,

I am now trying a macro.
How does it go in your Visio? :)


Sub test()
    On Error GoTo EHND
    Dim win1 As Window
    Dim win2 As Window
    Set win1 = ActiveWindow.Windows.ItemFromID(visWinIDPanZoom)
    Set win2 = ActiveWindow.Windows.ItemFromID(visWinIDSizePos)
    win1.Visible = True
    win2.Visible = True
    win1.MergeID = "{85C3FFCD-2556-4813-BDD9-426B9C490181}" 'Any other ID may be OK.
    win2.MergeID = win1.MergeID
    win1.Visible = False
    win1.Visible = True
    Exit Sub
EHND:
   
End Sub

Best Regards,

Junichi Yoda
http://june.minibird.jp/

JuneTheSecond

#5
Hi,

But how can I unmerge the merged windows again?
I've tryed Win1.MergeID="{00000000-0000-0000-0000-000000000000}".
But I could never change MergeIDs of the anchor wndows, if once they are merged.

I've tryed SetWindowRect to move a window in the merged windows.
But all windows moved togather, and did not separate each other.

Any other idea?
Best Regards,

Junichi Yoda
http://june.minibird.jp/