Re: Click OK from within a program


[ Follow Ups ] [ Post Followup ] [ Signature.net Forum ]

Posted by Grant Foraker on February 14, 2008 at 14:03:39: Uploaded files: 4

In Reply to: Re: Click OK from within a program posted by Keith Smith on February 14, 2008 at 12:48:13:

Here you go.

Cl.JPG shows the CL dialog with the default prompts. I auto fill the range by doing a FIRST and LAST on the Customer Master file (C1A).

CL2.JPG shows the report running with an odometer and Progress Bar. All the options but CANCEL are grayed out. The CANCEL lets the user stop the report. It's an interesting bit of logic that might violate Brian's rules. But it works. The report is being printed in a GOSUB. After every C1A read I check CANCEL$ for "Y" and do a RETURN. Meanwhile, the EventSub, which sets CANCEL$ has begun closing the dialog. I found that if I didn't RETURN out of the GOSUB it would run until the normal end of file. The screen would look like it was hung and the report would print in full.

TPE.JPG shows that program in progress. The program write to a TXT file that's imported into their "Shipping System" PC. After selecting TPE from the menu, I wanted to have the program just run and not have the user do a second, superfluous click of the PROCEED (OK).

I use an FSTAT to calculate the number of records in the file. For TPE this is always exact. For CL it depends on the amount of open space in the file. I calculate 1% of the total records to control the odometer and Progress Bar. This way I always do no more than 100 sends to the odometer and Progress Bar. Old Q habit :)

CSQ.JPG shows my List View lookup. Having Windows hold and return the keys (ID) is a lot easier that building a matrix in my Comet program. Windows sort the records. I'll be able to eliminate the City/ID xref file I had to maintain for the old Extended Windows lookup. In CSM, the maint program, the dialog display as "NEW" button.

I like the Visual Studio dialog method because I know what the dialog is going to look like. I had "conceptual" problems using the direct method. I also like being able to create generic dialogs with extra options that only appear when I need them. It has kept the number of dialogs downs and keeps my DLL files small.

At the last LV meeting, Barbara demonstrated her generic List View Inquiry that runs from the new #CFILES. Works with Extended Key files. Very cool. The final version will be even better.


Follow Ups:



Post a Followup

Name:
E-Mail:

Subject:

What is the name of the main Signature System's Product?

Comments:

Optional Link URL:
Link Title:
Optional Image URL:

You may attach up to 5 files to your followup (see below):





Each file can be a maximum of 1MB in length Uploaded files will be purged from the server on a regular basis.


[ Follow Ups ] [ Post Followup ] [ Signature.net Forum ]