I have a Foxpro application that is about 30 years old, currently running on a virtual XP. I'd like to port it over to 64bit windows, but it's been 30 years since I last programmed in FoxPro (or anything else).
I could a bit of help getting started. I have everything downloaded and installed, but I can't even get the "hello world" to run.
What do I use... I tried the Xide that I downloaded from here. It appears to be a suitable IDE, a lot less confusing than Visual Studio. It comes with some sample code, which I was hoping I could just drop in and play with to see how it all works before I start anything serious.
So what you need to do, is start up XIDE, in the opening screen press "New" to create a new Project (application container) and open it ("Select").
Then, when the main IDE window opens, select from the main menu Project|Create New|New Application. You will see some templates, the simplest one is "Basic x# application" which is already a "hello world" app . Select it, press OK and the app will be created, you can view the code by clicking in the "Start.prg" file in the "Project" window at the right. Then press the green arrow toolbar button (or just press F5), this will compile and run the app, which shows a simple console with a message.
For something a little more advanced, you can create another application, selecting the "Basic x# form application" template. This will create an app with a window, select the Form1.prg file item in the Project window, expand it and double click on the form item (should be named BasicForm). This will show you a form, where you can put controls (from the Toolbox window at the right) and edit its properties, using the "Properties" window. So for example go to the Properties window, the 2nd row should have a property named "Text". Change the value to the right to Hello World and run the app with F5 again.
That's to get you started and start experimenting with x# and .Net. Of course it needs time to get familiar with it, please don't hesitate to ask any questions. And last but not least, welcome to x# and to this forum!
Of course do as Chris says. There is nothing better to renew or get the interest going again than to actually produce something that works.
You will, after 30 yrs, be entering a world of evolved technologies (inc. hardware) with an O/S, whilst still derived from Windows (NT), is in Windows 10 a very different beast. Greatly evolved too, is the litter of software beasts Windows hosts, as well as hardware(s) on which it runs.
Finding the information which would enable you to marry up and gain a mental picture of how all this ties together is not the easiest task in the world - simply because most books go into extreme levels of detail of subject-specific matter when all you really need is broad-brush appreciation: an appreciation that can be garnered in reasonable time-scale.
If there is sufficient interest here, I could try and explain my take on things in the X-Sharp documentation project.
You are right that things have changed. Back when I was programming xBase, I used a mix of dBase (III and IV), FoxPro, Clipper and (my preference) C with some nice xBase libraries. I gave up programming and switched to IT just as object-oriented programming was coming into vogue. Some my old programs are still in use at the government, which came as a surprise to me, but they do the job I guess.
I have just been handed a project to update someone else's FoxPro application of a similar vintage. I tried to get out of it, but people who know anything about this type of program appear to be somewhat rare these days. That makes me the company "expert" for this project.
Just to make it even more interesting, the source code is lost in the mists of time. Fortunately, it is a fairly simple application so I should be able to re-create it.
You guys are awesome.
I got the "hello world" console working and moved on to the basic Form Apllication. All working and I was able to add a textbox, display some text, and added a listview and a datagridview.
I guess the next question is, how do I persuade it to open and display my .dbf/.cdx data files? I expected that to be a property of the datagridview, but I don't see anything like that. I added a bunch of columns to the datagridview, but they are mostly empty. The checkbox works.
Someone else's FoxPro - a challenge to say the least - and something I'd be reluctant to take on.
It amazes me that some government depts. take the principle "if it ain't broke, don't fix it" to extremes.
It shouldn't be too horrible. It opens a dbf, allows some editing, logs the date and time of the edit, and saves. It might spit out some totals, by date. Now... if I could only open the dbf and see the data.... I was hoping that would be fairly obvious, but no.
apart from waiting a bit for X# runtime & drivers to materialize, you could try to find the demo version of Vulcan, and use their runtime & rdd-driver to brigde the gap.
Would mean, instead of the basic form sample, jump to the VN tab of the samples and make a Standard MDI sample. This let's you handle dbfs out of the box - sure, it "restricts" you to the old VO-UI, but this has served a lot of folks for the last 15 years well enough.
To get your, as i understand, not to sophisticated FP app functionality to run in .net environment, this would certainly be the fastest move...
I will try to find a demo version of Vulcan. When you say "wait a bit", how long might that be? If it's only a few weeks or even a couple months then I could probably put my project on hold. If it might be years, then I have to find another solution.
My co-worker suggested exporting the .dbf and then importing it into sql. I haven't done that before, but if it is a reasonable option then I could try it. That's probably the better option in the long run.
It's somewhere between several weeks and a few months. But since it's a new app that you are creating and you do not need compatibility for existing code, I think what the guys suggested about using one of the existing .Net libraries for dbf access is a very good idea.