Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Another programming issue (head-banging-against-wall time)
Another programming issue (head-banging-against-wall time)
#1
Once again, I've got a problem with the app I'm developing.  If anyone can help me figure out what I'm doing wrong here I'd be very grateful.

First, some background.  I'm writing this in VB.NET, using Visual Studio 2010 Ultimate. The program creates a number of forms dynamically from information in a database table, laying out a few controls on each of the forms, and then presents them to the user as needed in response to user interactions with the program.

One of the types of controls I added to the forms a few weeks ago was the Windows Media Player, so we can have running video on any/all of the screens.  At the time I added it, I was rushed for time and the COM+wrapper implementation of the WMP as a component was a bit on the opaque side when it came to creating instances of the player programmatically, so I cheated and dropped a player on the form that served as my base class, made it hidden and inactive, and only activated it when I needed a player on a descendant.  Yeah, I know, inefficient and uses up memory even on the forms without video.  I know.  I intended to do it right later.

Well, this morning I finally got around to doing it right, mainly by figuring out what the hell I needed to do to retrieve the right OcxState for the player so my creation routine didn't crash out with a mystery message.  Except...

Although the media player is there, it's got the video it's supposed to show loaded, the little play-position control thingy is progressing left-to-right on the control bar, and everything else claims to be hunky-dory -- nothing appears in the control.  If I use the WMP context menu to zoom to full screen, I can see the video, but anytime I want to see it on the form, no dice.  Now this was behaving properly when I was working with an instance put on the form at design time, so I'm pretty sure it's something inobvious I'm not setting properly at object creation.  

I'm hoping someone here has a clue they can share with me...  Thanks.
-- Bob
---------
Then the horns kicked in...
...and my shoes began to squeak.
Reply
 
#2
No solution yet, but no pressure to solve it now. I reverted to the player-on-the-base-class implementation to handle the deadline I had this week. It works, it fits in the memory space I have, and it works. I'll revert the reversion next week and try to make it function properly then.

In the mean time, if someone could clue me in why form transparency works just fine on my Win 7 development system, but not the XP-based implementation machine unless I drop its color depth from 32 bits to 16, I'd be very grateful.
-- Bob
---------
Then the horns kicked in...
...and my shoes began to squeak.
Reply
 
#3
I'm not sure if the WMP issue and the transparency issue you mention are the same issue, but, in case they're different:

Transparency on Win7 got all sorts of mucked up with the Aero theme.  What we found (C#, not VB.NET, but they should function identically, I'd think) is that the TransparencyKey property of the form needs to be set to Color.Gray (which of course affects all 'should be transparent' things, so it may involve a fair bit of work -- for some reason I remember us using Green, I think.  Blegh.).

I'm working from memory here, so IIRC and all that. Smile

--sofaspud
--"Listening to your kid is the audio equivalent of a Salvador Dali painting, Spud." --OpMegs
Reply
 
#4
Thanks, Spud. That seems to tie in to some other stuff I've read on the problem as well as my experiences. Well, for the moment (and the trade show) I have a workaround. I can use this to try to track down a real fix later.
-- Bob
---------
Then the horns kicked in...
...and my shoes began to squeak.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)