Re: Get a reference to an opened window



Dan,

I think with all the latest patches and IE security updates, that no longer
works. For me, I get:

OLE error code 0x800401e3: Operation unavailable.

This is on the loIE = GetObject( , "InternetExplorer.Application") line.

I can loop through Explorer Windows like this still:

oShellObj = CREATEOBJ('Shell.Application')
oShWinColl = oShellObj.Windows()
FOR EACH oItem IN oShWinColl
? oItem.LocationURL
ENDFOR



--
Fred
Microsoft Visual FoxPro MVP


"Dan Freeman" <spam@xxxxxxxxxxxxx> wrote in message
news:eNq0G3vOFHA.3336@xxxxxxxxxxxxxxxxxxxxxxx
> I'm not sure about Windows explorer, but Internet Explorer is easy...
>
> Try
> * grab a reference if it's already running
> loIE = GetObject( , "InternetExplorer.Application")
> Catch
> Try
> * otherwise, create a new reference
> loIE = CreateObject("InternetExplorer.Application")
> Catch
> Messagebox("Couldn't get the object")
> Endtry
> Endtry
>
> The technique is called Automation. For more general information, see
> http://www.hentzenwerke.com/catalog/autofox.htm. It's about using Office
> apps, but the techniques apply.
>
> Dan
>
>
> Leon wrote:
>> I am trying to get Object reference to Internet explorer
>> and Windows Explorer.
>>
>> Leon
>>
>> "Dan Freeman" wrote:
>>
>>> Only if the application is an automation server.
>>>
>>> What exactly are you trying to do?
>>>
>>> Dan
>>>
>>> Leon wrote:
>>>> Hi Lee.
>>>> Thanks for replying.
>>>> May be I did not explain it correctly, but what I need is to have
>>>> the same type of reference
>>>> to the window as I would have by calling like O = Getobject(...).
>>>> And later I want
>>>> to use properties and methods of that object like O.ObjectProperty.
>>>> Is that possible to do?
>>>>
>>>> Leon
>>>>
>>>>
>>>> "Lee Mitchell" wrote:
>>>>
>>>>> Hi Leon:
>>>>>
>>>>> You need to use Windows API calls to find the Window name. Take a
>>>>> look at the code in this article:
>>>>>
>>>>> http://support.microsoft.com/default.aspx?scid=KB;EN-US;188404
>>>>>
>>>>> I hope this helps.
>>>>>
>>>>> This posting is provided "AS IS" with no warranties, and confers no
>>>>> rights.
>>>>>
>>>>> Sincerely,
>>>>> Microsoft FoxPro Technical Support
>>>>> Lee Mitchell
>>>>>
>>>>> *-- VFP9 HAS ARRIVED!! --*
>>>>> Read about all the new features of VFP9 here:
>>>>> http://msdn.microsoft.com/vfoxpro/
>>>>>
>>>>> *--Purchase VFP 9.0 here:
>>>>>
>>>
> http://www.microsoft.com/PRODUCTS/info/product.aspx?view=22&pcid=54787e64-52
>>>>> 69-4500-8bf2-3f06689f4ab3&type=ovr
>>>>>
>>>>> Keep an eye on the product lifecycle for Visual FoxPro here:
>>>>> http://support.microsoft.com/default.aspx?id=fh;[ln];lifeprodv
>>>>> - VFP5 Mainstream Support retired June 30th, 2003
>>>>> - VFP6 Mainstream Support retired Sept. 30th, 2003
>>>>>
>>>>>> Hi Guys.
>>>>>
>>>>>> Can anyone prompt me how to get a reference to not a VFP window?
>>>>>> The window was not opened from VFP 8.0 using Createobject() or
>>>>>> Getobject().
>>>>>
>>>>>> Thanks
>
>


.



Relevant Pages

  • RE: DEP ALERT
    ... It was definately windows explorer where I got the DEP alert [i ... While I have your attention perhaps you could tell me why I have a browser ... It is really important to distinguish between Windows Explorer and Internet ... install it for use with Mozilla Firefox 2.0.0.1. ...
    (microsoft.public.windowsxp.security_admin)
  • RE: DEP ALERT
    ... It is really important to distinguish between Windows Explorer and Internet ... Add-ons (Browser Helper Objects / Browser Extensions) that you may have ... install it for use with Mozilla Firefox 2.0.0.1. ...
    (microsoft.public.windowsxp.security_admin)
  • Re: Need collective brain power of the many
    ... there have now been over 200 people reporting very similar problems ... Windows Explorer (Recycle bin, folder shortcuts, control panel, ... Restore point or doing a Repair Install of Windows or reformatting ...
    (microsoft.public.windowsxp.general)
  • Re: Windows Explorer crashes every time I try to open recycle bin
    ... Renaming works fine only in Internet Explorer. ... >>worse as Windows Explorer comes up with a message saying it has had to close, ... > to what you are reporting. ... > to install free ShellExView and to try disabling these ...
    (microsoft.public.windowsxp.general)
  • Re: Explorer, desktop folders wont open - HELP!
    ... >I try to log into Microsoft Explorer and it does the same. ... there have now been over 200 people reporting very similar problems ... Windows Explorer (Recycle bin, folder shortcuts, control panel, ...
    (microsoft.public.windowsxp.general)