dbroada Posted May 12, 2010 Posted May 12, 2010 yet another VB.NET question (must try to find a book) but one I am sure can be answered by our LISP or VBA guys. I am being forced into using MDI mode for opening drawings although I normally work in SDI. If neccessary my code changes to SDI = 0 and opens another drawing BUT the newly opened drawing immediately looses focus. What do you do to bring the newly opened drawing to the foreground? Quote
dbroada Posted May 12, 2010 Author Posted May 12, 2010 before this reaches page 2 I'll reply to my own post. This may not be the best way but it works... [font=Consolas][size=2][font=Consolas][/font][/size][/font][font=Consolas][size=2][color=#0000ff][font=Consolas][size=2][color=#0000ff][font=Consolas][size=2][color=#0000ff]Else [/color][/size][/font][/color][/size][/font][/color][/size][/font][font=Consolas][size=2][font=Consolas][size=2]myDrawing = acDocMgr.Open(ThisDrawingPath & myDWGName & [/size][/font][/size][/font][font=Consolas][size=2][color=#a31515][font=Consolas][size=2][color=#a31515][font=Consolas][size=2][color=#a31515]".dwg"[/color][/size][/font][/color][/size][/font][/color][/size][/font][font=Consolas][size=2][font=Consolas][size=2], [/size][/font][/size][/font][font=Consolas][size=2][color=#0000ff][font=Consolas][size=2][color=#0000ff][font=Consolas][size=2][color=#0000ff]False[/color][/size][/font][/color][/size][/font][/color][/size][/font][font=Consolas][size=2][font=Consolas][size=2]) acDocMgr.MdiActiveDocument = myDrawing [/size][/font][/size][/font][font=Consolas][size=2][color=#0000ff][font=Consolas][size=2][color=#0000ff][font=Consolas][size=2][color=#0000ff]End[/color][/size][/font][/color][/size][/font][/color][/size][/font][font=Consolas][size=2][font=Consolas][/font][/size][/font][font=Consolas][size=2][color=#0000ff][font=Consolas][size=2][color=#0000ff][font=Consolas][size=2][color=#0000ff]If [/color][/size][/font][/color][/size][/font][/color][/size][/font][font=Consolas][size=2][font=Consolas][/font][/size][/font] Quote
MSasu Posted May 13, 2010 Posted May 13, 2010 May try to retain current drawing's ID, open the new one and restore focus to first one just after - unfortunately I'm not able to provide you a .Net example. Regards, Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.