Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
List command
Message
 
To
18/07/2006 10:29:58
General information
Forum:
Visual FoxPro
Category:
Other
Title:
Environment versions
Visual FoxPro:
VFP 9 SP1
Miscellaneous
Thread ID:
01137222
Message ID:
01137288
Views:
18
try this:
oForm = CREATEOBJECT([Form1])
oForm.Show()
READ EVENTS

**************************************************
*-- Form:            form1 (d:\all_zapl\test.scx)
*-- ParentClass:     form
*-- BaseClass:       form
*-- Time Stamp:      07/18/06 07:32:04 PM
*
DEFINE CLASS form1 AS form


    Top = 0
    Left = 0
    Height = 250
    Width = 373
    DoCreate = .T.
    Caption = "Form1"
    Name = "form1"


    ADD OBJECT command1 AS commandbutton WITH ;
        Top = 196, ;
        Left = 198, ;
        Height = 27, ;
        Width = 131, ;
        Visible = .t.,;
        Caption = "Generate Error", ;
        Name = "Command1"


    PROCEDURE Error
        LPARAMETERS nError, cMethod, nLine
        lnMembers = AMEMBERS(laFormProp, thisform)
        lcStr = []
        FOR lnFor = 1 TO lnMembers
            IF TYPE([thisform.]+laFormProp[lnFor]) # [U]
               lcStr = lcStr + thisform.Name+[.]+laFormProp[lnFor]+[ = ]+TRANSFORM(EVALUATE([thisform.]+laFormProp[lnFor]))+CHR(13)+CHR(10)
            ELSE
               lcStr = lcStr +  thisform.Name+[.]+laFormProp[lnFor]+[ = NULL]+CHR(13)+CHR(10)
            ENDIF
        NEXT
        STRTOFILE(lcStr, [Test.txt])
        MODIFY FILE Test.txt
    ENDPROC


    PROCEDURE retyrnmyval
    ENDPROC


    PROCEDURE command1.Error
        LPARAMETERS nError, cMethod, nLine
        thisform.Error(nError, cMethod, nLine)
    ENDPROC


    PROCEDURE command1.Click
        WAIT WINDOW a
    ENDPROC

    PROCEDURE Destroy
        CLEAR EVENTS
    ENDPROC 
ENDDEFINE
*
*-- EndDefine: form1
**************************************************
Against Stupidity the Gods themselves Contend in Vain - Johann Christoph Friedrich von Schiller
The only thing normal about database guys is their tables.
Previous
Reply
Map
View

Click here to load this message in the networking platform