Visio View control DoCmd Cancel exception and odd mouse cursor

S

Sean

Hi, Folks:
I met one weird problem. When I integrated the Visio View control at one
WinForm application and call
Application.DoCmd(VisUICmds.visCmdOptionsPageSetup), if I don't change
anything and click Ok or Cancel, the Visio Control popups \n\nCancel
exception, and the mouse curor over the control is converted to Application
Running. Does anybody have any idea why this happens and how to fix it?
Thanks a lot !

Sean
 
S

Sean

Thank you. JuneTheScond. I do wish Visio SDK developers can fix this.
Currently it looks like there is no solution for this bug.
 
J

JuneTheSecond

Only these kind of things can be done.

Sub test()
If Not DoCmdDialog Then
If MsgBox("Do you continue this macro?", vbYesNo + vbQuestion) =
vbNo Then Exit Sub
End If
' ..........
' ..........
MsgBox "This is a macro test."
End Sub

Function DoCmdDialog() As Boolean
On Error GoTo ERRHDL
DoCmdDialog = True
Application.DoCmd visCmdOptionsPageSetup
Exit Function
ERRHDL:
DoCmdDialog = False
End Function

--
Best Regards.

JuneTheSecond
Now, visual calculation is more visual.
http://www.geocities.jp/visualcalculation/english/index.html
 

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