INTERACT FORUM

Please login or register.

Login with username, password and session length
Advanced search  
Pages: [1]   Go Down

Author Topic: How to build an interface plugin in VB.NET  (Read 5979 times)

scott_r

  • Regular Member
  • Galactic Citizen
  • ****
  • Posts: 306
How to build an interface plugin in VB.NET
« 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

Hope this helps,

Scott.
Logged

KingSparta

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 20063
Re:How to build an interface plugin in VB.NET
« Reply #1 on: December 20, 2003, 05:19:58 am »

Thanks For The Text It Might Help

Got A Shell Hello World Project?




Logged
Retired Military, Airborne, Air Assault, And Flight Wings.
Model Trains, Internet, Ham Radio, Music
https://MyAAGrapevines.com
https://centercitybbs.com
Fayetteville, NC, USA

scott_r

  • Regular Member
  • Galactic Citizen
  • ****
  • Posts: 306
Re:How to build an interface plugin in VB.NET
« Reply #2 on: December 20, 2003, 06:29:11 am »

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
You still need to put info into the registry and build the project before running MC.

Scott.
Logged

KingSparta

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 20063
Re:How to build an interface plugin in VB.NET
« Reply #3 on: December 20, 2003, 10:16:56 am »

well maybe i will re-install VB .Net Now And Play With This A Bit.
Logged
Retired Military, Airborne, Air Assault, And Flight Wings.
Model Trains, Internet, Ham Radio, Music
https://MyAAGrapevines.com
https://centercitybbs.com
Fayetteville, NC, USA

scott_r

  • Regular Member
  • Galactic Citizen
  • ****
  • Posts: 306
Re:How to build an interface plugin in VB.NET
« Reply #4 on: December 26, 2003, 01:46:19 am »

Any progress, King?
Logged

KingSparta

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 20063
Re:How to build an interface plugin in VB.NET
« Reply #5 on: December 26, 2003, 05:41:37 am »

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.

Logged
Retired Military, Airborne, Air Assault, And Flight Wings.
Model Trains, Internet, Ham Radio, Music
https://MyAAGrapevines.com
https://centercitybbs.com
Fayetteville, NC, USA

KingSparta

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 20063
Re:How to build an interface plugin in VB.NET
« Reply #6 on: December 27, 2003, 08:36:48 am »

Any progress, King?

well with your sample i am not sure in VB .Net where i would find the

"[ProjectName].[ControlName]"

Logged
Retired Military, Airborne, Air Assault, And Flight Wings.
Model Trains, Internet, Ham Radio, Music
https://MyAAGrapevines.com
https://centercitybbs.com
Fayetteville, NC, USA

KingSparta

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 20063
Re:How to build an interface plugin in VB.NET
« Reply #7 on: December 27, 2003, 08:59:02 am »

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)

Quote
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.
Logged
Retired Military, Airborne, Air Assault, And Flight Wings.
Model Trains, Internet, Ham Radio, Music
https://MyAAGrapevines.com
https://centercitybbs.com
Fayetteville, NC, USA

KingSparta

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 20063
Re:How to build an interface plugin in VB.NET
« Reply #8 on: December 27, 2003, 09:21:33 am »

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
Logged
Retired Military, Airborne, Air Assault, And Flight Wings.
Model Trains, Internet, Ham Radio, Music
https://MyAAGrapevines.com
https://centercitybbs.com
Fayetteville, NC, USA

KingSparta

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 20063
Re:How to build an interface plugin in VB.NET
« Reply #9 on: December 27, 2003, 04:54:31 pm »

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?
Logged
Retired Military, Airborne, Air Assault, And Flight Wings.
Model Trains, Internet, Ham Radio, Music
https://MyAAGrapevines.com
https://centercitybbs.com
Fayetteville, NC, USA

scott_r

  • Regular Member
  • Galactic Citizen
  • ****
  • Posts: 306
Re:How to build an interface plugin in VB.NET
« Reply #10 on: December 27, 2003, 11:24:56 pm »

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
Logged

KingSparta

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 20063
Re:How to build an interface plugin in VB.NET
« Reply #11 on: December 30, 2003, 06:39:00 pm »

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.
Logged
Retired Military, Airborne, Air Assault, And Flight Wings.
Model Trains, Internet, Ham Radio, Music
https://MyAAGrapevines.com
https://centercitybbs.com
Fayetteville, NC, USA

scott_r

  • Regular Member
  • Galactic Citizen
  • ****
  • Posts: 306
Re:How to build an interface plugin in VB.NET
« Reply #12 on: December 31, 2003, 01:14:05 am »

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.
Logged

KingSparta

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 20063
Re:How to build an interface plugin in VB.NET
« Reply #13 on: January 02, 2004, 06:06:20 pm »

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
Logged
Retired Military, Airborne, Air Assault, And Flight Wings.
Model Trains, Internet, Ham Radio, Music
https://MyAAGrapevines.com
https://centercitybbs.com
Fayetteville, NC, USA

scott_r

  • Regular Member
  • Galactic Citizen
  • ****
  • Posts: 306
Re:How to build an interface plugin in VB.NET
« Reply #14 on: January 03, 2004, 12:44:03 am »

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.
Logged

KingSparta

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 20063
Re:How to build an interface plugin in VB.NET
« Reply #15 on: January 03, 2004, 02:27:25 pm »

Quote
- 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.
Logged
Retired Military, Airborne, Air Assault, And Flight Wings.
Model Trains, Internet, Ham Radio, Music
https://MyAAGrapevines.com
https://centercitybbs.com
Fayetteville, NC, USA

scott_r

  • Regular Member
  • Galactic Citizen
  • ****
  • Posts: 306
Re:How to build an interface plugin in VB.NET
« Reply #16 on: January 03, 2004, 05:14:39 pm »

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.
Logged

KingSparta

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 20063
Re:How to build an interface plugin in VB.NET
« Reply #17 on: January 03, 2004, 06:27:29 pm »

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

After I Press OK

HelloWorld 2

Logged
Retired Military, Airborne, Air Assault, And Flight Wings.
Model Trains, Internet, Ham Radio, Music
https://MyAAGrapevines.com
https://centercitybbs.com
Fayetteville, NC, USA

scott_r

  • Regular Member
  • Galactic Citizen
  • ****
  • Posts: 306
Re:How to build an interface plugin in VB.NET
« Reply #18 on: January 03, 2004, 08:00:37 pm »

OK, you've either not installed the wizards or your edition didn't come with them.
I'll get back to you shortly.

Scott.
Logged

KingSparta

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 20063
Re:How to build an interface plugin in VB.NET
« Reply #19 on: January 03, 2004, 08:38:16 pm »

Quote
OK, you've either not installed the wizards or your edition didn't come with them.

Wonderfull
Logged
Retired Military, Airborne, Air Assault, And Flight Wings.
Model Trains, Internet, Ham Radio, Music
https://MyAAGrapevines.com
https://centercitybbs.com
Fayetteville, NC, USA
Pages: [1]   Go Up