Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
A very simple form refresh question
Message
From
03/12/2003 08:11:34
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
 
 
To
03/12/2003 08:00:36
Lutz Scheffler
Lutz Scheffler Software Ingenieurbüro
Dresden, Germany
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00855354
Message ID:
00855375
Views:
13
Agnes,
I intentionally placed (roughly) :)
IOW I was lazy to go into details, like it might not exist (actually also placed *... comment for error checking:), it might be null etc
If the only intuitive way of doing it was _screen.forms collection (which would fail say when top level forms used) I might not be lazy for a better code :)

PS: I didn;t directly put refresh in loop just thinking once I get it probably would return it or would do more things with it.
Cetin

>Cetin,
>
>PMFJI
>
>What happens to your code if there is no form named 'mani'? Why not:
>
>
>for ix=1 to _screen.forms.count
> if lower(_screen.forms[ix].name) = "mani"
>    _screen.forms[ix].REFRESH()
>    exit
> endif
>endfor
>
>?
>
>Agnes
>>>Hi
>>>
>>>Very simple question - I normally refresh forms with thisform.refresh but the form I need to refresh is not the form that has focus
>>>
>>>Its name is mani
>>>
>>>mani.refresh doesn't work - what is the correct syntax?
>>>
>>>Thanks
>>>
>>>Colin
>>
>>Colin,
>>Is mani object reference name or just form's name ?
>>You need the object reference.
>>If mani is a single unique name among all forms on screen then you might find out its obhject reference traversing _screen.forms collection. ie:
>>(roughly)
>>
>>for ix=1 to _screen.forms.count
>> if lower(_screen.forms[ix].name) = "mani"
>>    oMani = _screen.forms[ix]
>>    exit
>> endif
>>endfor
>>*...
>>oMani.refresh
>>
Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform