Page 1 of 1

Getting my VFD to work with WMC

Posted: Sun Nov 15, 2020 3:10 am
by GnatGoSplat
Long, long ago, I wrote some VB.NET 2005 code to get a proprietary VFD working with WMC. It hasn't worked for quite some time. I would like to get it to work again, but I don't know if it's possible. I'm really rusty on my VB.NET.
When I try to compile it with VS Community 2019, it refuses to, with error starting with:
Severity Code Description Project File Line Suppression State
Error BC30002 Type 'MediaState' is not defined. Zapstation D:\Users\MediaCenter\Documents\Visual Studio 2019\Projects\Zapstation\Zapstation\ZapMCESink.vb 5 Active

I tried adding a reference to an old MediaState.dll that was in one of the folders, but no go. Anyone have any idea what might be going on here?
Please see attached image, that probably explains what I'm trying to do a lot better than words can.

Re: Getting my VFD to work with WMC

Posted: Mon Nov 16, 2020 3:06 pm
by jachin99
Wild guess here but the very top import statement says Imports Microsoft.MediaCenter. Maybe try Import Microsoft.MediaCenter. Have you tried compiling it with an older version of visual studio? I think 2008 was the last year to really integrate media center.

Re: Getting my VFD to work with WMC

Posted: Sat Nov 21, 2020 5:50 pm
by GnatGoSplat
Thanks for the reply. I tried changing Imports to Import, IntelliSense flags it as an error and recommends I change it back to Imports. I think in VB, it's supposed to be "Imports".
I don't have an older version of VS.NET to try. I was thinking the current version should be backwards compatible, but maybe that's not the case?

UPDATE: Adding "Imports Microsoft.MediaCenter.Samples.MediaState" fixed it. Had to comment out the PlayState event handler, but it wasn't being used anyway.

VFD still doesn't work. My code to control it works, but it doesn't pick up anything from Microsoft.MediaCenter. I found an original .exe file that was compiled with VS.NET 2005 a long time ago, VFD doesn't work with it either. Looks like Microsoft.MediaCenter.dll is no longer picking up MediaCenter events from WMC on Win10. No idea why. I do have a 3rd party VFD on another HTPC that does work. Maybe I need to see if it's open source.

Converted my old code to C# while I was at it, since its syntax is a lot more similar to what I use at work. Doesn't work any different under C# though.