Hack Forums
[C#] Followed This Simple Tut to Make a Media Player and it Never Worked (Basically C&P) - Printable Version

+- Hack Forums (https://hackforums.net)
+-- Forum: Tech (https://hackforums.net/forumdisplay.php?fid=444)
+--- Forum: Coding (https://hackforums.net/forumdisplay.php?fid=151)
+---- Forum: Software Development (https://hackforums.net/forumdisplay.php?fid=118)
+---- Thread: [C#] Followed This Simple Tut to Make a Media Player and it Never Worked (Basically C&P) (/showthread.php?tid=5365521)



Followed This Simple Tut to Make a Media Player and it Never Worked (Basically C&P) - Effexion - Aug 6, 2016

Here's the tutorial:

http://www.dotnetheaven.com/article/how-to-create-a-media-player-in-csharp

I am needing a media player I can fully customize and came across this. I am learning C# (not even finished calculator yet) so thought it would be interesting to see the code.

The guide tells me to basicaly drop the elephant in to the form and then add the provided code. I am assuming it isn't working because of th names of the buttons, but renaming them doesn't help either.

Any advice?


* - GuRuHaX - Aug 6, 2016

(Aug 6, 2016 09:03 AM)Effexion Wrote:  Here's the tutorial:

http://www.dotnetheaven.com/article/how-to-create-a-media-player-in-csharp

I am needing a media player I can fully customize and came across this. I am learning C# (not even finished calculator yet) so thought it would be interesting to see the code.

The guide tells me to basicaly drop the elephant in to the form and then add the provided code. I am assuming it isn't working because of th names of the buttons, but renaming them doesn't help either.

Any advice?

What errors are you getting ,provide more about that please ?

Also to be sure and exclude everything , you know this is a WPF app right (in the example) ?So don't try to add it in a winform , if you do , you would want to change the 'RoutedEventArgs' to 'EventArgs' .

🤝


* - Effexion - Aug 6, 2016

Here's the errors I am getting: http://prntscr.com/c2e14h . I clicked WPF in create new project.


* - Nikola Тesla - Aug 6, 2016

I will suggest to learn basics first.

But Here are some videos that may help you:
https://www.youtube.com/watch?v=K7l1OGHNfeE
https://www.youtube.com/watch?v=q2a2sEV3bX0


* - Oliver Sykes - Aug 6, 2016

I'd suggest that you not jump into something you have no idea about. It's like not knowing how to swim and jumping into the middle of the ocean...or not knowing how to drive and jumping into the cockpit of a stealth bomber; just don't.

Also, this tutorial utilizes a wpf control, so you'd need to be using a wpf project.


* - Effexion - Aug 6, 2016

I think you guys have me misunderstood. I realize this is WAY beyond my level, but I need a media player I can customize. I searched for a source and found this.


* - GuRuHaX - Aug 6, 2016

(Aug 6, 2016 09:38 AM)Effexion Wrote:  Here's the errors I am getting: http://prntscr.com/c2e14h . I clicked WPF in create new project.

I would suggest what Nikola Tesla says ,

i have created a WPF project , works just fine:

https://imgur.com/a/9yiPk

Your issue is with the namespace (as the errors clearly saying) as well as the mediaElement name .

Anyway , you can have the example :

http://www10.zippyshare.com/v/5VyL3Z3C/file.html

🤝


* - Effexion - Aug 6, 2016

(Aug 6, 2016 09:41 AM)Oliver Sykes Wrote:  Also, this tutorial utilizes a wpf control, so you'd need to be using a wpf project.

I am.


* - Oliver Sykes - Aug 6, 2016

Your tutorial doesn't have closing braces for the class or namespace. I'd suggest that if you want to c&p, start with the class and add a closing brace inside the generated namespace.


* - jujuger - Aug 6, 2016

Can you show us a picture of your current code?

It looks like you don't even have the namespace, class, or anything right.

Media player isn't beyond your level, you are not even at the level of C#

I suggest learning extreme basics before jumping in.

I could tutor you, if you want for free?