Ultra stupid question
Ultra stupid question
What do you mean, how to display another form? If you have created another, say Form2, then you need
LOCAL oForm AS Form2
oForm := Form2{}
oForm:Show()
If you are just asking how to create another form, then you need to use Project->Add New Item and from the list pick "Windows.Forms.Form".
If you are asking something different, please explain!
LOCAL oForm AS Form2
oForm := Form2{}
oForm:Show()
If you are just asking how to create another form, then you need to use Project->Add New Item and from the list pick "Windows.Forms.Form".
If you are asking something different, please explain!
Chris Pyrgas
XSharp Development Team
chris(at)xsharp.eu
XSharp Development Team
chris(at)xsharp.eu
Ultra stupid question
I want to run/call the form program. In VFP you execute: do form1.prg or do form form1. I don't have any Clipper/VO experience.
The form was created via -> right click on project -> Add -> New Item -> Windows Forms/Windows Forms Forms
The form was created via -> right click on project -> Add -> New Item -> Windows Forms/Windows Forms Forms
- lumberjack
- Posts: 726
- Joined: Fri Sep 25, 2015 3:11 pm
- Location: South Africa
Ultra stupid question
Hi,
Here is the basics of an application that creates a MainForm via the designer and run it:fxsharp wrote:I want to run/call the form program. In VFP you execute: do form1.prg or do form form1. I don't have any Clipper/VO experience.
The form was created via -> right click on project -> Add -> New Item -> Windows Forms/Windows Forms Forms
Code: Select all
USING System.Windows.Forms
USING System.Drawing
[STAThreadAttribute];
FUNCTION Start( asCmdLine AS STRING[] ) AS INT
LOCAL nExitCode AS INT
nExitCode := 0
Application.EnableVisualStyles()
Application.Run(FormMain{})
RETURN nExitCode
______________________
Johan Nel
Boshof, South Africa
Johan Nel
Boshof, South Africa
Ultra stupid question
I used the following and it worked:
LOCAL oForm AS Form2
oForm := Form2{}
oForm:Show()
Thanks
LOCAL oForm AS Form2
oForm := Form2{}
oForm:Show()
Thanks
Ultra stupid question
You see, why we loved VO?fxsharp wrote:I used the following and it worked:
LOCAL oForm AS Form2
oForm := Form2{}
oForm:Show()
LOCAL oForm AS Form2 // you have a cookie cutter, defined somewhere in your app
oForm := Form2{} // you make "a" cookie
oForm:Show() // you say: show yourself, that i might eat you
![Wink ;)](https://dt9qzg9h465rt.cloudfront.net/phpBB3/images/smilies/icon_e_wink.gif)
Easier and clearer, imho, it can't get.
Karl
Regards
Karl
(on Win8.1/64, Xide32 2.20, X#2.20.0.3)
Karl
(on Win8.1/64, Xide32 2.20, X#2.20.0.3)
Ultra stupid question
VFP also has class based forms. Thought there might be an old school way of launching programs. And I don't know squat about .NET, to make matters worse.
- lumberjack
- Posts: 726
- Joined: Fri Sep 25, 2015 3:11 pm
- Location: South Africa
Ultra stupid question
Don't worry about not knowing .NETfxsharp wrote:VFP also has class based forms. Thought there might be an old school way of launching programs. And I don't know squat about .NET, to make matters worse.
Just ask and we will assist. Even better, just post a VFP example and we will show you how to achieve the same effect in X#. It will get easier as more of the VFP syntax is supported in X#.
XBase greets,
______________________
Johan Nel
Boshof, South Africa
Johan Nel
Boshof, South Africa
Ultra stupid question
Thanks lumberjack. I did not use VFP much to be honest. Mostly FPD. I spent a lot of time understanding OOP in VFP and wrote a few small apps but never made the leap because I thought in the back of my head Microsoft was going to abandon the product. Sure enough they did. In between I'd mess around with clipper and then harbour, but never saw a future in it. If xSharp gains traction, then I'll be sold. I'm actually not really interested in xSharp/VFP.
- lumberjack
- Posts: 726
- Joined: Fri Sep 25, 2015 3:11 pm
- Location: South Africa
Ultra stupid question
Well I am interested in seeing what we can do with your code in XSharp...
______________________
Johan Nel
Boshof, South Africa
Johan Nel
Boshof, South Africa