HOW TO
While Visual Basic and ArcView are communicating through DDE, and because they are running independently, you can change the state of ArcView. If you send an Avenue request to ArcView from Visual Basic to, for example, get the active view, there's no guarantee the active theme will be the view you want, even though it was when the Visual Basic application started.You must program your Visual Basic application to handle this situation.
Code:
'-- Connect to a Visual Basic application as a destination
aDDE = DDEClient.Make ("SomeApp","SomeTopic")
'-- Poke information into a hidden text field on the VB side
theView = av.GetActiveDoc
theTheme = theView.GetActiveThemes.Get(0)
'-- txtHidden is the name of the text box control in Visual Basic
aDDE.Poke ("txtHidden",theView.asstring+","+theTheme.asstring)
Note:
Change the text strings SomeApp, SomeTopic, and txtHidden to items in your application.
Article ID:000004007
Get help from ArcGIS experts
Download the Esri Support App