xsharp.eu • XPort VO forms to Winforms?
Page 1 of 1

XPort VO forms to Winforms?

Posted: Thu Sep 08, 2022 4:07 pm
by ic2
In VO Xporter there's an option "Generate Windows Forms out of WED binaries".

How is this supposed to work? It is greyed out when I select a mef with multiple VO forms in it.

In other words: how can I have a kickstart with a Winforms form when I have a VO form in my code? I don't know where WED files would need to come from. In my Cavo directories, where the repo's are too, I only see bBrowsers and Hover.wed files, I think to have these appear in the tools window.

Dick

XPort VO forms to Winforms?

Posted: Fri Sep 09, 2022 5:43 am
by Chris
Hi Dick,

That works with .aef files only at the moment. It creates an extra (WinForms) project, which only contains the windows as windows forms that you can open from VS, of course with no backend code, like event handlers etc.
The .wed files you can ignore them, those are for the XIDE version only.

.

XPort VO forms to Winforms?

Posted: Fri Sep 09, 2022 11:56 am
by ic2
Hello Chris,


EDIT

This looks very promising. I extracted 2 programs FTPStatus.Designer.prg and FTPStatus.prg from my C:XporterOutputWindows.Forms directory and renamed the namespace to that ot the target program.

On compiling I originally got this error (but solved it, hence my edit)

PARTIAL CLASS FTPStatus INHERIT System.Windows.Forms.Form

Code: Select all

CONSTRUCTOR()
	SELF:InitializeComponent()
RETURN
Error XS1061 'iConnectEmail.FTPStatus' does not contain a definition for 'InitializeComponent' and no accessible extension method 'InitializeComponent' accepting a first argument of type 'iConnectEmail.FTPStatus' could be found (are you missing a using directive or an assembly reference?)

The program is in the same project as another, working and newly designed, Winforms window. I even copied the using statements from the working Winforms program into FTPStatus.prg, I have made some changes in the form itself hoping something would be regenerated but the error remains.

Eventually I found that FTPStatus.Designer.prg was brought back to only a few lines. I reimported the original programs (after the above changes) and it is in this program that InitializeComponent is defined, it now works. Not sure why or how I lost the code.

But this is Porting really fantastic!



Dick