codesamples:broadcast_message_winforms
Differences
This shows you the differences between two versions of the page.
Next revision | Previous revision | ||
codesamples:broadcast_message_winforms [2018/06/07 18:28] – created wolfgangriedmann | codesamples:broadcast_message_winforms [2018/09/11 04:12] (current) – wolfgangriedmann | ||
---|---|---|---|
Line 6: | Line 6: | ||
You can use " | You can use " | ||
- | < | + | < |
LOCAL aParameters AS OBJECT[] | LOCAL aParameters AS OBJECT[] | ||
- | LOCAL oFormsList AS FormCollection | + | LOCAL oFormsList:= List< |
LOCAL oReturnValue AS OBJECT | LOCAL oReturnValue AS OBJECT | ||
- | aParameters: | + | aParameters: |
- | | + | |
+ | //Why? The FOREACH...NEXT doesn' | ||
+ | //Such a change can occur if one of the opened forms, during the loop, opens a NEW Form in its " | ||
+ | FOREACH oForm AS Form IN Application.OpenForms | ||
+ | oFormsList: | ||
+ | NEXT | ||
- | FOREACH oForm AS Form IN oFormsList | + | FOREACH oForm AS Form IN oFormsList |
- | oReturnValue: | + | |
- | IF oReturnValue IS LOGIC .and. ! (LOGIC)oReturnValue | + | |
- | //If a particular Form: | + | IF oReturnValue IS LOGIC .and. ! (LOGIC)oReturnValue |
- | //exit the loop | + | //If a particular Form: |
- | EXIT | + | //exit the loop |
+ | EXIT | ||
+ | ENDIF | ||
ENDIF | ENDIF | ||
NEXT | NEXT | ||
Line 41: | Line 48: | ||
**Implementation example.** | **Implementation example.** | ||
- | < | + | < |
Method xyz_FormClosed(sender AS OBJECT, e AS System.Windows.Forms.FormClosedEventArgs) AS VOID | Method xyz_FormClosed(sender AS OBJECT, e AS System.Windows.Forms.FormClosedEventArgs) AS VOID | ||
- | | + | |
CLASS MySpecialTextBoxControl inherit Textbox | CLASS MySpecialTextBoxControl inherit Textbox | ||
Method xx() | Method xx() | ||
- | | + | |
CLASS abc inherit Form | CLASS abc inherit Form | ||
Line 65: | Line 72: | ||
RETURN TRUE //This means the Broadcast Function will continue his loop...</ | RETURN TRUE //This means the Broadcast Function will continue his loop...</ | ||
+ | Code courtesy by Guy Deprez | ||
codesamples/broadcast_message_winforms.1528396103.txt.gz · Last modified: 2018/06/07 18:28 by wolfgangriedmann