C# Tutorial - Make a Picture Matching Game with .Net and Windows Form in Visual Studio

Поделиться
HTML-код
  • Опубликовано: 12 сен 2024

Комментарии • 51

  • @tayaro2453
    @tayaro2453 2 года назад +4

    Nice explanation!! Love your videos !!! You help me out a lot.

    • @mooict
      @mooict  2 года назад

      Thank you.

  • @chicongvu649
    @chicongvu649 2 года назад +1

    Thanks !! This is really helpful

    • @mooict
      @mooict  2 года назад

      You're welcome ☺️

  • @sbumduak4737
    @sbumduak4737 11 дней назад

    Please help me the pictures are not randomising

  • @dipeshpatil4968
    @dipeshpatil4968 2 года назад +2

    But if I match all my pictures before time up after that still time is running in game
    Something is wrong
    Please tell me

    • @mooict
      @mooict  2 года назад

      Inside of the check pictures function the last if statement will check if all of the picture boxes tag has been reset and then it will run the game over function. Check if yours is doing the same. In the tutorial it's line 177.

    • @jks4137
      @jks4137 2 года назад +1

      I'm getting the same thing. Is there any solution on how to.solve it.

    • @adityapratapsingh2373
      @adityapratapsingh2373 2 года назад

      @@mooict Still I'm getting the same

    • @adityapratapsingh2373
      @adityapratapsingh2373 Год назад

      @@jks4137 Did you solve it?? please tell me

    • @adityapratapsingh2373
      @adityapratapsingh2373 Год назад

      Can please tell me how did u solve this problem... Please it would be really big help.

  • @moonlightsday
    @moonlightsday Год назад +1

    thanks for the tutorial! i’m following your channel for quite awhile now & i’m learning so much. i‘m trying to implement more levels of this game (easy, medium, hard) i copied the exact codes from your src code for the medium & hard levels but some of the pictures are not appearing whenever i click the cards. please help!! really appreciate it ! ❤

    • @mooict
      @mooict  Год назад +1

      Hi, Im glad you're enjoying my videos. As long as the pictures are liked to the picture box and the folder structure is the same, it should load the images from the folder. picA.Image = Image.FromFile("pics/" + (string)picA.Tag + ".png"); If you look at this line here, its simply using the folder name "pics" to load the images from inside of it. So for your levels if you have given it a different directory make sure the folder is in the same directory as the exe file in the debug folder. Hope this helps.

    • @moonlightsday
      @moonlightsday Год назад

      @@mooict oh this is the video i’m talking about wherein i used the src codes you provided: ruclips.net/video/1Vh_buDuyAo/видео.html (i supposed to post my comment there, sorry for that!) i’m wondering why some of the pictures won’t appear in the other levels once clicked.
      thank u so much for replying!!

    • @kalyanikoli2525
      @kalyanikoli2525 Год назад

      @@moonlightsday can you help me with this code...m also doing the same game project...m also adding levels in it..

  • @icanghana6477
    @icanghana6477 2 года назад +1

    Thank you very much MOOICT @mooict #mooict your videos are really helping to understand c# and windows forms.

  • @Kifka-a
    @Kifka-a 2 года назад

    Hey do you have any idea of how to move a picturebox in a circle by itself? in c# i dont really find stuff on the web

  • @user-pv1rv9fw2o
    @user-pv1rv9fw2o Год назад

    I have to do this but with buttons? Is that possible?

  • @knh6432
    @knh6432 Год назад

    thank you! but one thing that u didn t tell in video,what the libraries you use there?What do they do?

    • @mooict
      @mooict  Год назад

      There are no external libraries for used in this tutorial. We are using all C# in .Net Win Forms

    • @knh6432
      @knh6432 Год назад

      @@mooict that meens that if i delete them,code will work without libraries?Couse i cleared them and code works

  • @rafaelrodriguez5577
    @rafaelrodriguez5577 Год назад

    I have the System.IO.FileNotFoundException problem, I don't know if it has to do with the fact that I use VS 2012, but in the same way, I follow the steps perfectly

    • @mooict
      @mooict  Год назад

      Hi, this error is happening because the program cannot find the files from the code. Can you check if you added the files same as the tutorial.

  • @SLEEPYTIMENOW
    @SLEEPYTIMENOW Год назад +2

    having a nullability problem with NewPic_Click

  • @Dorniotos
    @Dorniotos 11 месяцев назад

    it says it does not find my png file even tho I am sure it is correct.pls help

  • @karacasiirleri2921
    @karacasiirleri2921 2 года назад

    hello teacher, I have a project the subject of my project is a game of finding geometric shapes and magic shapes, that is, combining shapes and creating a new shape game, I need to do this on the c# console, can you help me i really need it very much thank you

  • @emilyurpeth6127
    @emilyurpeth6127 Год назад

    My lblStatus.Text = “Mismatched: “ + tries + “ times.”;
    Line is saying exception thrown, object reference is not set to an instance of an object, lblStatus was null.
    Please help!

    • @mooict
      @mooict  Год назад

      Check in the properties of the lblStatus is name of the label.

    • @emilyurpeth6127
      @emilyurpeth6127 Год назад

      @@mooict will do! Is there a way to change the grid so it is 6x6 or is it set as it is? Thanks for your help! Great video 😊

    • @mooict
      @mooict  Год назад

      Hi, glad you liked the video. Rows and Columns are being placed in the load pictures functions. Inside of the for loop change the numbers around for example I have 12 boxes so I am looping it 12 times, if you want more you can increase that number to 36. Also look at the ROWs thats being set in the function. That can be increased to 6 if you need 6x6 in the game. Hope this helps.

  • @darahughes354
    @darahughes354 Год назад

    When I try to click one of the boxes I get an error message saying System.IO.FileNotFoundException. I’ve transferred my file into the solution explorer and it isn’t working. Please help

    • @mooict
      @mooict  Год назад

      Place the pictures to bin - debug - net5 windows folder. The folder is called “pics”.

    • @darahughes354
      @darahughes354 Год назад

      @@mooict I tried that but it still says file not found. My file is called pics and each image in the file is called 1.png 2.png etc and it doesn’t work

    • @mooict
      @mooict  Год назад

      @Dara Hughes are the files placed in the same directory as the EXE file? The line that gets the pictures from the folder is this one - picA.Image = Image.FromFile("pics/" + (string)picA.Tag + ".png"); you can see that the pics folder needs to be in the same directory as the exe file.

  • @M1k_d0
    @M1k_d0 Год назад

    I'm not sure if you're able to respond but I've done step by step (From what I believe, I will do it 3 times over once I'm done this comment) but when I click, it does not hide again and the scores does not display

    • @mooict
      @mooict  Год назад +3

      Hi, it’s hard to say without seeing your source code but here’s the GitHub repo for the project github.com/mooict/C-Picture-Matching-game-Tutorial-on-Net-5 see if yours is the same or download and run this project from there. Hope it helps.

    • @M1k_d0
      @M1k_d0 Год назад

      @@mooict Heya, thanks for the response, I tried clicking the github link and log in but unfortunately, it's labeled as "Page not found"

    • @M1k_d0
      @M1k_d0 Год назад

      @@mooict on a side note, the whole code works now as I was able to clarify the error but what doesn't work is the part where I got it all finished but the message doesn't show.

    • @mooict
      @mooict  Год назад

      @@M1k_d0 Hi, sorry about that, the link is now fixed, you should be able to access the project files there.

  • @ryyhem3023
    @ryyhem3023 2 года назад

    i found that the pictuers didn't shown on the game where is the problem ?

    • @mooict
      @mooict  2 года назад +2

      Hi, the pictures are being loaded from an external folder. Can you check if downloaded and extracted them to the pics folder inside of the debug directory as shown in the tutorial.

    • @ryyhem3023
      @ryyhem3023 2 года назад +1

      @@mooict Thank you

  • @merivardanyan5274
    @merivardanyan5274 Год назад

    Numbers.RandomList doesn't work((

    • @mooict
      @mooict  Год назад +1

      I didn’t use a numbers variable for this tutorial. Could you check the source code on the link below the video.

    • @merivardanyan5274
      @merivardanyan5274 Год назад

      I have solved it, thank you
      Now i have another issue,when I win, the time still goes down to 0 and shows that I lost

  • @stayrawan488
    @stayrawan488 2 года назад

    The timer goes so fast why?!!

    • @mooict
      @mooict  2 года назад

      Check the interval in the timer properties. It should be set to 1000

  • @dipeshpatil4968
    @dipeshpatil4968 2 года назад

    I copy ur source code