Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Form caption in Main prg
Message
From
12/02/2008 09:17:59
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivia
 
 
To
12/02/2008 09:11:06
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Environment versions
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP SP2
Network:
Windows XP
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01291771
Message ID:
01291778
Views:
10
What you should do is base all your forms on a common class. Anything you do in your class will be executed in all the derived forms. This is called "inheritance".

The caption might be placed in the Init() method of each form.

If you didn't work with classes yet, start doing it - it can help a lot to reduce repeated code.

OOP (object-oriented programming), which refers to using classes, is one of the major improvements introduced in Visual FoxPro, as compared to the old FoxPro.

>Dear Experts
>
>In timer, I use following command to show Form Capion
>
>dtime= cdow(DATE())+ALLTRIM(",")+SPACE(1)+Cmonth(date())+Str(Day(date()), 3);
>+','+Str(Year(date()), 5)
>
>cap1=ALLTRIM("Ginning Accounting System")
>thisform.Caption=ALLTRIM(cap1)+SPACE(16)+ALLTRIM(dtime)+space(3)+ttoc(datetime(),2)
>
>
>This show Form's Caption as
>
>Ginning Accounting System                Tuesday, February 12, 2008   05:29:32 PM
>
>
>Now I want to apply this command on every form in project
>
>I do not use Screen in my main prg.
>There is a main Form SHOWWINDOW=2, TOP LEVEL and all other forms are opend in this form.
>
>What should I add in my main prg?
>
>Please help
Difference in opinions hath cost many millions of lives: for instance, whether flesh be bread, or bread be flesh; whether whistling be a vice or a virtue; whether it be better to kiss a post, or throw it into the fire... (from Gulliver's Travels)
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform