Web Browser Protocol
Do you need something made? then ask in here.
Forum rules
Please LOCK your topics once you have found the solution to your question so we know you no longer require help with your query.
Please LOCK your topics once you have found the solution to your question so we know you no longer require help with your query.
8 posts
Page 1 of 1
Erm, its been a longgg time since I've been here, so, what I wanted to do is to access my application from a url / webbrowser and accessing a function of it instead of just starting it.
Don't understand? Well, what I wanted to do is like when you type in Mbdn://<fileurlhere> it will open up my application with the <fileurlhere> then mbdn://about will open up the about page, is there any tutorials of doing so here?
Here's an exampleof what I'm talking about
Don't understand? Well, what I wanted to do is like when you type in Mbdn://<fileurlhere> it will open up my application with the <fileurlhere> then mbdn://about will open up the about page, is there any tutorials of doing so here?
Here's an exampleof what I'm talking about
Last edited by frozerlaxegon on Wed Dec 08, 2010 1:49 am, edited 1 time in total.
You've been RICKROLL'D
what you could do is...
WebBrowser1_DocumentCompleted
WebBrowser1_DocumentCompleted
Code: Select all
Maybe you could do that.if textbox1.text.contains("mbdn://about") then
webbrowser1Document = My.Resources.about
end if
Agust1337 wrote:what you could do is...1) its webbrowser1.document, not webbrowser1Document
WebBrowser1_DocumentCompletedCode: Select allMaybe you could do that.if textbox1.text.contains("mbdn://about") then webbrowser1Document = My.Resources.about end if
2) that wouldn't work, or it would but then it would display a "404" error, website not found and then redirected, so instead, have that code in your navigate/go button.
3) I don't think this is what he wants, he wants if you type in mbdn:// in any browser like FireFox, Google Chrome, etc. it would launch a application
We shall let the revolution begin.. the revolution for freedom, freedom against censorship. We shall fight in the fields and in the streets, we shall fight in the hills; we shall never surrender
CodexVideos wrote:http://www.youtube.comAgust1337 wrote:what you could do is...1) its webbrowser1.document, not webbrowser1Document
WebBrowser1_DocumentCompletedCode: Select allMaybe you could do that.if textbox1.text.contains("mbdn://about") then webbrowser1Document = My.Resources.about end if
2) that wouldn't work, or it would but then it would display a "404" error, website not found and then redirected, so instead, have that code in your navigate/go button.
3) I don't think this is what he wants, he wants if you type in mbdn:// in any browser like FireFox, Google Chrome, etc. it would launch a application
will launch a website with parameters "www.youtube.com" :P
so i think it would be something like this
mbdn://D:\Users\file.txt
will for example delete the file that way or something idk what he will do with it
or
search://lol+lol = lol
(thats what i think he wants
heres a quick sample i made
Code: Select all
when you type in "mbdn://lollo , the webbrowser will google "lollo" :P Dim str As String
If TextBox1.Text.StartsWith("mbdn://") Then
str = TextBox1.Text.Remove(0, 7)
TextBox2.Text = str
WebBrowser1.Navigate("http://www.google.com/#sclient=psy&hl=en&site=&source=hp&q=" + str + "&aq=f&aqi=g1g-sv2&aql=&oq=&gs_rfai=&pbx=1&fp=64e74bf06843dcb7")
End If
idk if your problem is solved now
If you want to add a new protocol extension you can use this:
Code: Select all
Then in your application you should process the arguments array to get the information. Dim rk As RegistryKey = Registry.ClassesRoot.CreateSubKey("mbdn")
rk.SetValue("URL Protocol", "")
rk = rk.CreateSubKey("shell").CreateSubKey("open").CreateSubKey("command")
rk.SetValue("", "C:\myApp.exe %1")
*FACE PALM* Apply directly to forehead.
NO, U GUYS NO UNDERSTAND(RAWR) - LOLOLOLOL
Mandai gets it but I not quite understand it, mind explaining?
As for the other replies, I'm NOT developing a web browser goddamnit, I'm developing a music player application, and the url MUST be universal(meaning that if I type mbdn://slay@all in Firefox, it will slay all the slaves! -LOLOLOL and If I type in mbdn://slay@all in Internet Explorer it will also slay all the slaves!)
Mandai, I think u get my idea but mind explaining?
TOPIC NOT LOCKED - *GOES FOR A NICE FACEPALMING*
NO, U GUYS NO UNDERSTAND(RAWR) - LOLOLOLOL
Mandai gets it but I not quite understand it, mind explaining?
As for the other replies, I'm NOT developing a web browser goddamnit, I'm developing a music player application, and the url MUST be universal(meaning that if I type mbdn://slay@all in Firefox, it will slay all the slaves! -LOLOLOL and If I type in mbdn://slay@all in Internet Explorer it will also slay all the slaves!)
Mandai, I think u get my idea but mind explaining?
TOPIC NOT LOCKED - *GOES FOR A NICE FACEPALMING*
You've been RICKROLL'D
Lol we get a lot of webbrowsers around here so its easy to get mixed up with that.
First you need to change the last line from C:\myApp.exe to the path/filename of your program that you want to be launched. Basically you add this code to an event so it will install the protocol handler in the registry.
Then in your program's Load event you can use this code to see what address was used e.g. mdbn://example:
First you need to change the last line from C:\myApp.exe to the path/filename of your program that you want to be launched. Basically you add this code to an event so it will install the protocol handler in the registry.
Then in your program's Load event you can use this code to see what address was used e.g. mdbn://example:
Code: Select all
I'm not sure what you want your app do when it gets the address but you could seperate the paramaters by splitting the string. Dim args As String() = Environment.GetCommandLineArgs()
Dim address As String = ""
For i As Integer = 1 To args.Length - 1
address += args(i) & " "
Next
MsgBox(address)
frozerlaxegon wrote:*FACE PALM* Apply directly to forehead.I understood,
NO, U GUYS NO UNDERSTAND(RAWR) - LOLOLOLOL
Mandai gets it but I not quite understand it, mind explaining?
As for the other replies, I'm NOT developing a web browser goddamnit, I'm developing a music player application, and the url MUST be universal(meaning that if I type mbdn://slay@all in Firefox, it will slay all the slaves! -LOLOLOL and If I type in mbdn://slay@all in Internet Explorer it will also slay all the slaves!)
Mandai, I think u get my idea but mind explaining?
TOPIC NOT LOCKED - *GOES FOR A NICE FACEPALMING*
3) I don't think this is what he wants, he wants if you type in mbdn:// in any browser like FireFox, Google Chrome, etc. it would launch a applicationWell, i think mandai's code works.
We shall let the revolution begin.. the revolution for freedom, freedom against censorship. We shall fight in the fields and in the streets, we shall fight in the hills; we shall never surrender
8 posts
Page 1 of 1
Copyright Information
Copyright © Codenstuff.com 2020 - 2023