Nastadon 0 Newbie Poster

Alright, so I'm making a blackjack game, and I forgot how to make it randomly display a card. I know what it is in VB so I tried something like that, I also tried something else, but it didn't work either.

When the form loads I have this so it knows where to look...

private void Form1_Load(object sender, EventArgs e)
        {
            String AppPath = Path.GetDirectoryName(Application.ExecutablePath);

Then when I deal I use that apppath to call it, but guess that doesn't work in C#.

private void DelCard()
        {
	        PicBoxesDel(PicBoxNumber2).Image = Image.FromFile(AppPath + "\\Cards2\\" + Convert.ToString(Cards(CardIndex)) + ".tif");
	        TotalValue2 += CardValue(Cards(CardIndex));
	        Shuffle();
	        PicBoxNumber2 += 1;
        }

Also picboxes doesnt exist in the current context either, I have no idea what that means. Messing with them though til I figure it out!

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.