andreas

In case you don't know already ...

Blog Post created by andreas on Jul 7, 2009

The Modified property

Have you ever thought about exiting a ProcessBook Display without getting prompted to save the changes?

 

The ProcessBook Display class exposes a property called Modified. Simply catch the BeforeClose event of the Display and set the Modified property to False. ProcessBook will not ask you to save the changes.

 

This can be handy if your users are allowed to change the display but you neither want them to safe the changes nor bother them with the question.

 
Private Sub Display_BeforeClose( ByVal bCancelDefault As Boolean
    Me.Modified = False
End Sub

A WebBrowser inside the Display

Adding a Browser to a ProcessBook is fairly simple:

  1. Open a ProcesBook Display.
  2. Press the Control button and add a Microsoft WebBrowser Control.
Now we will have to add some code to select the URL to display. For the sake of simplicity we will just choose a website to navigate to when the display is opened:
  1. Open the VBA editor either by pressing the apropriate button or by ALT+F11.
  2. Open the Code Window by a double-click on ThisDisplay in the Project Tree.
  3. Use the two combo boxes on the top of the code window to open the Display_Open Sub.
  4. Add the code below.

 
PrivateSub Display_Open()
    Me.WebBrowser1.Navigate( "http://www.osisoft.com" )
EndSub

You may imagine that other events can be used to drive the content of the WebBrowser control guiding the user of ProcessBook from events out of the process.

Outcomes