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 Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

show command box

Status
Not open for further replies.

ameedoo3000

IS-IT--Management
Sep 20, 2016
233
EG
hi everyone
Is it possible to show the command box in the form after converting the program into an executable file?
Untitled_mzb9lh.png
 
2nd thought: If you want this for yourself, think about a thumb drive installation of FoxPro, the full IDE, not just the command window. Notice the EULA of VFP is a per user license, not a per computer license, so you can plug in such a thumbdrive and use VFP anywhere. With some restrictions like some IDE tools needing MSXML or ActiveX controls not available by default in todays Windows 10/11 systems, but they could be installed, if your customers cooperate, that's all free components.

What you can't do, by license and EULA, is install VFP permanently for any customer/user to use, but on site support is possible that way, easily. Besides the also quite simple modern method of having VFP on a notebook and asking for WLAN access.

I once worked for a larger corporation who actually also provided such notebooks within their domain.

IIRC, that was the motivation of this command window "emulator" by Ed Leafe, and by now you have many more comfortable options to have the full IDE at your hands legally and in compliance with the VFP EULA.

And last not least there are good reasons to want the full IDE for your support work on site of a customer, because don't think once you have a command window you can do everything. BUILD is not available, the whole debugger isn't available. So you're only unlimited by having a full VFP installation anyway.

Chriss
 
Some years ago, I used a product called FoxBox. It gives you most - not all - of the features of the command window from within an executable. I used it to do quick maintenance tasks and debugging at the client's site, to avoid having to install the full VFP IDE on their system.

I can't find any record of where I obtained FoxBox, but no doubt a Google search will turn something up.

Mike

__________________________________
Mike Lewis (Edinburgh, Scotland)

Visual FoxPro articles, tips and downloads
 
OK, I've now found some notes I wrote about FoxBox. It seems that I compiled it into an executable, which I named FOXBOX9.EXE, and which I installed on the client's system. (This was back in 2005, so I'm not likely to remember any other details).

This is what I wrote at the time:


FOXBOX9.EXE is a VFP command window. It lets us execute VFP commands on the user's system, even though VFP isn't installed.

FOXBOX9.EXE is based on the freeware FoxBox product, from Kirtland Associates. This version was recompiled under VFP 9.0, and therefore requires VFP 9.0 runtime libraries on the user's system.

Note the following:

· It supports MODIFY STRUCTURE, MODIFY COMMAND and MODIFY REPORT, but not MODIFY FORM.

· You can run a PRG, but it doesn't compile it. If the FXP is out of date, be sure to compile it within VFP and copy the FXP to the target system.

· The program reports errors in PRGs, but then continues running. This will usually lead to multiple error messages, which cannot be bypassed (other than by killing the process).


Hope this helps.

Mike

__________________________________
Mike Lewis (Edinburgh, Scotland)

Visual FoxPro articles, tips and downloads
 
Ameedoo3000, it's been a full week now since you posted your request, since when we have heard nothing from you. At the very least, it would be common courtesy to acknowledge the replies you received.

Mike

__________________________________
Mike Lewis (Edinburgh, Scotland)

Visual FoxPro articles, tips and downloads
 
I am very sorry. I went through an emergency situation that prevented me from responding. They were truly ideal and very effective solutions, and I thank you very, very much for them.
 
There was another question: Is it possible for users to create a new filter in the form in runtime ?
 
What filter in which form? I'm just puzzled about what you mean.

In the context of VFP the first thing coming to mind is SET FILTER. Well, if you talk about the command window replacements by EdLeafe or FoxBox Mike Lewis mentioned, then they allow (almost) any command you can also run in the original command window. This includes a SET FILTER command.

Indeed, also many commands that can be much more harmful than that. For users a command window is a tool I'd not recommend. It's giving too much powe. Pair that with half knowledge and you have the perfect recipe for desasters you don't want to recover.

It's your choice, obviously, but well, this little example already shows how complicated FoxPro is, if you know nothing about it, as I assume of users of an application. If they need a feature to change the data filtering, then it's best to program that into your application so it is something the user can do interactively without needing FoxPro language knowledge.

It's even worse, if you give them a command window and you can't actually tell them what commands are necessary to get what they need. Hint: To set a filter you have to have the correct workarea selected, and in case the form which has data to be filtered is in a private datasession, that needs to be switched to. And even knowing all that, SET FILTER might not suffice to filter data at all, if the filtering needs to affect multiple workareas or does something more complex than simple boolean expressions can do.

Do you know The Sorcerer's Apprentice?

Chriss

By the way: If you offer a separate EXE with FoxBox or vRunFox you run this command windows in a totally separate process, so it won't be able to affect workareas from your own application EXE at all. Ed Leafe expressively tells (and allows royalty free) to compile his command window replacement into your own application by including the sources into your own project and starting it from a menu item or command button, however you like, but a separate EXE will only be able to effect DBFs itself opens, not what another process has open.
 
Is it possible for users to create a new filter in the form in runtime ?

Please start a new thread for that question. That way, there is more chance that people will see it, and it will also help other people who are searching for similar questions.

Mike

__________________________________
Mike Lewis (Edinburgh, Scotland)

Visual FoxPro articles, tips and downloads
 
Chris, I suggested to Ameedoo3000 that he starts a new thread for that question (for reasons which I know you will agree with).

If he does, could you please re-post your reply in that thread (and perhaps delete it here).

Thanks

Mike

__________________________________
Mike Lewis (Edinburgh, Scotland)

Visual FoxPro articles, tips and downloads
 
Mike,

I could do that. Much of my response is related to givin users a command window, so it is actually a good place to keep it here, unless it turns out to be completely unrelated. We'll see and I'll act accordingly.

Chriss
 
Fair enough, Chris. To pick up your point about giving the user too much power - that is obviously correct. I would never expect to give the user access to FoxBox or anything similar. I see these purely as developer tools.

When I used FoxBox, I built it into a stand-alone executable, which I carried around on a memory stick. When I needed to use it, I would temporarily copy it to the user's system, and delete it when I had finished with it. (I didn't need to do a full install on the user's system as the VFP runtime files were already installed.)

Mike

__________________________________
Mike Lewis (Edinburgh, Scotland)

Visual FoxPro articles, tips and downloads
 
Well this is a sufficient and completely detailed response...thanks to all of you
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top