473,406 Members | 2,439 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 software developers and data experts.

Adding and Removing Images

First of all, thanks to Crirus and Fergus for helping me with a related
posted a few days ago.

Ok, I can add images to my form (for whatever reason I cannot added more
than 1 image within the same procedure; rather I had to call the same
"addimage" procedure over and over again to get it working).

For anyone that's curious the code I used is the following:
----------------------------------------------------------------------------
-----------------
Sub dealcards(ByVal value As String, ByVal locX As Integer, ByVal locY As
Integer)

Dim myCard As New PictureBox()

Me.Controls.Add(myCard)

With myCard

myCard = New System.Windows.Forms.PictureBox()

.Visible = True

.Name = CStr(intCardsDealt)

intCardsDealt += 1

.Size = New System.Drawing.Size(70, 90)

.TabStop = False

.Location = New System.Drawing.Point(locX, locY)

.Image = Image.FromFile("c:\blackjack\" & value & ".jpg")

.BringToFront()

.Show()

End With

End Sub

----------------------------------------------------------------------------
----------------------------------------------------------------------

And if you're wondering, yes, I'm creating a blackjack game. (I'm trying to
improve my memory so that I can count cards. If anyone's interested in the
finished product, would be more than happy to share....so long as you don't
expect to win every time!!!)
Anyways, I've tried to surf around for my next problem: how to remove those
images I've added dynamically.

I tried:
Me.Controls.RemoveAt(mintCount) where mintCount is an integer count of the
control's index value.

I've even named the new picture box controls with the cstr(mintCount) value.

Thanks!


Nov 20 '05 #1
11 1465
* "Andy Chan" <an***********@telus.net> scripsit:
For anyone that's curious the code I used is the following:
----------------------------------------------------------------------------
-----------------
Sub dealcards(ByVal value As String, ByVal locX As Integer, ByVal locY As
Integer)

Dim myCard As New PictureBox()

Me.Controls.Add(myCard)
Why do you add the control _before_ setting its properties?

With myCard

myCard = New System.Windows.Forms.PictureBox()
The line above doesn't make sense because you never add this control.
You can remove it.
.Visible = True

.Name = CStr(intCardsDealt)

intCardsDealt += 1

.Size = New System.Drawing.Size(70, 90)

.TabStop = False

.Location = New System.Drawing.Point(locX, locY)

.Image = Image.FromFile("c:\blackjack\" & value & ".jpg")

.BringToFront()

.Show()

End With

End Sub [...] Anyways, I've tried to surf around for my next problem: how to remove those
images I've added dynamically.

I tried:
Me.Controls.RemoveAt(mintCount) where mintCount is an integer count of the
control's index value.

I've even named the new picture box controls with the cstr(mintCount) value.


You can add a 'Hashtable' to your form (on top of the form 'Private m_ht
As New Hashtable()') and add all the controls to this table. As key you
can use the name of the control, the value is the control itself.

Later you can easily get a reference to the control with a specific name
by querying it from the Hashtable. Then you can pass this reference to
the 'Me.Controls.Remove' method. After removing the control from the
'Controls' collection, you can remove it from the 'Hashtable'.

--
Herfried K. Wagner
MVP · VB Classic, VB.NET
<http://www.mvps.org/dotnet>
Nov 20 '05 #2
Oh yes,

Obviously, I'll have many pictureboxes on my form after a while. What I'm
trying to do is iterate through the form.controls collection.

If I use form.remove(picturebox), how would I know which picturebox was
being removed? I've looked at MSDN without luck.

"Andy Chan" <an***********@telus.net> wrote in message
news:%2***************@TK2MSFTNGP11.phx.gbl...
First of all, thanks to Crirus and Fergus for helping me with a related
posted a few days ago.

Ok, I can add images to my form (for whatever reason I cannot added more
than 1 image within the same procedure; rather I had to call the same
"addimage" procedure over and over again to get it working).

For anyone that's curious the code I used is the following:
-------------------------------------------------------------------------- -- -----------------
Sub dealcards(ByVal value As String, ByVal locX As Integer, ByVal locY As
Integer)

Dim myCard As New PictureBox()

Me.Controls.Add(myCard)

With myCard

myCard = New System.Windows.Forms.PictureBox()

.Visible = True

.Name = CStr(intCardsDealt)

intCardsDealt += 1

.Size = New System.Drawing.Size(70, 90)

.TabStop = False

.Location = New System.Drawing.Point(locX, locY)

.Image = Image.FromFile("c:\blackjack\" & value & ".jpg")

.BringToFront()

.Show()

End With

End Sub

-------------------------------------------------------------------------- -- ----------------------------------------------------------------------

And if you're wondering, yes, I'm creating a blackjack game. (I'm trying to improve my memory so that I can count cards. If anyone's interested in the
finished product, would be more than happy to share....so long as you don't expect to win every time!!!)
Anyways, I've tried to surf around for my next problem: how to remove those images I've added dynamically.

I tried:
Me.Controls.RemoveAt(mintCount) where mintCount is an integer count of the
control's index value.

I've even named the new picture box controls with the cstr(mintCount) value.
Thanks!



Nov 20 '05 #3
OK. Some success.

Couldn't figure out how to remove the image from the form, but I added the
cards to a panel, and removed it from the panel. Tada!!!

I'd still rather just add and remove the cards directly onto the form, so
would still appreciate some guidance. Thanks!

"Andy Chan" <an***********@telus.net> wrote in message
news:%2***************@TK2MSFTNGP11.phx.gbl...
First of all, thanks to Crirus and Fergus for helping me with a related
posted a few days ago.

Ok, I can add images to my form (for whatever reason I cannot added more
than 1 image within the same procedure; rather I had to call the same
"addimage" procedure over and over again to get it working).

For anyone that's curious the code I used is the following:
-------------------------------------------------------------------------- -- -----------------
Sub dealcards(ByVal value As String, ByVal locX As Integer, ByVal locY As
Integer)

Dim myCard As New PictureBox()

Me.Controls.Add(myCard)

With myCard

myCard = New System.Windows.Forms.PictureBox()

.Visible = True

.Name = CStr(intCardsDealt)

intCardsDealt += 1

.Size = New System.Drawing.Size(70, 90)

.TabStop = False

.Location = New System.Drawing.Point(locX, locY)

.Image = Image.FromFile("c:\blackjack\" & value & ".jpg")

.BringToFront()

.Show()

End With

End Sub

-------------------------------------------------------------------------- -- ----------------------------------------------------------------------

And if you're wondering, yes, I'm creating a blackjack game. (I'm trying to improve my memory so that I can count cards. If anyone's interested in the
finished product, would be more than happy to share....so long as you don't expect to win every time!!!)
Anyways, I've tried to surf around for my next problem: how to remove those images I've added dynamically.

I tried:
Me.Controls.RemoveAt(mintCount) where mintCount is an integer count of the
control's index value.

I've even named the new picture box controls with the cstr(mintCount) value.
Thanks!



Nov 20 '05 #4
Andy

Consider this:
Public Class Form1
Inherits System.Windows.Forms.Form

Private myPath As String
Private MyCardLocation As Point = New Point(10, 10)
'....some code here

Public Sub SetCard(path as string) 'Handles a Button Click if you want
myPath=path
Form1.Refresh
end sub

Private Sub Form1_Paint(ByVal sender As Object, ByVal e As
System.Windows.Forms.PaintEventArgs) Handles MyBase.Paint
Dim myCard As Image = Image.FromFile(myPath)
e.Graphics.DrawImage(myCard, New Rectangle(MyCardLocation.X,
MyCardLocation.Y, myCard.Width, myCard.Height))

End Sub

--
Ceers,
Crirus

------------------------------
If work were a good thing, the boss would take it all from you

------------------------------

"Andy Chan" <an***********@telus.net> wrote in message
news:%2***************@TK2MSFTNGP11.phx.gbl...
First of all, thanks to Crirus and Fergus for helping me with a related
posted a few days ago.

Ok, I can add images to my form (for whatever reason I cannot added more
than 1 image within the same procedure; rather I had to call the same
"addimage" procedure over and over again to get it working).

For anyone that's curious the code I used is the following:
-------------------------------------------------------------------------- -- -----------------
Sub dealcards(ByVal value As String, ByVal locX As Integer, ByVal locY As
Integer)

Dim myCard As New PictureBox()

Me.Controls.Add(myCard)

With myCard

myCard = New System.Windows.Forms.PictureBox()

.Visible = True

.Name = CStr(intCardsDealt)

intCardsDealt += 1

.Size = New System.Drawing.Size(70, 90)

.TabStop = False

.Location = New System.Drawing.Point(locX, locY)

.Image = Image.FromFile("c:\blackjack\" & value & ".jpg")

.BringToFront()

.Show()

End With

End Sub

-------------------------------------------------------------------------- -- ----------------------------------------------------------------------

And if you're wondering, yes, I'm creating a blackjack game. (I'm trying to improve my memory so that I can count cards. If anyone's interested in the
finished product, would be more than happy to share....so long as you don't expect to win every time!!!)
Anyways, I've tried to surf around for my next problem: how to remove those images I've added dynamically.

I tried:
Me.Controls.RemoveAt(mintCount) where mintCount is an integer count of the
control's index value.

I've even named the new picture box controls with the cstr(mintCount) value.
Thanks!



Nov 20 '05 #5
Hi Crirus,

Thanks for the alternative. If I were to use the form1_paint method, how
would I delete the image later?

I'm playing with the picture box in a panel control. It's very easy to use;
I'm leaning towards just using it in the meantime and go one to solve other
issues I have....

"Crirus" <Cr****@datagroup.ro> wrote in message
news:OV**************@TK2MSFTNGP10.phx.gbl...
Andy

Consider this:
Public Class Form1
Inherits System.Windows.Forms.Form

Private myPath As String
Private MyCardLocation As Point = New Point(10, 10)
'....some code here

Public Sub SetCard(path as string) 'Handles a Button Click if you want
myPath=path
Form1.Refresh
end sub

Private Sub Form1_Paint(ByVal sender As Object, ByVal e As
System.Windows.Forms.PaintEventArgs) Handles MyBase.Paint
Dim myCard As Image = Image.FromFile(myPath)
e.Graphics.DrawImage(myCard, New Rectangle(MyCardLocation.X,
MyCardLocation.Y, myCard.Width, myCard.Height))

End Sub

--
Ceers,
Crirus

------------------------------
If work were a good thing, the boss would take it all from you

------------------------------

"Andy Chan" <an***********@telus.net> wrote in message
news:%2***************@TK2MSFTNGP11.phx.gbl...
First of all, thanks to Crirus and Fergus for helping me with a related
posted a few days ago.

Ok, I can add images to my form (for whatever reason I cannot added more
than 1 image within the same procedure; rather I had to call the same
"addimage" procedure over and over again to get it working).

For anyone that's curious the code I used is the following:


--------------------------------------------------------------------------
--
-----------------
Sub dealcards(ByVal value As String, ByVal locX As Integer, ByVal locY As Integer)

Dim myCard As New PictureBox()

Me.Controls.Add(myCard)

With myCard

myCard = New System.Windows.Forms.PictureBox()

.Visible = True

.Name = CStr(intCardsDealt)

intCardsDealt += 1

.Size = New System.Drawing.Size(70, 90)

.TabStop = False

.Location = New System.Drawing.Point(locX, locY)

.Image = Image.FromFile("c:\blackjack\" & value & ".jpg")

.BringToFront()

.Show()

End With

End Sub


--------------------------------------------------------------------------
--
----------------------------------------------------------------------

And if you're wondering, yes, I'm creating a blackjack game. (I'm trying

to
improve my memory so that I can count cards. If anyone's interested in the finished product, would be more than happy to share....so long as you

don't
expect to win every time!!!)
Anyways, I've tried to surf around for my next problem: how to remove

those
images I've added dynamically.

I tried:
Me.Controls.RemoveAt(mintCount) where mintCount is an integer count of the control's index value.

I've even named the new picture box controls with the cstr(mintCount)

value.

Thanks!




Nov 20 '05 #6
It is deleted by itself

The code I posted should work as it is....

Every time a paint is called the form is completly erased and redrawed..so
you dont have to worry about any further deletion, you only have to deal
with what should be draw

--
Ceers,
Crirus

------------------------------
If work were a good thing, the boss would take it all from you

------------------------------

"Andy Chan" <an***********@telus.net> wrote in message
news:uG**************@TK2MSFTNGP12.phx.gbl...
Hi Crirus,

Thanks for the alternative. If I were to use the form1_paint method, how
would I delete the image later?

I'm playing with the picture box in a panel control. It's very easy to use; I'm leaning towards just using it in the meantime and go one to solve other issues I have....

"Crirus" <Cr****@datagroup.ro> wrote in message
news:OV**************@TK2MSFTNGP10.phx.gbl...
Andy

Consider this:
Public Class Form1
Inherits System.Windows.Forms.Form

Private myPath As String
Private MyCardLocation As Point = New Point(10, 10)
'....some code here

Public Sub SetCard(path as string) 'Handles a Button Click if you want
myPath=path
Form1.Refresh
end sub

Private Sub Form1_Paint(ByVal sender As Object, ByVal e As
System.Windows.Forms.PaintEventArgs) Handles MyBase.Paint
Dim myCard As Image = Image.FromFile(myPath)
e.Graphics.DrawImage(myCard, New Rectangle(MyCardLocation.X,
MyCardLocation.Y, myCard.Width, myCard.Height))

End Sub

--
Ceers,
Crirus

------------------------------
If work were a good thing, the boss would take it all from you

------------------------------

"Andy Chan" <an***********@telus.net> wrote in message
news:%2***************@TK2MSFTNGP11.phx.gbl...
First of all, thanks to Crirus and Fergus for helping me with a related posted a few days ago.

Ok, I can add images to my form (for whatever reason I cannot added more than 1 image within the same procedure; rather I had to call the same
"addimage" procedure over and over again to get it working).

For anyone that's curious the code I used is the following:


--------------------------------------------------------------------------
--
-----------------
Sub dealcards(ByVal value As String, ByVal locX As Integer, ByVal locY As Integer)

Dim myCard As New PictureBox()

Me.Controls.Add(myCard)

With myCard

myCard = New System.Windows.Forms.PictureBox()

.Visible = True

.Name = CStr(intCardsDealt)

intCardsDealt += 1

.Size = New System.Drawing.Size(70, 90)

.TabStop = False

.Location = New System.Drawing.Point(locX, locY)

.Image = Image.FromFile("c:\blackjack\" & value & ".jpg")

.BringToFront()

.Show()

End With

End Sub


--------------------------------------------------------------------------
--
----------------------------------------------------------------------

And if you're wondering, yes, I'm creating a blackjack game. (I'm
trying to
improve my memory so that I can count cards. If anyone's interested in

the finished product, would be more than happy to share....so long as you

don't
expect to win every time!!!)
Anyways, I've tried to surf around for my next problem: how to remove

those
images I've added dynamically.

I tried:
Me.Controls.RemoveAt(mintCount) where mintCount is an integer count of the control's index value.

I've even named the new picture box controls with the cstr(mintCount)

value.

Thanks!





Nov 20 '05 #7
Wow. Thanks! I'll try it now!
"Crirus" <Cr****@datagroup.ro> wrote in message
news:eV**************@TK2MSFTNGP09.phx.gbl...
It is deleted by itself

The code I posted should work as it is....

Every time a paint is called the form is completly erased and redrawed..so
you dont have to worry about any further deletion, you only have to deal
with what should be draw

--
Ceers,
Crirus

------------------------------
If work were a good thing, the boss would take it all from you

------------------------------

"Andy Chan" <an***********@telus.net> wrote in message
news:uG**************@TK2MSFTNGP12.phx.gbl...
Hi Crirus,

Thanks for the alternative. If I were to use the form1_paint method, how
would I delete the image later?

I'm playing with the picture box in a panel control. It's very easy to

use;
I'm leaning towards just using it in the meantime and go one to solve

other
issues I have....

"Crirus" <Cr****@datagroup.ro> wrote in message
news:OV**************@TK2MSFTNGP10.phx.gbl...
Andy

Consider this:
Public Class Form1
Inherits System.Windows.Forms.Form

Private myPath As String
Private MyCardLocation As Point = New Point(10, 10)
'....some code here

Public Sub SetCard(path as string) 'Handles a Button Click if you want myPath=path
Form1.Refresh
end sub

Private Sub Form1_Paint(ByVal sender As Object, ByVal e As
System.Windows.Forms.PaintEventArgs) Handles MyBase.Paint
Dim myCard As Image = Image.FromFile(myPath)
e.Graphics.DrawImage(myCard, New Rectangle(MyCardLocation.X,
MyCardLocation.Y, myCard.Width, myCard.Height))

End Sub

--
Ceers,
Crirus

------------------------------
If work were a good thing, the boss would take it all from you

------------------------------

"Andy Chan" <an***********@telus.net> wrote in message
news:%2***************@TK2MSFTNGP11.phx.gbl...
> First of all, thanks to Crirus and Fergus for helping me with a related > posted a few days ago.
>
> Ok, I can add images to my form (for whatever reason I cannot added more > than 1 image within the same procedure; rather I had to call the same > "addimage" procedure over and over again to get it working).
>
> For anyone that's curious the code I used is the following:


--------------------------------------------------------------------------
--
> -----------------
> Sub dealcards(ByVal value As String, ByVal locX As Integer, ByVal locY
As
> Integer)
>
> Dim myCard As New PictureBox()
>
> Me.Controls.Add(myCard)
>
> With myCard
>
> myCard = New System.Windows.Forms.PictureBox()
>
> .Visible = True
>
> .Name = CStr(intCardsDealt)
>
> intCardsDealt += 1
>
> .Size = New System.Drawing.Size(70, 90)
>
> .TabStop = False
>
> .Location = New System.Drawing.Point(locX, locY)
>
> .Image = Image.FromFile("c:\blackjack\" & value & ".jpg")
>
> .BringToFront()
>
> .Show()
>
> End With
>
> End Sub
>


--------------------------------------------------------------------------
--
---------------------------------------------------------------------- >
> And if you're wondering, yes, I'm creating a blackjack game. (I'm trying to
> improve my memory so that I can count cards. If anyone's interested
in the
> finished product, would be more than happy to share....so long as
you don't
> expect to win every time!!!)
>
>
> Anyways, I've tried to surf around for my next problem: how to remove those
> images I've added dynamically.
>
> I tried:
> Me.Controls.RemoveAt(mintCount) where mintCount is an integer count of the
> control's index value.
>
> I've even named the new picture box controls with the

cstr(mintCount) value.
>
> Thanks!
>
>
>
>
>
>
>
>



Nov 20 '05 #8
Just make a new test project with a form, no controls and add my code in
it... you may need some changes but you should handle it

--
Ceers,
Crirus

------------------------------
If work were a good thing, the boss would take it all from you

------------------------------

"Andy Chan" <an***********@telus.net> wrote in message
news:O5****************@TK2MSFTNGP09.phx.gbl...
Wow. Thanks! I'll try it now!
"Crirus" <Cr****@datagroup.ro> wrote in message
news:eV**************@TK2MSFTNGP09.phx.gbl...
It is deleted by itself

The code I posted should work as it is....

Every time a paint is called the form is completly erased and redrawed..so
you dont have to worry about any further deletion, you only have to deal
with what should be draw

--
Ceers,
Crirus

------------------------------
If work were a good thing, the boss would take it all from you

------------------------------

"Andy Chan" <an***********@telus.net> wrote in message
news:uG**************@TK2MSFTNGP12.phx.gbl...
Hi Crirus,

Thanks for the alternative. If I were to use the form1_paint method, how would I delete the image later?

I'm playing with the picture box in a panel control. It's very easy to use;
I'm leaning towards just using it in the meantime and go one to solve

other
issues I have....

"Crirus" <Cr****@datagroup.ro> wrote in message
news:OV**************@TK2MSFTNGP10.phx.gbl...
> Andy
>
> Consider this:
>
>
> Public Class Form1
> Inherits System.Windows.Forms.Form
>
> Private myPath As String
> Private MyCardLocation As Point = New Point(10, 10)
> '....some code here
>
> Public Sub SetCard(path as string) 'Handles a Button Click if
you want
> myPath=path
> Form1.Refresh
> end sub
>
> Private Sub Form1_Paint(ByVal sender As Object, ByVal e As
> System.Windows.Forms.PaintEventArgs) Handles MyBase.Paint
> Dim myCard As Image = Image.FromFile(myPath)
> e.Graphics.DrawImage(myCard, New Rectangle(MyCardLocation.X,
> MyCardLocation.Y, myCard.Width, myCard.Height))
>
> End Sub
>
>
>
> --
> Ceers,
> Crirus
>
> ------------------------------
> If work were a good thing, the boss would take it all from you
>
> ------------------------------
>
> "Andy Chan" <an***********@telus.net> wrote in message
> news:%2***************@TK2MSFTNGP11.phx.gbl...
> > First of all, thanks to Crirus and Fergus for helping me with a

related
> > posted a few days ago.
> >
> > Ok, I can add images to my form (for whatever reason I cannot
added more
> > than 1 image within the same procedure; rather I had to call the

same > > "addimage" procedure over and over again to get it working).
> >
> > For anyone that's curious the code I used is the following:
>


--------------------------------------------------------------------------
> --
> > -----------------
> > Sub dealcards(ByVal value As String, ByVal locX As Integer, ByVal locY As
> > Integer)
> >
> > Dim myCard As New PictureBox()
> >
> > Me.Controls.Add(myCard)
> >
> > With myCard
> >
> > myCard = New System.Windows.Forms.PictureBox()
> >
> > .Visible = True
> >
> > .Name = CStr(intCardsDealt)
> >
> > intCardsDealt += 1
> >
> > .Size = New System.Drawing.Size(70, 90)
> >
> > .TabStop = False
> >
> > .Location = New System.Drawing.Point(locX, locY)
> >
> > .Image = Image.FromFile("c:\blackjack\" & value & ".jpg")
> >
> > .BringToFront()
> >
> > .Show()
> >
> > End With
> >
> > End Sub
> >
>


--------------------------------------------------------------------------
> --
>

----------------------------------------------------------------------
> >
> > And if you're wondering, yes, I'm creating a blackjack game. (I'm

trying
> to
> > improve my memory so that I can count cards. If anyone's
interested in the
> > finished product, would be more than happy to share....so long as you > don't
> > expect to win every time!!!)
> >
> >
> > Anyways, I've tried to surf around for my next problem: how to remove > those
> > images I've added dynamically.
> >
> > I tried:
> > Me.Controls.RemoveAt(mintCount) where mintCount is an integer
count
of the
> > control's index value.
> >
> > I've even named the new picture box controls with the cstr(mintCount) > value.
> >
> > Thanks!
> >
> >
> >
> >
> >
> >
> >
> >
>
>



Nov 20 '05 #9
* "Andy Chan" <an***********@telus.net> scripsit:
Obviously, I'll have many pictureboxes on my form after a while. What I'm
trying to do is iterate through the form.controls collection.

If I use form.remove(picturebox), how would I know which picturebox was
being removed? I've looked at MSDN without luck.


You can give every picturebox a name by setting its 'Name' property.
Then you can add them to a hashtable:

\\\
Private m_ht As New Hashtable()
..
..
..

' Add a control (use name as key).
m_ht.Add(DynamicPictureBox.Name, DynamicPictureBox)
..
..
..

' Get a control.
Dim p As PictureBox = DirectCast(m_ht.Item("PictureBox1"), PictureBox)

..
..
..

' Remove a control.
m_ht.Remove("PictureBox1")
///

--
Herfried K. Wagner
MVP · VB Classic, VB.NET
<http://www.mvps.org/dotnet>
Nov 20 '05 #10
Hi Andy,

Rather than talking about PictureBoxes and the like, do you think
you could describe what you are doing in terms of how the User is
going to play the game?

Ie. How dealing works and where the cards go on the screen,
how you deal extra cards, etc.

Then we may be able to advise from the big picture rather than
helping you implement what may be an awkward method.

Regards,
Fergus
Nov 20 '05 #11
Hi Fergus,

First of all, thanks for taking the time to read my posts. You and Crirus
have been extremely helpful. This is my first VB .net project; it's made me
realize how far I've got to go.

So, this is the "big picture", per say:

UI:

1. I've designed a simple blackjack table, with Panels representing each
player position.
2. Created 52 jpg's for the cards, 1 jpg for "face down".
3. I've grouped together a bunch of face down cards to represent the cards
in the "shoe". As cards are dealt, I'll be hiding these cards to show that
there are fewer cards left in the shoe.

Objects:

1. A deck class will contain a collection of cards
2. a card class will contain the suit, card value.
3. The dealer class will contain the deck collection. I'm creating methods
such as deal, and shuffle.
4. The player class will contain a similiar deck collection, representing
the hand of cards the player has. I'm creating methods such as draw, stand,
split, etc.
Other:
1. I want to add a feature called "Monte Carlo" (ie. Monte Carlo Simulation)
which will draw 1000 times the next card, based on the cards in the deck
collection. I'll then show the probabilities of the value of the hand after
the next card is drawn.
2. I'll show the card count, which represent the number of face cards less
the number of cards 2 to 7, still left in deck.
3. There are some other card counting strategies I'll be showing, such as
"Omega II".
database tier:
1. I plan to add records to a jet database so I can track how I do,
depending on different strategies. I'll build some Crystal Reports to query
the database.

I'm also diagramming with UML in Visio. I've got a background in VB, using
OOM. I'm really more interested in seeing how the new object capabilities
work in .NET as opposed to the graphics manipulation.

So, I've got my work to do. Again, really appreciate you guys helping me
with the initial hurdles. By the way, I got interested in programming this
for 2 reasons:
1. get through the Vb.Net learning curve, and
2. I read this book called "Bringing down the house". Very light read. It's
about a bunch of MIT students who won money playing blackjack. I certainly
don't think I'll be rich following their example, but I decided it'd make
the perfect project for me to learn the UI, objects, Crystal Reports, ADO of
the new VB.

Phew. That's it.
Andy




"Fergus Cooney" <fi****@post.com> wrote in message
news:ei*************@TK2MSFTNGP12.phx.gbl...
Hi Andy,

Rather than talking about PictureBoxes and the like, do you think
you could describe what you are doing in terms of how the User is
going to play the game?

Ie. How dealing works and where the cards go on the screen,
how you deal extra cards, etc.

Then we may be able to advise from the big picture rather than
helping you implement what may be an awkward method.

Regards,
Fergus

Nov 20 '05 #12

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: mark | r | last post by:
ok, so i now know how to add, edit, delete and search for products (havent figured out categorisation out yet tho) - how do i upload an image and save the file name to the database as part of the...
0
by: Andrés Giraldo | last post by:
Hi! I'm adding an asp button to a datagrid on the ItemDataBound event, when the user clicks on this button, I basically remove the button and create other 2 buttons... my problem is.. the 2 last...
0
by: A. Elamiri | last post by:
I created a portal, and all my pages inherit from a customized class which allows me to add header and footer to page and thus customize how it looks. I would like to add the option of making any...
3
by: willwade | last post by:
Hi there, Sorry for the perhaps undirected post - Ive struggled for the past few hours and cant see the wood for the trees.. I have a page (infact a site but I will keep it simple) that is a...
9
by: Neo Geshel | last post by:
I have strip-mined, strip-searched, and completely exhausted the Internet (up to the 30th page on Google, with 100 results per page!!), all without finding an answer to my question AS TO WHY IT...
1
by: dave8421 | last post by:
Hi, I have a (strict) html document with the following portion: <ul> <li><img alt="" src="images/image1.jpg" /></li> <li><img alt="" src="images/image2.jpg" /></li> <li><img alt=""...
8
by: Jason | last post by:
Hello, I am trying to utilitze the AJAX Control toolkit in my asp.net project. I have added a reference to AjaxControlToolkit.dll, and in my page, added these lines of code: ...
2
by: Hugh Oxford | last post by:
I have a site that uses Yahoo maps. I place markers on the maps - the images for the markers reside on my webserver. The site also uses polylines. I find that when I add a batch of markers,...
10
by: AC | last post by:
I had a page that does some event setup on window.onload: function prepEvents() { document.getElementById("menumap_sales").onmouseover = swapMenuSales; // etc } window.onload = prepEvents;
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.