PDA

View Full Version : C# programming help



JasonF
03-10-2008, 05:58 PM
I'm trying to make a program where I can play video and draw lines on the video and then have the video still playing with the line showing the whole time. I can use the media player to play the video and I can draw lines using a bitmap but I am unsure if I can combine the two and make the bitmap completly transparent apart from the line. Does anyone have any ideas what I could use to achieve this?

gary67
03-10-2008, 06:58 PM
I think you might need flash for this

pine-o-cleen
03-10-2008, 07:03 PM
Why not draw a bitmap that is only the size of the line?

somebody
03-10-2008, 07:26 PM
I'm trying to make a program where I can play video and draw lines on the video and then have the video still playing with the line showing the whole time. I can use the media player to play the video and I can draw lines using a bitmap but I am unsure if I can combine the two and make the bitmap completly transparent apart from the line. Does anyone have any ideas what I could use to achieve this?

Try:
Creating a "PictureBox" on the windows form. For this example, imagine it's called "pictureBox".

Declare a field:

Graphics paper;

The in the constructor:

paper = pictureBox.CreateGraphics();

Then you can use the DrawLine() method and similar on the "paper" object. I believe you can set it to be transparent, and have the pictureBox control overlaid on top of the media player.

mikebartnz
04-10-2008, 07:30 PM
I think you might need flash for this
If you don't know what you are talking about it is better to keep quiet.

nofam
05-10-2008, 09:25 AM
If you don't know what you are talking about it is better to keep quiet.

Equally, if you can't help answer the question in the thread, you should do likewise. . . .:annoyed:

gary67
05-10-2008, 09:43 AM
Equally, if you can't help answer the question in the thread, you should do likewise. . . .:annoyed:

Thanks, couldn't have put it better. My apologies for not getting the answer right in my first post

somebody
05-10-2008, 09:54 AM
JasonF: I sent you a Private Message a few days ago with some more code which might point you in the right direction. Please post back here to let us know how you got on.

mikebartnz
05-10-2008, 10:09 AM
Equally, if you can't help answer the question in the thread, you should do likewise. . . .:annoyed:
Actually somebody had already given a usefull answer which I didn't feel needed elaborating and he probably knows C# better than I do..
I also think you need to read again what you wrote.:(

JasonF
06-10-2008, 08:10 PM
I know c# reasonably well my question was really what would be the best way about going and creating the application. If I sat down and really thought about it for a while I'm sure I could come up with a good way of doing this, but I was interested in hearing other peoples ideas on how this could be done. I had actually forgotten about the picture box so thanks Somebody for your post. I haven't got around to starting this yet - hopefully this weekend if I get some free time.