Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Visual Basic vs. Visual Foxpro

Status
Not open for further replies.

dden

Programmer
Mar 22, 2002
5
0
0
US
I am trying to convert FoxPro 2.0/2.5 DOS to VFP 6. I find that the form design tools are cumbersome compared to VB6 - I have VStudio 6.

My question: Is there anyway to use VB form design and have the clickable events run a foxpro program / function?

Is there any link within Visual Studio.

Thanks !!
 
I don't know if it is possible, but it should be. You would have to create a DLL using Visual FoxPro and call the functions in it from VB. The biggest limitation is that the VFP DLL cannot have any visual components, only data processing.

Ian
 
Thanks Ian,

That sounds possible. Are there any easy examples of creating such a DLL that I could study?

I really would like to use the best of the two products, ie. "visual" basic with the fantastic database "rushmore" of foxpro. Also, I'm basically lazy - and really don't want to change/re-write any of the processing stuff - it's been working fine since the early '80's. "If the roof don't leak ....."

I would like just to have the user input screens look like windows instead of the _screen with all its @ y,x say ....
 
I am mystified by your comment that it is easier to use VB forms then VFP, I program in both and wish I had the same control over the forms design in VFP to use in VB
 
Probably it's because of what I don't know.

I posted a question on 3/22 (No responses) about form color changes when I used a user-window for specific data input. It goes to black as soon as the user window closes. I've tried every color scheme for the window, - I guess because the _SCREEN (fox window) defaults to black. ???

I'm coming from FOX DOS where I used a lot of user-defined windows and popups - and I would like to use them as they are - but the basic underlying form colors are killing me.

 
Just as you wouldn't think of trying to use gwbasic code in VB, don't try to use FPD code in VFP. While some it may work, it's more trouble than it's worth to make it work "right" - Windows just isn't DOS.

Rick

P.S. In VFP, the _SCREEN defaults to a white background with black text.
 
Hi dden,

You really should reconsider using a total VFP approach. It has everything you need. It has the application language that works natively with its advance database and tables (e.g. persistent relations, table buffering, database procedures, referential integrity, triggers, etc). It also has its own Integrated Developers Environment (e.g. IDE), and at current prices it really makes for a sweet deal. Leland F. Jackson, CPA
Software - Master (TM)
Nothing Runs Like the Fox
 
I also have some bad experiences in migration of FPD to VFP. Depending on the code you write, it may not be possible (or more correctly, "usually fails"). Some lines with commands like SAVE SCREEN, ?, ?? may be fine in FP and not working properly in VFP. My final decision was to rewrite the stuff. Moreover I think the design of a good program flow and concept is much more time-consuming than coding.
Well the form design tools of VFP is not so bad, isn't it? I don't think it is wise to use VB to write the user interface and then use VFP to write the data processing. Later you may need to handle more complicated data validation in the user interface. How can you deal with it if they are written in two different languages?
 
Just an observation:

If you really want to use a VB user interface but the VFP data handling. Jsut consider a 3 tier design in which the presentation layer is in VB, the business logic and datahandling in VFP en datastorage layer in whatever database system you wish to use.

In my experience, here within our company the standard has become VB allthough I am currently still in a package made in VFP (I'll have to migrate very soon...;-( ).
In my experience most VB programmers in our company use a user intereface oriented design approach in programming, which in my opinion cuases a lot of maintenance problems.

VB seems to be good in GUI design, so why not use that and handle the Business layer in VFP.

HTH,

Weedz (Edward W.F. Veld)
My private project:Download the CrownBase source code !!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top