Path: csiph.com!weretis.net!feeder4.news.weretis.net!feeder5.news.weretis.net!news.solani.org!.POSTED!not-for-mail From: Greg Newsgroups: it.comp.lang.visual-basic Subject: Re: Come forzare la chiusura di un mio oggetto? Date: Thu, 03 Nov 2016 23:21:37 +0100 Organization: solani.org Lines: 27 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-15"; format=flowed Content-Transfer-Encoding: 8bit X-Trace: solani.org 1478211700 22348 eJwNx0kBwDAIBEBLXAtETgngX0I6v4E6+w1zuGGx5DVRJvgDPguy1ug5ZpQ7q+jKmyotDNrvARGZENg= (3 Nov 2016 22:21:40 GMT) X-Complaints-To: abuse@news.solani.org NNTP-Posting-Date: Thu, 3 Nov 2016 22:21:40 +0000 (UTC) Cancel-Lock: sha1:iIVCGILEtqb9jnVHiMeurUQnp/8= X-NNTP-Posting-Host: eJwNxccBgDAMA8CV4iKZjIPb/iPAfQ5GYYUTdCz2yKjtSvbqKWiWJ2HUf5839CK6hRMS98n6ACDjESo= X-Newsreader: MesNews/1.08.06.00-it X-User-ID: eJwFwYEBwCAIA7CXitCi50yQ/09YQpepMkQFhzN4kuPNccNOcxBdIvwFL7sVYZUb68sT6/4DRBAH Xref: csiph.com it.comp.lang.visual-basic:18891 Il 03/11/2016 22:33:06 Greg ha scritto: >> L'hai reso visibile ? >> >> IE.Visible = True >> >> Altrimenti è ovvio che setfocus fallisce.... > > Certo, infatti lo vedo anche. > L'errore è Proprietà o metodo non supportato dall'oggetto. > Infatti andando a vedere alla fonte, il SetFocus non c'è, per questo mi ero messo ad usare SendMessage, che però non > da risultati, per adesso. > > https://msdn.microsoft.com/en-us/library/aa752084(v=vs.85).aspx Riassumo premesso che creo la finestra browser in questo modo: Dim IE As Object Set IE = CreateObject("InternetExplorer.Application") Ho usato la SendMessage con l'handle di un mio form in secondo piano e il focus viene inviato. Quidi ho usato la sendmessage sia con l'handle dell'oggetto IE, sia con l'handle dell'oggetto "Internet Explorer" ma il focus non viene ancora inviato. Domani proverò ancora, anche se adesso non so bene cosa -- Greg