INTERACT FORUM
Windows => Plug-in Development => Topic started by: scott_r on December 20, 2003, 12:38:55 am
-
I was asked by KingSparta to provide a shell project in Visual Basic.NET for people to use to make interface plugins, but I figured that just providing a shell doesn't show people exactly what's happening, so I wrote an article on how to build an interface plugin in Visual Basic.NET
Please read it thoroughly, and ensure you follow all the steps.
You can view it here:
Step by Step Interface Plugins in VB.NET (http://homepages.paradise.net.nz/~scottray/MC/interface.html)
Hope this helps,
Scott.
-
Thanks For The Text It Might Help
Got A Shell Hello World Project?
-
Providing a shell project wont really help much, you still will need to add info to the registry and build the project under VB.NET, making sure it's set up to register itself. You also may have Media Center installed in a non-default location, so building from a shell will fail. This way you get to know exactly what's happening and why. Having said that, here's a shell that in all likelyhood won't compile :)
http://homepages.paradise.net.nz/~scottray/MC/HelloMC.zip (http://homepages.paradise.net.nz/~scottray/MC/HelloMC.zip)
You still need to put info into the registry and build the project before running MC.
Scott.
-
well maybe i will re-install VB .Net Now And Play With This A Bit.
-
Any progress, King?
-
This weekend I think I will try it.
I was working one my OTR collection the past 2 months then was looking in to TRM ID's for mp3's past 3 days or so.
-
Any progress, King?
well with your sample i am not sure in VB .Net where i would find the
"[ProjectName].[ControlName]"
-
well with your sample i am not sure in VB .Net where i would find the
"[ProjectName].[ControlName]"
edit, i think i figured that out.
I Created a Registry.reg file (Easyer to regiser the control in the future of needed)
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\Software\JRiver\Media Jukebox\Plugins\Interface\MC Hello]
"IVersion"=dword:00000001
"Company"="SpartaSoft, Inc."
"Version"="0.0.01"
"URL"="http://www.spartasoft.com"
"Copyright"="Copyright (c) 2003, SpartaSoft, Inc."
"PluginMode"=dword:00000000
"ProdID"="HelloMC.HelloMCctl"
it seems to work fine, so the sample helped. and the only thing needed was to include the registry.reg file.
maybe we can get J river to include your Doc file for VB .Net in there programers section (with any changes you can think of) along with aybe a more complex sample using some options of the MC SDK.
this would help.
I want to tank you for the time you put into this.
=================================================
Now the next question:
How would you deploy the "MC Hello World" Project and what files would be needed in the project.
-
By the way what version of VB Net do you have?
the reason I asked is the project required me to upgrade the project it to VB .Net Version 2003 Code.
VB Net 7.1.3088
-
Under Folder BIN
HelloMC.dll
HelloMC.pdb
HelloMC.tlb
Interop.MediaJukebox.dll
I take it they are the files that need to be included in the package?
Any Ideas Using J Rivers Package Instructions (Can It Even Be Done)?
How Do You Create A Package File\Install Program?
-
Only files needed are the Interop.MediaJukebox.DLL and the HelloMC.dll.
There's a setup wizard that will do it for you in Visual Studio. When I get some free time I'll step you through it.
Scott.
ps. I'm using Visual Studio 2002
-
your talking about using the built in deployment method
in visual basic 6 this was a problem since the registry.reg file that you can use to register the OCX would not allow this file to be included in the install.
how would "The User" download the project and then allow the project to be registered?
or does VB Net know the registry and include that in the deployment build?
something i am missing?
==============================================
I did create a VB Net Plug-In, moving data from fields and the like
===================================================
on another note
i did go down to barns and noble and spent $300 on VB .Net books so i can read when i am doing nothing.
-
The built-in deployment wizard actually has a section for adding keys to the registry, so you don't need to include and run a registry.reg file - the setup can add all the keys you need if you tell it to.
Also note that the output will not be an ocx but a dll, and that you can set the dll to self-register for com interops via the setup wizard as well.
To get into the registry editor in visual studio, just click on your setup project in the solution explorer and you will notice the toolbar just above it changes. click on the icon that looks like a little registry icon and you can add keys from there.
hope it helps,
scott.
-
Nice Try
But I am not sure what i am looking for and did not see anything and what i did see i clicked on and seen nothing that had anything to do with registry or keys
-
Sorry, I forgot to tell you how to create a setup project.
- Open up your "solution" in Visual Studio.
- Right-click on the root node in the Solution Explorer titled "Solution 'yourprojectname' (1 project)"
- Go to Add->New Project
-Select "Setup and Deployment Projects" and "Setup Wizard". As usual give it a name and folder to be created in (usually your solution's root folder).
- Start the wizard and skip the intro screen. Select "Create a setup for a Windows Application". Hit next.
- Check the item called "Primary output from [yourprojectname]". Hit next.
- Add any other files that are needed in the install, like config files, etc. Note, you don't need to tell it to include dependencies like mediajukebox.tlb or a .reg file. Hit next, then finish.
- The installer wizard will detect that your project is dependent on a couple of things like the Interop.MediaJukebox.dll file and include these.
- Alter properties such as your company name, default path, etc, in the properties window.
- IMPORTANT: Click on the entry called "Primary Output from [yourprojectname]. In the properties window, look for the property called "Register". Ensure this is set to 'vsdrpCOM'. This will register your project's dll for COM. (like running regsvr32 on your old VB6 OCX).
- Now, with the setup project selected in Solution Explorer, you'll see the toolbar for Solution Explorer has a lot more icons than usual. Click the one that looks like a little registry icon (2nd from the left on my machine).
- This pops up a window that has a "blank" registry hive for you to add keys to. This is where you add all the keys that are usually in your registry.reg file. When the user runs the setup, these keys will be added to their registry.
- Play around with the other toolbar icons and you'll soon see what they do.
Now, build the project (it will automatically re-build your plugin project if it's necessary) and you'll get a setup project that you can redistribute in the "release" or "debug" folder under the setup project folder (depending on what configuration you built under..
Remeber you're using Visual Studio 2003 and I'm using 2002, so there may be a few differences, but probably not many.
Good luck,
Scott.
-
- Start the wizard and skip the intro screen. Select "Create a setup for a Windows Application". Hit next.
and how would i do this?
I see nothing that states "Wizard"
looking thru the rest of your text i did not see any of that stuff even after looking around for 30 mins.
========================================
I was wondering if you took your hello world project and did all this to it to include registry entries could it then be ziped up and downloaded?
i am not sure if it is the difrence in VB .Net versions or i am missing some steps from your sample.
-
Start the wizard by going Add->New Project, clicking on the "Setup and Deployment Projects" and then "Setup Wizard" Click OK and the wizard will start.
I'm using Visual Studio .NET 2002 Enterprise Architect edition. Maybe the edition you're running doesn't come with the Setup and Deployment Projects.
Scott.
-
I did do that but i did not seen any Intro Screens.
It Does Not Say Anything About "wizard"
Here Are Some Pictures For My Hello World Project And VB .Net 2003
HelloWorld 1 (http://www2.spartasoft.com:8080/images/HelloWorld1.jpg)
After I Press OK
HelloWorld 2 (http://www2.spartasoft.com:8080/images/HelloWorld2.jpg)
-
OK, you've either not installed the wizards or your edition didn't come with them.
I'll get back to you shortly.
Scott.
-
OK, you've either not installed the wizards or your edition didn't come with them.
Wonderfull