Kamal:
In addition to Alex's post, you can wire in a click event for a Picture box,
so if you broke out the pictures of the buttons into seperate images, you
could put them on top of the background image and just handle the click
event directly. There are many controls that you can wire in a click event
for for instance and they'll compile, they just won't do anything. Witha
picturebox fortunately you can. You can also add the files as embedded
resources, set their build action to Embedded Resource, then reference them
directly in your project without having to worry about adding them to your
setup project. This may or may not be helpful depending on how you
implement it.
Anyway, to wire in an event, just go ahead and add it,
(assuming your picture was named picPlay:
this.picPlay.Click += new System.EventHandler(this.picPlay_Click);
write your handler:
private void picPlay_Click(object sender, System.EventArgs e)
{
//Do something
}
And if you choose to referece embedded resources:
private Bitmap GetImage(ImageName i)
{
try
{
switch(i)
{
case ImageName.RecordDisabled:
return new
Bitmap(System.Reflection.Assembly.GetExecutingAssembly().GetManifestResource
Stream("MySolution.ResourceName.jpg"));
////the rest is just the closing parts of the top
HTH,
Bill
kamal said:
I am using a image(.jpg file) which contains the skin of a remote control.
The idea is to develop an remote control application in my Pocket PC.
Now I want the buttons in the image has to handle the click events. The
remote control image contains the ellipse and circle shaped buttons.