Feedback
Did this article resolve your question/issue?

   

Article

How to create a GUI for .NET project with a web browser.

Information

 
TitleHow to create a GUI for .NET project with a web browser.
URL NameHow-to-create-a-GUI-for-NET-project-with-a-web-browser
Article Number000112251
EnvironmentProduct: OpenEdge
Version: All Supported Versions.
OS: Windows
Other: PDS for OpenEdge
Question/Problem Description
How to use PDS for OpenEdge to create a simple GUI for .NET project that includes a web browser on a form.
Steps to Reproduce
Clarifying Information
Error Message
Defect/Enhancement Number
Cause
Resolution
1) Start up PDS for OpenEdge.
2) Create a new project
      File->New->OpenEdge Project
3) The Create Project page appears. Select the Client button and the GUI for .NET radio button.
    Note: On versions of PDS for OpenEdge prior to 11.7.x, the Create Project page is slightly different. 
4) When the Project is created, right click the project name and select ABL Form.
5) The visual designer appears which includes the Toolbox.

Shows the main page including the visual designer and the Toolbox.

6) In the Toolbox, click the plus sign next to Microsoft Controls.
7) Select the WebBrowser control and place it onto the form.

Shows the WebBrowser menu selection in the Toolbar's list of controls.

8) Click save.
9) Right click in the form, in the visual designer and select View Source.
10) The source code representing the form appears on the screen.
11) Find the Method entitled InitializeComponent and find where the WebBrowser control is instantiated. Record the name of the
WebBrowser variable. In this case, it is webBrowser1.

Shows the WebBrowser variable being instantiated in the InitializeComponent method.

12) Add a new public method called openWebBrowser().
13) Add a call to the WebBrowser's Navigate method. The method might look like the following:
 
METHOD PUBLIC VOID openWebBrowser():
        webBrowser1:Navigate("http://www.progress.com").
END METHOD.

14) Save the changes.
15) In the file RunForm1.p, the form is instantiated. Add a call to the new method as follows:
 
rTemp = NEW test_form ( ) .
	
rTemp:openWebBrowser().

16) Save the changes.
17) Run the procedure (RunForm1.p)
18) The form appears. The web browser appears containing the contents of the web page.

Shows running program with web page displayed.
Workaround
Notes
References to other documentation:

Online Help: Introducing the ABL Editor: Concepts: ABL Resources in Progress Developer Studio for OpenEdge: GUI for .NET code (Windows only):
https://documentation.progress.com/output/ua/OpenEdge_latest/index.html#page/pdsoe/gui-for-.net-code-(windows-only).html

Online Help: Introducing Progress Developer Studio for OpenEdge: Concepts: Getting help: The Progress Developer Studio for OpenEdge Guide:
https://documentation.progress.com/output/ua/OpenEdge_latest/index.html#page/pdsoe/the-progress-developer-studio-for-openedge-guide.html

WebBrowser Class:
https://docs.microsoft.com/en-us/dotnet/api/system.windows.forms.webbrowser?view=netframework-4.7.2
Last Modified Date1/17/2019 2:48 PM
Attachment 
Files
Disclaimer The origins of the information on this site may be internal or external to Progress Software Corporation (“Progress”). Progress Software Corporation makes all reasonable efforts to verify this information. However, the information provided is for your information only. Progress Software Corporation makes no explicit or implied claims to the validity of this information.

Any sample code provided on this site is not supported under any Progress support program or service. The sample code is provided on an "AS IS" basis. Progress makes no warranties, express or implied, and disclaims all implied warranties including, without limitation, the implied warranties of merchantability or of fitness for a particular purpose. The entire risk arising out of the use or performance of the sample code is borne by the user. In no event shall Progress, its employees, or anyone else involved in the creation, production, or delivery of the code be liable for any damages whatsoever (including, without limitation, damages for loss of business profits, business interruption, loss of business information, or other pecuniary loss) arising out of the use of or inability to use the sample code, even if Progress has been advised of the possibility of such damages.