Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Object as form property
Message
From
04/10/2007 12:09:56
 
 
To
04/10/2007 12:03:03
Jay Johengen
Altamahaw-Ossipee, North Carolina, United States
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Environment versions
Visual FoxPro:
VFP 8 SP1
Miscellaneous
Thread ID:
01258596
Message ID:
01258600
Views:
13
This message has been marked as the solution to the initial question of the thread.
>I have this in the INIT of a form, but it is not in scope in another method of the form. That's because it's local to the INIT, I would guess, so that tells me I need to probably use a form property to hold it, but can I do this with an object? I could put it in the other method, but then it would recreate it each time that method is run. I was looking for it to only be created once.
>
>
>oShellApp = CreateObject("Shell.Application")
>
Jay,

put this in the init of the form
local oShellApp
oShellApp = CreateObject("Shell.Application")
=m.this.AddProperty('oShellApp', m.oShellApp)

&& in the form use: m.thisform.oShellApp 
Gregory
Previous
Reply
Map
View

Click here to load this message in the networking platform