Hi I'm currently working on a project where I want to be able to take the information from form1 in this case its address details for google maps then have google maps appear in a separate form to the previous. The main reason I want to keep them separate is because I have my database linked to the first one.
I have included a copy of my code in which I'm 90% finished but just need someone to show me simple line of code to link the web browser on Form 2 to Form 1
Private Sub BTNMap_Click(sender As Object, e As EventArgs) Handles BTNMap.Click Form2.Show()
Dim Postcode As String = PostcodeTextBox.Text
Dim Address As String = AddressTextBox.Text
Try
Dim queryAddress As New StringBuilder
queryAddress.Append("http://ift.tt/1c67pA8")
If PostcodeTextBox.Text <> String.Empty Then
queryAddress.Append(Postcode + "," & "+")
End If
If AddressTextBox.Text <> String.Empty Then
queryAddress.Append(Address + "," & "+")
End If
Internet.Navigate(queryAddress.ToString)
Catch ex As Exception
MessageBox.Show("Unable to retrieve data")
End Try
End Sub
P.S
I have not put any could on form 2 as I don't no what to write to link the pair. Also a little explanation I wish to take the information on form to be presented on google maps form 2
The problem is Internet.Navigate(queryAddress.ToString)
I'm very new to programming so be easy on me
Aucun commentaire:
Enregistrer un commentaire