Webbrowser Toolbars
If you need help with a project or need to know how to do something specific in VB.NET then please ask your questions 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.
5 posts
Page 1 of 1
ok so how to i add a toolstrip from a dll when it is running, like ie (internet explorer) or ff (firefox)
so lets say i have created the dll and then when my webbrowser is running i press browse for toolbars and i choose the dll i just made
so whats the code for browse and add; thats marked in Bold
hope u understand
so lets say i have created the dll and then when my webbrowser is running i press browse for toolbars and i choose the dll i just made
so whats the code for browse and add; thats marked in Bold
hope u understand

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
ask codenstuff since he made the CnS browser with the addon feature which you could adapt
Nailing my feet to the floor is easier than using my own muscles to balance, but you don't see me doing that 

I know I did a post about running applications directly from embedded resources a while back but it seems to have disappeared.
Anyway you could use it in the same way to run a selected function from a .Net dll/exe:
Note: this example would try to execute the Class1.test function with no parameters, from the file test.dll:
Anyway you could use it in the same way to run a selected function from a .Net dll/exe:
Note: this example would try to execute the Class1.test function with no parameters, from the file test.dll:
Code: Select all
Private Sub btnRun_Click(sender As System.Object, e As System.EventArgs) Handles btnRun.Click
Dim classAssembly As Assembly = Assembly.LoadFrom("test.dll")
For Each t As Type In classAssembly.GetTypes()
If t.IsClass Then
If t.FullName = "Class1" Then
Dim instance As Object = Activator.CreateInstance(t)
Dim args As Object() = {} ' if your function takes parameters, put them in here
Dim result As Object = t.InvokeMember("test", BindingFlags.InvokeMethod, Type.DefaultBinder, instance, args)
Exit For
End If
End If
Next
End Sub
Last edited by mandai on Thu May 10, 2012 1:33 am, edited 5 times in total.
mandai can you help me step by step cause i dont get it?
i know i didnt say that in the first post, sorry
thanks
i know i didnt say that in the first post, sorry
thanks
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
Ok step by step it would go like this:
1. Make the DLL library containing the public function. The function should return some useful objects such as a toolstrip control
2. Paste the above code into a function of your main project
3. Change the strings in the code to match what you want to run from your dll file (you would want to use the data that the function returns).
1. Make the DLL library containing the public function. The function should return some useful objects such as a toolstrip control
2. Paste the above code into a function of your main project
3. Change the strings in the code to match what you want to run from your dll file (you would want to use the data that the function returns).
5 posts
Page 1 of 1
Copyright Information
Copyright © Codenstuff.com 2020 - 2023