Path: csiph.com!eternal-september.org!feeder.eternal-september.org!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 22:33:06 +0100 Organization: solani.org Lines: 23 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 1478208790 20378 eJwFwYkBwCAIA8CVlCRYxqk8+4/gneDb89Dl1GguKHait63mzMQZ4iuDLOpfFYXOZZQax+4DHdQRAQ== (3 Nov 2016 21:33:10 GMT) X-Complaints-To: abuse@news.solani.org NNTP-Posting-Date: Thu, 3 Nov 2016 21:33:10 +0000 (UTC) X-User-ID: eJwFwQkBwDAIA0BLfAmdnALFv4TdwansDIKBxYp0tRDfWvh7LGuVN3XT89pULHTSQg77jM4PIhURSw== Cancel-Lock: sha1:wztfOaDwANAnBbk1/kkC4uMok1o= X-NNTP-Posting-Host: eJwFwYEBwCAIA7CXQKB056jY/09YUgHH7UQhSyX6FNH9wZAjHIV5U373zNbp9UicmOGzlf4DE4kREg== X-Newsreader: MesNews/1.08.06.00-it Xref: csiph.com it.comp.lang.visual-basic:18890 Il 03/11/2016 21:15:26 Franz_aRTiglio ha scritto: > Greg ha pensato forte : > >> Ma adesso ho un comportamento strano: quando lancio il browser appare giustamente in primo piano, ma nel compilato >> mi rimane invece in secondo piano. >> Setfocus non va, allora ho provato con SendMessage ma non sembra funzionare: >> k = SendMessage(IE.hwnd, WM_SETFOCUS, 0&, 0&) > > 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 -- Greg