Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > it.comp.lang.visual-basic > #18900

Re: FindWindow

From Greg <greg@alicie.com>
Newsgroups it.comp.lang.visual-basic
Subject Re: FindWindow
Date 2016-11-04 20:29 +0100
Organization solani.org
Message-ID <nviniu$3tj$1@solani.org> (permalink)
References <nvhtp2$h0a$1@solani.org> <b3a63e45-32e0-41dd-9576-8499354fb65f@googlegroups.com>

Show all headers | View raw


Il 04/11/2016 17:08:41 Luca D ha scritto:
> On Friday, November 4, 2016 at 1:09:08 PM UTC+1, Greg wrote:
>> ee = "Notepad"
>> ee = "Internet Explorer"
>> 
>> twnd = FindWindow(ee, vbNullString)
>> 
>> nel primo caso funziona, nel secondo fallisce!
>> Qualche indicazione per aitarmi a capire? Grazie
>
> https://msdn.microsoft.com/en-us/library/windows/desktop/ms633499(v=vs.85).aspx
>
> i due parametri sono, **nell'ordine**, class name e windows title... tu per cosa vuoi cercare, per classe (nel qual 
> caso il nome non è quello) o per titolo (nel qual caso l'ordine non è giusto)?!

Mi puoi dire il nome della classe per favore? Ero sicuro fosse "Internet Explorer" oppure  
"InternetExplorer.Application" dal momento che io creo l'ggetto con:  Set IE = 
CreateObject("InternetExplorer.Application")

Ad ogni modo ho provato con un window title a noto a priori (explorer aperto su google):
ee = "https://www.google.it/ - Google - Internet Explorer"
twnd = FindWindow(ee, vbNullString)
in questo modo ottengo un handle, quindi la Find ha funzionato, purtroppo quando poi passo l'handle alla SendMaessage 
non succede nulla:
k = SendMessage(twnd, WM_SETFOCUS, 0&, 0&)

La SM restituisce 0, è corretto? ma IExplorer non prende ancora il focus

-- 
Greg

Back to it.comp.lang.visual-basic | Previous | NextPrevious in thread | Find similar


Thread

FindWindow Greg <greg@alicie.com> - 2016-11-04 13:08 +0100
  Re: FindWindow Franz_aRTiglio <franzgol@N0SPAMtin.it> - 2016-11-04 16:41 +0100
    Re: FindWindow Greg <greg@alicie.com> - 2016-11-04 20:07 +0100
  Re: FindWindow Luca D <antaniserse@yahoo.it> - 2016-11-04 09:08 -0700
    Re: FindWindow Greg <greg@alicie.com> - 2016-11-04 20:28 +0100
      Re: FindWindow Luca D <antaniserse@yahoo.it> - 2016-11-05 11:06 -0700
        Re: FindWindow Greg <greg@alicie.com> - 2016-11-06 19:56 +0100
    Re: FindWindow Greg <greg@alicie.com> - 2016-11-04 20:29 +0100

csiph-web