Thank you for the reply. It is not what I mean; In your solution the ICounterprocessor can raise the event, but it's meant to react on the event, like an observer. Maibe I better forget the whole event stuff, and change to Observer like structure?
Hello, when I press the X in the top right hand corner of the application, I get a messagebox. The messagebox ask me a Yes/No question. If I press YES, all is good and the application closes. When I press NO, I can continue to use the application. Now the problem. If I press NO, then I can never press the X in the top right hand corner. It's as if the NO answer disables the ability to ever close the application again. How can I say NO and be able to press the X again when I want to close the application later?
First, I think you should call the base OnClosing method, not the OnClosed as you do. Second, you should call this base handler in both cases, as it will take care with proper action, whether or not event has been cancelled:
I want to apologize for not catching this the first time. I reviewed the issue with DevExpress and they reported that the Closing Event is only being raised once and this defect will be fixed in the next release. Article. thanks for your help!
Moveable elements: index cards, scrabble tiles, etc.
move: 'grab' and drag with LMB to another part of the window
I'm new to C# and WFC, etc. but have years of experience in PHP, C and other languages.
What I'm looking to know is:
- which element(s) (if element is the right word; checkbox? text entry field? what-have-you?) to use to create a scrabble tile or index card (whatever; the moveable object/thing)
- how movement is handled
Either a general sort-of pseudo code explanation or actual code is fine.
I don't know the terminology used in WFC (if WFC is even the right acronym) so maybe this question doesn't even make sense.
For game "pieces" I'd use either a Panel for rectangular pieces, or a UserControl for custom shaped pieces.
Search CodeProject for articles on drag and drop, and/or creating custom shaped Controls.
«... thank the gods that they have made you superior to those events which they have not placed within your own control, rendered you accountable for that only which is within you own control For what, then, have they made you responsible? For that which is alone in your own power—a right use of things as they appear.» Discourses of Epictetus Book I:12
The elements you refer to are from WinForms, and that's not a great engine to build games with
Eddy: What do you use instead of WinForms? And which specific element (or whatever it's called) would you use for (for instance) an index card that can be dragged around and dropped somewhere else within a window?
And which specific element (or whatever it's called) would you use for (for instance) an index card that can be dragged around and dropped somewhere else within a window?
It's hard to say it, I hate to say it, but probably WinForms. It has got built-in support for drag and drop, and there's an article on CodeProject showing how to use any bitmap in that drag-and-drop operation.
If you are into creating games, I'd strongly suggest to look at Unity. If you're looking for beta-testers, I'm here
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]