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

Visual Foxpro Window on Search screen

Status
Not open for further replies.
Jul 3, 2000
20
US
I'm changing some Foxpro 2.6 apps to Visual Foxpro and, being relatively new to VF, to make it easier I am using form wizards.

Anyhow, the main application appears fine on the screen but when a user clicks the "Search" icon the main Visual Foxpro window appears. How can I change the class searchform form to only show the search dialog form without the Visual Foxpro screen?

I've tried changing the ShowWindow property to 2 but then the search dialog doesn't appear.

Any help would be appreciated.
 
What do you mean by the "Visual FoxPro screen"? Do you mean the outer window -- the one that contains the main menus, toolbars, etc. as well as your child windows?

If so, I am surprised that it's not already visible. I can only guess that your form is a top-level form, that it, it has its ShowWindow property set to 2. If that's right, to make any subsidiary form appear, you should set its (the subsidiary form's) ShowWindow to 1. That way, it will appear within the bounds of your main form.

If I've misunderstood your problem, perhaps you could clarify it.

Mike

__________________________________
Mike Lewis (Edinburgh, Scotland)

Visual FoxPro tips, advice, training, consultancy
Custom software for your business
 
Let me clarify -

The program is very simple - view records from a single table. I used the form wizard, set my config.fpw with a SCREEN = OFF, and set the form.ShowWindow property to 2 - as top level form.

This makes the form look as an independent application running on the computer without the Microsoft Visual Foxpro main window screen running behind it.

However, when I click the "Search" button, rather than the search form appearing within the window (a child form to the parent), it opens up a Microsoft Visual Foxpro Window window inside which the search form appears.

I am in the process of just creating a new child form but I thought I could adjust a property or two from the class form called "Searchform.
 
I'd strongly advise that you don't use the Form Wizard. The framework that comes with VFP is quite complex, because it's designed to be all things to all people.

You're better off either choosing one of the commercial frameworks that fits your development style/needs, or just writing your own support code.

As for your immediate problem, I imagine that the search form (search form class?) that's part of the framework is designed to be shown in screen. You need to change the setting for that form or class (or subclass it and change it in the subclass).

Tamar
 
I think you are right.

I simply created a new form, added a few properties, and used the container from the searchform class. It works fine. I just need to refresh the data on the main screen for the applied filter.

Thanks.
 
The wizard is not meant to be used woth SCREEN=OFF. It seems to takes care that the screen is shown, when a form is started, that will otherwise not be shown. Mikes recommendation could also solve the problem, but a form showing IN the top level form really is bound to that size, so your top level form rather acts as the screen.

You can set all other forms to be top level forms too and then have the desktop as your "screen".

Bye, Olaf.
 
Foxinphilly,

If you have SCREEN = OFF in your Config.FPW, then you should do as I originally suggested: change the ShowWindow in your search form to 1.

You say you want your app to look like "an independent application running on the computer without the Microsoft Visual Foxpro main window screen running behind it."

If your app basically consists of a single main form and a few subsidiary forms, what you are doing is fine. But most VFP apps do need a main outer window, if only to act as a container for the many forms that you will probably need.

If you don't like the idea of having "Microsoft Visual FoxPro" in the title bar, or the fox icon in the main window, that's easy to change: just set the relevant properties in _SCREEN. Similarly, you can get rid of the FoxPro menus and toolbars.

But that's no reason to get rid of the outer window entirely.

Mike

__________________________________
Mike Lewis (Edinburgh, Scotland)

Visual FoxPro tips, advice, training, consultancy
Custom software for your business
 
I just noticed that you describe yourself as "foxinphilly." I'll take that to mean that you are located in the Philadelphia area. You might be interested in our Philadelphia VFP user group. You can check it out at vfpphilly.blogspot.com.

Tamar
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top