Okay hope i'm not 100% sure I get what you mean. BUT I'm taking a guess that the user can rename a long URL to something shorter for quick access later on.
If this isn't what you mean at all I apologise, but I don't really have a clear idea of what you want to do. In this case the user can choose to create a new "quick-URL" by clicking an appropriate button. The save form would have about 2 textboxes and a button.
Say you have 2 textboxes. TextBox1 for the quick URL to a big URL and TextBox2 is the big URL in question. The button is to save
i.e say I wanted to navigate to google using your webbrowser quickly,
I would first click the button on the main form "Create New Quick-URL"
Then on the form that pops up
add to textbox1: "Google"
add to textbox2: "http://www.google.com"
Then press save.
For the save button add this code.
[php]
SaveSetting("MyApp", URLs", TextBox1.Text, TextBox2.Text)
Form1.Show 'this is assuming you hid your main form when bringing up the save form'
Me.Close()
[/php]
Then for your "Navigate" button for the webbrowser (I'm going to call your address textbox (the one you use to type regular URLs into) txtAddress.
[php]
If GetSetting("MyApp", "URLs", txtAddress.text) <> "" then
WebBrowser1.Navigate((GetSetting("MyApp", "URLs", txtAddress.text))
Else
Try
WebBrowser1.Navigate(TxtAddress.Text)
Catch ex as Exception
End Try
End if
[/php]
Still dunno if that's what you want but that allows the user to create quick-URLs so when they type that word into the address bar it opens the assigned URL. You can make it more advanced/functional as you wish but that's the basics. Might need a bit of bug-proofing but hope you get the general idea.
If this isn't what you mean at all I apologise, but I don't really have a clear idea of what you want to do. In this case the user can choose to create a new "quick-URL" by clicking an appropriate button. The save form would have about 2 textboxes and a button.
Say you have 2 textboxes. TextBox1 for the quick URL to a big URL and TextBox2 is the big URL in question. The button is to save
i.e say I wanted to navigate to google using your webbrowser quickly,
I would first click the button on the main form "Create New Quick-URL"
Then on the form that pops up
add to textbox1: "Google"
add to textbox2: "http://www.google.com"
Then press save.
For the save button add this code.
[php]
SaveSetting("MyApp", URLs", TextBox1.Text, TextBox2.Text)
Form1.Show 'this is assuming you hid your main form when bringing up the save form'
Me.Close()
[/php]
Then for your "Navigate" button for the webbrowser (I'm going to call your address textbox (the one you use to type regular URLs into) txtAddress.
[php]
If GetSetting("MyApp", "URLs", txtAddress.text) <> "" then
WebBrowser1.Navigate((GetSetting("MyApp", "URLs", txtAddress.text))
Else
Try
WebBrowser1.Navigate(TxtAddress.Text)
Catch ex as Exception
End Try
End if
[/php]
Still dunno if that's what you want but that allows the user to create quick-URLs so when they type that word into the address bar it opens the assigned URL. You can make it more advanced/functional as you wish but that's the basics. Might need a bit of bug-proofing but hope you get the general idea.
