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

Unable to use text boxes

Status
Not open for further replies.

breezett93

Technical User
Jun 24, 2015
128
US
Hello,

I have created a simple data entry form with labels, text boxes, and an add button. When I test run the form, I am unable to access the text boxes no matter what code I use.

I have some experience with Visual Basic which is how I got this far, but I am not understanding why I can't enter any data into the text boxes.


Thanks.
 
Indeed just removing the button bar you still have much now incomplete wizard code in the rest of the form. Now even more error prone, as the button bar is gone.
Start over from an empty form.

Bye, Olaf.
 
Here's one thing you can do not using the wizards, still saving lots of time:

Create an empty form, open it's dataenvironment, add a dbf into it, drag a field from the table to the form canvas. You will get a control bound to the field. drag the whole table and you get a grid.
I don't like to work with the dataenvironment for many reasons, but for a start that'll get you quick up and running without any hidden code you inherit.

Bye, Olaf.
 
breezett93 - One thing we have neglected to do for you yet is to point you to the free on-line video tutorials for Visual Foxpro.

You might benefit from spending some time at: You can either download the videos or watch them on-line.
Possibly starting with the one titled: Creating a Form Manually

Good Luck,
JRB-Bldr
 
Thank you much. Because of time sensitivity on the project and the need to start entering data, I need to deploy the wizard version for now. Hopefully in the future, as I find time, I can make the form manually and then just swap out forms.

I have one final question before deploying: I'm sure it's because of the wizard, but when I run the .exe, there is this extra Window in the background of the form, that I do not want.

Does anyone know how to remove it leaving just the form itself?

 
That's not wizard related, that's the _SCREEN, looking like the IDE (foxpro itself) without the menu and toolbars of VFP.

You need the _SCREEN as long as all your forms are defaulting to ShowWindow = 0, which means they show in the _SCREEN. If you make it invisible by adding SCREEN=OFF in a config.fpw file you add to the project and set to be included, then the _SCREEN but also your forms will not show.

What you need to define then is at least one main Top-Level Form. If your application only has one form, that'll be ShowWindow = 2
This will mean this form is not modal, you'll need READ EVENTS to keep your EXE running.

See faq184-6512
you may create a new project with the code of this FAQ (scx version, presumably) and then replace the form with yours, set to ShowWindow = 2 and you have everything else already thought of.

Bye, Olaf.



 
In addition to making the ShowWindow change, I had to add
Code:
Application.Visible = .F.
to the Init event of the form and
Code:
Application.Visible = .T.
to the Destroy event.

This essentially accomplishes the same thing.

Thanks!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top