Graph.AddFilter srcfilter, "Video Capture" 'srcfilter.ShowPropertyDialog 'MsgBox "Result: "+Str(srcfilter.Lasterror)+": "+srcfilter.LasterrorMessage // let's pick a video encoder Use the system device enumerator and class enumerator to find // a video capture/preview device, such as a desktop USB video camera. Add a public property called SelectedButton As WebButton.// Attach the filter graph to the capture graph.Name the buttons “OKButton” and “CancelButton” and change their captions to “OK” and “Cancel” respectively. Or you can drag a “Modal Dialog” from the Library. Create a new Web Dialog called “TestDialog” using the Insert button on the toolbar or the Insert menu.Here is how you can add a dialog to a web page:
Remember, web dialogs do not cause your code to wait until the dialog is closed. The type can be Sheet, Palette or Modal.Ĭlose - Call the Close method in a web dialog dismisses the dialog and calls its Dismissed event handler.
Type - You specify the type in the Inspector to indicate how the web dialog displays. It is also called when the close button on the title bar is clicked for palette dialogs. Refer to WebDialog in the Language Reference for the complete list.ĭismissed - The Dismissed event is called when the dialog closes by calling its Hide or Show methods. The Dismissed event (shown below) is called when the dialog is closed.īelow is a list of commonly used events, properties and methods. Instead the code in your method (or event) continues to the end. Your code does not pause and wait for the dialog to be closed. In particular, remember to add a button that dismisses the dialog by calling the Close method. On the dialog, you add the controls for the layout you need. To do this, you add a Web Dialog to your project, layout its design and add it to a web page. Most of the time you will need a more advanced dialog box, perhaps with additional controls, or a more sophisticated layout than what MessageBox offers. Your code continues running to the end of the method. The MessageBox command does not cause your code to wait until the MessageBox is closed. This line of code displays a message box with the message and one button that the user can click to dismiss the dialog.