Bubble breaker ball like custom control with VS 2005

J

Joe

I need a custom control similar to the Bubble Breaker game balls in
WM5 for smart phones. Since a button can't be used with smart phones,
I was hoping for some pointers (or even better some code) that could
do this. Perhaps even a free, already existing control with the source
that has more or less similar functionality that I can change to suit
my needs?

I was hoping to find something similar out there - especially since I
haven't created any custom controls before.

I am using VS 2005.

Thank you,
Joe

P.S. Please reply to the group, so when I forget and need something
like this again, I can just search on it :)
 
G

Guest

Not surprisingly there isn't some generic control for that, or a framework
already rooled into a game that you can just download for free. The ball is
really a simply item, it's a class that probably draws a ball. More complex
is the game area that displays and moves them, plus handles selection and
game logic. Your questions implies a lack of programming fundamentals and
starting with a task this big might not be the best place. You might want
to start with something simpler, like creating a custom label. MSDN has a
few samples on games. Walk through them. When you understand how those
work, then come back and try this project.
 
J

Joe

Chris,

Thanks for the reply.

I haven't dealt with the native drawing portion of framework, as I
normally don't deal with the compact framework. While I realize that
this request would not be common, I thought that someone in the
community may have needed something similar and either may have found
it on the 'net or rolled their own and might share a portion or the
entire chunk of code.

I need a mechanism in the UI to:
* show the user where they are currently located (a la the flashing
ball in the bubble breaker)
* let the user know the state of the object (such as color)
* let the user know the availability of the object (visible /
invisible)
* be able to create event handlers for the directions (up down left
and right ) and click (for selection).

I don't believe that a label will serve the purpose for what I need.
Feel free to prove me wrong though :)

As mentioned before, this is for a smartphone application, so it isn't
as easy as grabbing some already existing button code and extending /
changing that (although I only found one example of this for the 1.1
compact framework).

Would you (or someone else) have any other ideas how to handle the
above UI needs differently with a smartphone?

Still hoping for pointers,
Joe
 
G

Guest

I have no intention of proving you wrong. Let's see...Labels are custom
drawn, can have different colors, can be visible or not and have a position.
Yep, sounds nothing like what you're after. After all, your ball is round
and text is characters.

Sorry for making such a poor suggestion. It's likely due to my lack of
experience in both developing apps or training others in how to do CF
development. I'm sure someone in the group else can offer a better
suggestion. My apologies.
 
G

Guest

Joe,

As Chris suggested, if you haven't done any GDI stuff before this would be
too complex to start with.

Having said that if you still wish to take up the task I would probebly
create a multidimentional array UI object that hosts items (balls). Each ball
object has states and other properties. When the UI is rendered, it iterates
each item object and draws them based on its state, position etc.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top