Click here to Skip to main content
15,888,064 members
Home / Discussions / C#
   

C#

 
GeneralRe: A Layout Question, And A Bit More Pin
PIEBALDconsult18-May-12 9:12
mvePIEBALDconsult18-May-12 9:12 
GeneralRe: A Layout Question, And A Bit More Pin
Roger Wright18-May-12 9:51
professionalRoger Wright18-May-12 9:51 
GeneralRe: A Layout Question, And A Bit More Pin
PIEBALDconsult18-May-12 11:16
mvePIEBALDconsult18-May-12 11:16 
GeneralRe: A Layout Question, And A Bit More Pin
Roger Wright18-May-12 11:31
professionalRoger Wright18-May-12 11:31 
AnswerRe: A Layout Question, And A Bit More Pin
Ennis Ray Lynch, Jr.18-May-12 5:44
Ennis Ray Lynch, Jr.18-May-12 5:44 
GeneralRe: A Layout Question, And A Bit More Pin
Roger Wright18-May-12 19:50
professionalRoger Wright18-May-12 19:50 
AnswerRe: A Layout Question, And A Bit More Pin
BillWoodruff20-May-12 17:54
professionalBillWoodruff20-May-12 17:54 
GeneralRe: A Layout Question, And A Bit More Pin
Roger Wright20-May-12 20:34
professionalRoger Wright20-May-12 20:34 
That looks slick, Bill. What you describe is generally what I started out doing. I used the layered approach in order to control color without having to mess with Paint functions. In the game, the tile center, which I represented as a button, has a medium blue color, while the text and outer border are light blue. When, before the start of a game, the player selects his numbers, the border and text change to yellow. During the play, each time the game selects a number, the center turns from medium blue to red. I can change the control main background color easily to control the border color, the backcolor property of the button to change the center color, and the foreground color of the button to change the text color. The button gives me an event that I can use to set the selected status of the player's choices. I planned to use this event to fill an array representing the selected numbers, and a random number generator to set the game's choices, then compare the arrays to determine the payoff, if any.

I was dismayed to learn from others that so many controls causes problems. It's a relief to hear from you that this isn't necessarily true. On the other hand, this caused me to look into WPF, and though I have no interest in learning XAML, the graceful way in which this framework handles events is very attractive!

Keno, by the way, is a game of pure chance. You pick numbers and hope that the machine will pick the same ones. It's logically identical with any state lottery, except that in Cleopatra Keno, the payout is 90.1% of the amount paid in; no state lottery comes close. It's fun if a particular game likes the same number you do on the night you're playing it, boring as watching paint dry if it doesn't. I much prefer Poker, since there is a chance to change the outcome by discarding some cards and drawing replacements, but as in any casino game, it is as likely to stick a hose in your pocket and suck until all it gets is lint, as it is to pay off big wins. I had a dreadful night playing Keno last Friday - nothing hit for me. But when I changed to Poker, I was $2000 ahead in a couple of hours, playing $1.25 a hand. Of course, when I went back to Poker the next day (there's not much else to do when you're staying in a hotel/casino) the Poker machines slowly took back all they'd granted me the night before, and the Keno games still hated me. Over the entire weekend, I broke even, paying for the room and meals with winnings. A free vacation is not to be scorned... Big Grin | :-D

Maybe I'll pursue both approaches, just to see which turns out to be simpler. In fact, if I can find the time, a side-by-side comparison of developing the same program in WinForms and WPF might make an interesting article.
Will Rogers never met me.

GeneralRe: A Layout Question, And A Bit More Pin
BillWoodruff21-May-12 18:10
professionalBillWoodruff21-May-12 18:10 
GeneralRe: A Layout Question, And A Bit More Pin
BillWoodruff22-May-12 3:47
professionalBillWoodruff22-May-12 3:47 
GeneralRe: A Layout Question, And A Bit More Pin
Roger Wright23-May-12 20:11
professionalRoger Wright23-May-12 20:11 
AnswerRe: A Layout Question, And A Bit More Pin
Gerry Schmitz21-May-12 13:12
mveGerry Schmitz21-May-12 13:12 
GeneralRe: A Layout Question, And A Bit More Pin
BillWoodruff21-May-12 17:42
professionalBillWoodruff21-May-12 17:42 
GeneralRe: A Layout Question, And A Bit More Pin
Gerry Schmitz21-May-12 21:02
mveGerry Schmitz21-May-12 21:02 
GeneralRe: A Layout Question, And A Bit More Pin
Roger Wright23-May-12 20:13
professionalRoger Wright23-May-12 20:13 
QuestionRow Not Found Or Changed Pin
Kevin Marois17-May-12 10:10
professionalKevin Marois17-May-12 10:10 
AnswerRe: Row Not Found Or Changed Pin
VJ Reddy17-May-12 21:22
VJ Reddy17-May-12 21:22 
Generalneed help Pin
Kurac117-May-12 9:09
Kurac117-May-12 9:09 
GeneralRe: need help Pin
Pete O'Hanlon17-May-12 9:13
mvePete O'Hanlon17-May-12 9:13 
GeneralRe: need help Pin
Kurac117-May-12 9:16
Kurac117-May-12 9:16 
GeneralRe: need help Pin
Pete O'Hanlon17-May-12 9:22
mvePete O'Hanlon17-May-12 9:22 
AnswerRe: need help Pin
Luc Pattyn17-May-12 11:57
sitebuilderLuc Pattyn17-May-12 11:57 
GeneralRe: need help Pin
fjdiewornncalwe17-May-12 11:16
professionalfjdiewornncalwe17-May-12 11:16 
QuestionNumericUpDown control increment value change Pin
Blubbo17-May-12 7:38
Blubbo17-May-12 7:38 
AnswerRe: NumericUpDown control increment value change Pin
OriginalGriff17-May-12 8:07
mveOriginalGriff17-May-12 8:07 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.