ricafilipe Posted May 31, 2009 at 02:06 PM Report #268745 Posted May 31, 2009 at 02:06 PM <td align="center"><span class="gen">A sua mensagem foi afixada com sucesso<br /><br />Premir <a href="viewtopic.php?p=683178#683178">Aqui</a> para ver a sua mensagem<br /><br />Premir <a href="viewforum.php?f=28">Aqui</a> para voltar ao Fórum</span></td> Como faço para mostrar o viewforum.php?f=28 através deste código? For Each htmle In WebBrowser1.Document.GetElementsByTagName("td") Select Case htmle.Name Case "message" ... End Select Next
vasco16 Posted May 31, 2009 at 02:25 PM Report #268752 Posted May 31, 2009 at 02:25 PM Como faço para mostrar o viewforum.php?f=28 através deste código? For Each htmle In WebBrowser1.Document.GetElementsByTagName("td") Select Case htmle.Name Case "message" ... End Select Next secção errada.
ricafilipe Posted May 31, 2009 at 02:46 PM Author Report #268753 Posted May 31, 2009 at 02:46 PM secção errada? Acho que não....
softklin Posted May 31, 2009 at 07:20 PM Report #268781 Posted May 31, 2009 at 07:20 PM Não sei utilizar os controlos de webbrowser do VB.net, mas já tentaste pesquisar os links em vez dos conteúdos das tags td? Do género For Each htmle In WebBrowser1.Document.GetElementsByTagName("a") If html.href.substring(0, 13) = "viewforum.php" then ' aqui está o teu link webbrowser1.funcaoParaNavegar(htmle.href) Next Atenção que o código não é para copy paste, com certeza saberás quais a funções certas para substituir neste caso. 😄 Nick antigo: softclean | Tens um projeto? | Wiki P@P Ajuda a comunidade! Se encontrares algo de errado, usa a opção "Denunciar" por baixo de cada post.
ricafilipe Posted May 31, 2009 at 11:01 PM Author Report #268820 Posted May 31, 2009 at 11:01 PM Obrigado. Vai dar jeito. Podes postar mais exemplos de como chegar ao código fonte com o htmle? Não encontro nada sobre isto, e ando a trabalhar muito com o webbrowser, e preciso de carregar em botões, links, imagens etc... Obrigado desde já.
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now