User Tools

Site Tools


A VO GUI application with a Windows Forms window

Thanks to the work of Paul Piko there is the possibility to add a WinForms to a VO GUI application.

These are the steps:

  • Instead of using the “normal” App class from the VO GUI classes use the VOWinFormApp class (contained in the X# VO GUI classes window)
function Start( asCmdLine as string[] ) as int
  local oMainWindow as StandardShellWindow
  local oApp as VOWinFormApp // App
  oApp := VOWinFormApp{} // App{}
  oMainWindow := StandardShellWindow{oApp}
  return 0
  • when opening your Windows Forms window, use a ChildWinForm object as owner:
local oForm as MyWinForm
  local oChild as ChildWinForm
  oChild := ChildWinForm{ self, true }
  oChild:Menu := StandardShellMenu{ oChild }
  oForm := MyWinForm{ oChild }
  oChild:WinForm := oForm
  • when you need to close your Windows form, call the :EndWindow() method of your ChildWinForm owner object:
method CloseButtonClick(sender as System.Object , e as System.EventArgs) as void

You can find a sample of such an application here (in form of a XIDE export file):

vogui_with_winform.txt · Last modified: 2019/10/14 21:11 by wolfgangriedmann