Windows.Forms and the VO.App class

This forum is meant for questions and discussions about the X# language and tools
User avatar
wriedmann
Posts: 4018
Joined: Mon Nov 02, 2015 5:07 pm
Location: Italy

Re: Windows.Forms and the VO.App class

Post by wriedmann »

Hi Karl,
I have several samples - but only samples, no documentation.
All my work for the XSharp conference 2023 was based on these samples and something I remembered from these documents.
IMHO it would the best to contact Paul, but that should be done by Chris or Robert as they know him much better.
Wolfgang
Wolfgang Riedmann
Meran, South Tyrol, Italy
wolfgang@riedmann.it
https://www.riedmann.it - https://docs.xsharp.it
User avatar
Kees Bouw
Posts: 172
Joined: Wed Nov 06, 2019 11:35 am
Location: Netherlands

Re: Windows.Forms and the VO.App class

Post by Kees Bouw »

wriedmann wrote: Fri Sep 05, 2025 2:32 pm Password.WFShellX.viaef for a Windows Forms application with VO windows). All samples are in the XIDE export format, so you will need XIDE to try them out.
Wolfgang
In the Password.WFShellX example in Xide there is a window called GenericVOFormContainer. If you double click on the blue link of this window you get the designer.
Image
In the designer, on the window properties it says at the top “GenericVOFormContainer (System.Windows.Forms.Form)” which suggests that it is a Windows.Forms window.
Image
But if I click on the tab “Design” it says Inherit From WinFormVOWindow.
Image
Apparently in Xide you can change where a Windows.Forms window inherits from. How can this be done in Visual Studio? I know that for a VO window there is the “Inherit from Class” option but that option seems to be missing when editing a Windows.Forms window. With C# and Windows.Forms there is an option to add an “Inherited Form” but that is also missing in X#.

Kees.
User avatar
wriedmann
Posts: 4018
Joined: Mon Nov 02, 2015 5:07 pm
Location: Italy

Re: Windows.Forms and the VO.App class

Post by wriedmann »

Hi Kees,
yes, in XIDE you can define the parent class of a Windows Form Form - and also for every control, like the VO Window Editor allows to do.
This is a great thing.
I do not know if the Window Editor of Visual Studio allows that - maybe there should step in Robert or Chris.

As I wrote earlier: to save the work to design a Windows Forms Form as owner for every VOGUI window I have build that generic form - but I think it should be no problem to don't use the painted form, but only the generated code. I have opted to have also a painted form only to have something to show at the session.

Wolfgang
Wolfgang Riedmann
Meran, South Tyrol, Italy
wolfgang@riedmann.it
https://www.riedmann.it - https://docs.xsharp.it
User avatar
Chris
Posts: 5472
Joined: Thu Oct 08, 2015 7:48 am
Location: Greece

Re: Windows.Forms and the VO.App class

Post by Chris »

HI Kees,

In VS, you need to go to the code generated for the window (while it is not open in the designer) and change the INHERIT clause directly there. Both in the main .prg and .designer.prg files, if the INHERIT clause is specified in both. Just make sure to put the full name of the class, including the namespace part.
Chris Pyrgas

XSharp Development Team
chris(at)xsharp.eu
User avatar
Kees Bouw
Posts: 172
Joined: Wed Nov 06, 2019 11:35 am
Location: Netherlands

Re: Windows.Forms and the VO.App class

Post by Kees Bouw »

Chris wrote: Mon Sep 15, 2025 12:21 pm HI Kees,

In VS, you need to go to the code generated for the window (while it is not open in the designer) and change the INHERIT clause directly there. Both in the main .prg and .designer.prg files, if the INHERIT clause is specified in both. Just make sure to put the full name of the class, including the namespace part.
Thank you Chris, that works. In the designer file there was no INHERIT so I added it. I can still open the window in the editor so that is great. I do think that an option should be added to X# to do this in a normal way, this feels a bit like "hacking".
I don't suppose there is any news regarding the search for the lost documents about the ChildWinForm, VOWinFormApp, WinFormVOWindow and WinFormVOWindowHost classes?

Kees.
User avatar
Chris
Posts: 5472
Joined: Thu Oct 08, 2015 7:48 am
Location: Greece

Re: Windows.Forms and the VO.App class

Post by Chris »

Hi Kees,

As Wolfgang kindly pointed out to me, the docs were actually part of the vulcan help file, in the Migrating to Vulcan section. As you were also using vulcan, you should have this, but I don't think it offers more than what the samples Wolfgang already sent you already did.
Chris Pyrgas

XSharp Development Team
chris(at)xsharp.eu
User avatar
Kees Bouw
Posts: 172
Joined: Wed Nov 06, 2019 11:35 am
Location: Netherlands

Re: Windows.Forms and the VO.App class

Post by Kees Bouw »

Chris wrote: Tue Sep 16, 2025 1:38 pm Hi Kees,

As Wolfgang kindly pointed out to me, the docs were actually part of the vulcan help file, in the Migrating to Vulcan section. As you were also using vulcan, you should have this, but I don't think it offers more than what the samples Wolfgang already sent you already did.
Hi Chris,

No, I do not have the documents. All I have is the Vulcan helpfile that offers no explanation at all. Basically just a mention that these classes exist. I think this information was simply copied to the X# helpfile so that also offers no help. As Wolfgang said already in 2019 on https://www.xsharp.eu/forum/topic?t=353 ... w&start=10:
there are two documents by Paul Piko and they don't have any GrafX copyright, so maybe we can ask Paul if we can put them somewhere to download, and maybe "refresh" them for X#
So there should be 2 documents, not samples, presumably PDF or Word documents explaining these classes. I would think these classes are very important for anyone who wants to mix Windows.Forms and VO windows in the same application.

Kees.
User avatar
ArneOrtlinghaus
Posts: 478
Joined: Tue Nov 10, 2015 7:48 am
Location: Italy

Re: Windows.Forms and the VO.App class

Post by ArneOrtlinghaus »

Here are the files I think you were mentioning. Paul made also some "Hybrid" solution examples, but I think that they are not anymore helpful.

Arne
Attachments
HostingWinForm.pdf
(683.07 KiB) Downloaded 645 times
HostingVO.pdf
(2.29 MiB) Downloaded 563 times
User avatar
wriedmann
Posts: 4018
Joined: Mon Nov 02, 2015 5:07 pm
Location: Italy

Re: Windows.Forms and the VO.App class

Post by wriedmann »

Hi Arne,
great, thank you very much!
Wolfgang
Wolfgang Riedmann
Meran, South Tyrol, Italy
wolfgang@riedmann.it
https://www.riedmann.it - https://docs.xsharp.it
User avatar
Kees Bouw
Posts: 172
Joined: Wed Nov 06, 2019 11:35 am
Location: Netherlands

Re: Windows.Forms and the VO.App class

Post by Kees Bouw »

ArneOrtlinghaus wrote: Wed Sep 17, 2025 6:09 am Here are the files I think you were mentioning. Paul made also some "Hybrid" solution examples, but I think that they are not anymore helpful.

Arne
Hi Arne,

Thank you very much for taking the time to find these files and share them on the forum!!

Kees.
Post Reply