Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / .NET Framework / Interop / October 2004

Tip: Looking for answers? Try searching our database.

Interop Problem: Windows Media Player Object in C# Error

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
MarkEMark - 02 Jul 2004 12:26 GMT
Hi Everyone,

Sorry about the duel post, my pop up blocker was not letting me put questions up but let me do comments.... I stopped my pop up blocker !!!!

I was wondering if anyone can help me....

I have multiple Windows Media Player Objects on a Windows
form that I control at run-time by commands pulled via
HTTP in a loop.

My Problem is that when I try to move a stream at run-
time I get the error at the bottom of the posting. Just
below is a code snippet. Basically I have a Stream object
that I created which has a reference to a Window Media
Player object (that i dragged onto the form using
VS.NET). The Stream Object has all the settings like the
X and y locations.... and so on...

Whenever a HTTP messages is received that tells this code
to run Line 3 throws the below exception.
However if I manually make the code run by hiding the
Window Form and Showing it again, the code runs fine.

I have a feeling it has something to do with Threading
because I have set the code that does the messaging to
STA thread... but my knowledge in how it the COM interop
works is quite limited.

If anyone can give me some help it would be MUCH
appreciated!

Regards,

Mark

<CODESNIPPET>
1  stream.stream_media_player.Ctlcontrols.stop();
2  stream.stream_media_player.Visible=false;
3  stream.stream_media_player.Left=stream.x;
4  stream.stream_media_player.Top=stream.y;
5  stream.stream_media_player.Width=stream.w;
6  stream.stream_media_player.Height=stream.h;
7  stream.stream_media_player.Visible=true;
8  stream.stream_media_player.URL = settingValue;
9  stream.stream_media_player.settings.volume =
stream.volume;

<\CODESNIPPET>

An outgoing call cannot be made since the application is
dispatching an input-synchronous call.  at
System.Windows.Forms.IOleInPlaceObject.SetObjectRects
(COMRECT lprcPosRect, COMRECT lprcClipRect)
 at System.Windows.Forms.AxHost.SetObjectRects(Rectangle
bounds)
 at System.Windows.Forms.AxHost.SetBoundsCore(Int32 x,
Int32 y, Int32 width, Int32 height, BoundsSpecified
specified)
 at System.Windows.Forms.Control.SetBounds(Int32 x,
Int32 y, Int32 width, Int32 height, BoundsSpecified
specified)
 at System.Windows.Forms.Control.set_Left(Int32 value)
DotNetJunkies User - 15 Oct 2004 01:20 GMT
Hey Mark,
                 Could you post the code you used to correct this problem. also you know why this would happen ..

thanks in advance

Thajeer

---

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.