My example is below.
- Code: Select all Expand view RUN
- #include "FiveWin.ch"
STATIC oWnd, oBar
function Main()
PUBLIC oWebView
DEFINE WINDOW oWnd MDI
DEFINE BUTTONBAR oBar 3D OF oWnd SIZE 60,60
DEFINE BUTTON PROMPT "Open Google" OF oBar ACTION Open_Google()
DEFINE BUTTON PROMPT "Close Google" OF oBar ACTION Close_Google()
ACTIVATE WINDOW oWnd
return nil
PROCEDURE Open_Google()
LOCAL oWeb, cHtml:="https://www.google.com/"
oWebView := TWebView():New()
oWebView:Navigate(cHtml)
oWebView:Run()
oWebView:Destroy()
return nil
PROCEDURE Close_Google()
oWebView:Destroy()
// What should I write here to close google window?
return nil
When I click "Close Google", twebview does not close the window. Can you help me please?