Jump to content
walker

cum pun link in visual basic?

Recommended Posts

Posted (edited)

am incercat sa fac un buton care sa faca trimiterea spre un link

 Public Class Form1

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
System.Diagnostics.Process.Start("https://rstforums.com/forum/78258-cum-pun-link-visual-basic.rst")
End Sub
End Class

dar nu merge

folosesc visual basic 2010 express

am uploadat proiectul aici http://www76.zippyshare.com/v/26651720/file.html

Edited by walker
Posted

am modifcat inainte sa vad ce ai scris nu imi aduc aminte sa fi facut asta,am incercat din nou,am pus si proiectul in primul post

problema este ca nu se deschide linkul in browser,daca era link gresit se deschdea in browser si zicea ca este invalid

Posted (edited)

Poftim, poti inlocui ie.exe cu orice browser vrei, sau poti sa-l faci sa verifice daca are chrome sa se deschida cu chrome daca are firefox sa se deschida cu firefox, sau poti sa-l faci sa se deschida cu browserul default, doar ca-ti trebuie putina imaginatie.

O metoda:



Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
System.Diagnostics.Process.Start("http://www.yourwebsite.com")
End Sub

A doua metoda:

 

Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click Shell("C:\Program Files\Internet Explorer\iexplore.exe https://rstforums.com/forum/78258-cum-pun-link-visual-basic.rst#post502904")
End Sub


Le-am testat pe ambele in VS 2013, functioneaza perfect. Prima imi face un nou tab in Chrome care este browserul meu default iar a doua imi deschide cu internet explorer.

Edited by Oust
Posted

credeam ca ce am pus eu o sa se deschida cu browser default,dar nu se deschide nici cum

am incercat si cum ai zis tu Oust asa primesc ceva erroare,sunt incepator in visual basic

asa am incercat si eu dar nu merge

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



×
×
  • Create New...