Search Results

Search found 3 results on 1 pages for 'user350632'.

Page 1/1 | 1 

  • VLC player event catch

    - by user350632
    In my C# application i need to trigger some events when a VLC player (preferably) starts playback (a play button is pressed in VLC for example).Tried Windows Media Player classic with Microsoft Spy++ and observed messages that are sent when playback starts\repeats but i don't know how i could "catch" those messages in my C# code.So my question: is there any way to hook up to event in VLC (or WMP) and get notified about playback status (play, stop, start of repeat). My goal is to create a C# function that waits for start of playback event in player and then triggers some actions in my application (this should also happen when playback ends and starts repeating). What approach should i take here? Just to clearify: I don't want to embedded a new instance of VLC in my app, but instead control/read the "real" full version of VLC, started seperatly by the user

    Read the article

  • OpenGL circle rotation

    - by user350632
    I'm using following code to draw my circles: double theta = 2 * 3.1415926 / num_segments; double c = Math.Cos(theta);//precalculate the sine and cosine double s = Math.Sin(theta); double t; double x = r;//we start at angle = 0 double y = 0; GL.glBegin(GL.GL_LINE_LOOP); for(int ii = 0; ii < num_segments; ii++) { float first = (float)(x * scaleX + cx) / xyFactor; float second = (float)(y * scaleY + cy) / xyFactor; GL.glVertex2f(first, second); // output Vertex //apply the rotation matrix t = x; x = c * x - s * y; y = s * t + c * y; } GL.glEnd(); The problem is that when scaleX is different from scaleY then circles are transformed in the right way except for the rotation. In my code sequence looks like this: circle.Scale(tmp_p.scaleX, tmp_p.scaleY); circle.Rotate(tmp_p.rotateAngle); My question is what other calculations should i perform for circle to rotate properly when scaleX and scaleY are not equal?

    Read the article

  • Trapping messages in .NET

    - by user350632
    How can i trap a Windows system message (like WM_SETTEXT) that was sent by some window (VLC player window in my case)? I've tried to inherit NativeWindow class and override WndProc like this: class VLCFilter : NativeWindow { System.IntPtr iHandle; const int WM_SETTEXT = 0x000C; public VLCFilter() { Process p = Process.GetProcessesByName("vlc")[0]; iHandle = p.MainWindowHandle; } protected override void WndProc(ref Message aMessage) { base.WndProc(ref aMessage); if (aMessage.HWnd != iHandle) return false; if (aMessage.Msg == WM_SETTEXT) { MessageBox.Show("VLC window text changed!"); } } } I have checked with Microsoft Spy++ that WM_SETTEXT message is sent by VLC player but my code doesn't seem to get the work done. I've refered mainly to: http://www.codeproject.com/kb/dotnet/devicevolumemonitor.aspx I'm trying to make this work for some time with no success. What am I doing wrong? What I am not doing? Maybe there is easier way to do this? My initial goal is to catch when VLC player (that could be playing somewhere in the background and is not emmbed in my application) repeats its playback (have noticed that WM_SETTEXT message is sent then and I'm trying to find it out like this).

    Read the article

1