I agree with Mike,
also because there is tooling, that takes VFP to the web, for example foxincloud, but not the inverse.
What did you say? Ah, found it: In another thread you said:
Mandy_crw said:
my company is not paying me for the application, they consider it old.... although i tried selling it... our company is using web based app...
Not sure, but does that mean you're redoing that web based app they use? And redo it as a VFP desktop app? And you now look for ways to convert the HTML of that web app to VFP, after you are already finished almost?
Mandy_crw said:
my project is almost complete... just a little polishing...
It's very late for thinking in that direction, isn't it? That could have helped when you were starting to do a web app to VFP app conversion. Maybe you really only look for a <marquee> replacement.
I don't know, you're still very short about the details of what you need. You might not even know it precisely. You might have realized from the SCAN FOR thread, that your actual problem wasn't thinking about the right VFP code to use, but of the right form design and controls. A set of HTML input type=text elements could be easily repeated for every SCAN FOR result, so that's surely the HTML way of thinking to create a user interface dynamically. In VFP instead you'd not generate textboxes for each record but use a listbox or grid. Just to mention one point once more, in HTML the page size automatically increases if you add more HTML elements and if all grows very large the broswer automatically generates scrollbars. That's automatic in HTML generation. In winform you'd need to take it upon yourself to not only position new textboxes at new top/left coordinates as those aren't automatic, you also need to increase form.height. That alone isn't making HTML form like conversions easy. If one HTML page has 10 records, another has 40, you can forget to use to 10 record layout on one side and you won't like to always go for enough controls for 40 records when only 10 of them are used.
It won't help you to convert HTML to VFP forms in that respect, as repeated inputs in the layout of a grid or table in HTML don't automatically translate to a VFP listbox or grid. The need for that won't easily become apparent to a converter tool. In a 1:1 HMTL to VFP conversion you'd generate many textboxes and so a HTML to VFP converter, even if it would exist, could not help make the right choices of design of a VFP form. That still remains something to learn by yourself.
It's also one of many reasons why I don't see anyone doing HTML to VFP conversion. It's not necessarily straight forward. Also because HTML and desktop work on very different principles with a server side involved, even though many JS frameworks replace the server component locally on a client and HTML apps can act quite like desktop apps. There's no easy 1:1 conversion and VFP to HTML is easier than HTML to VFP even only considering the layout of forms without transforming program logic.
All that aside, if you can easier think in terms of markup language than using a visual form designer, you might like Matt Slays dynamic forms. He didn't base that on HTML but his own markup that's not handled by a browser but used to create VFP forms from it dynamically at runtime:
That doesn't help with HTML to VFP conversion, but you could design VFP forms as a markup notation similar to HTML. One could try to convert HTML to his markup, but I don't think that's feasible. It's also questionable to first need to learn his markup, but it may make it easier once you are used to create forms with HTML markup language it may come easier to you to write out a form than to use the form designer to compose it.
It surely is something to add to VFP when you look at all this as a hobby and want to investigate and learn things. At the same time it's a niche not many of us do use. So it makes getting help for how to program in VFP forms harder.
If you're really after the general topic of HTML and not just the marquee text scrolling element, then I'd say what you should do to get a better feeling for how to design your VFP forms is take a look at all the controls there are and how to use them. The VFP solutions app with code samples will teach you a bit about every control. There are some controls even having multiple examples on their usage.
That's where I'd recommend you go next. Not HTML or dynamic forms. If you don't make the transition to think in terms of desktop forms design, neither html conversion nor dynamic forms will help with that. Matt Slays dynamic forms surely would enable you to have a form growing automatically the more markup you write or let VFP code write, but it also won't know that your 4x20 textboxes are really better done with a grid.
That's why I think you don't get around learning all VFP controls and when to use them. It's not as steep a learning curve as in .NET, where you have a lot more controls. Not talking about the control suites you can add, almost any ActiveX control could be added to VFP, too. I also think that thinking about the right control choices is something you have to know or learn anyway, even in HTML there are design choices to make despite the freedom of any height of UI. In that respect it even becomes a n art in itself to design a web app that's concentrating its UI into one screen size as better UX. And making it responsive, which you can do with VFP forms anchoring techniques, too.
No tool can take the general layout/design task away from you. Even if you think the HTML layout already is perfect, you'd likely do it different in a desktop/winform which VFP forms are.
Chriss