Click here to Skip to main content
16,014,759 members
Home / Discussions / C#
   

C#

 
GeneralRe: Enable/Disable of texbox Pin
sreejith ss nair27-May-04 18:14
sreejith ss nair27-May-04 18:14 
GeneralAccessing objects Pin
John L. DeVito24-May-04 10:29
professionalJohn L. DeVito24-May-04 10:29 
GeneralRe: Accessing objects Pin
frank2124-May-04 10:58
frank2124-May-04 10:58 
GeneralRe: Accessing objects Pin
Heath Stewart24-May-04 11:24
protectorHeath Stewart24-May-04 11:24 
GeneralRe: Accessing objects Pin
Heath Stewart24-May-04 11:33
protectorHeath Stewart24-May-04 11:33 
GeneralFitting Buttons to Bitmaps Pin
Guinness4Strength24-May-04 10:28
Guinness4Strength24-May-04 10:28 
GeneralRe: Fitting Buttons to Bitmaps Pin
Heath Stewart24-May-04 11:35
protectorHeath Stewart24-May-04 11:35 
GeneralRe: Fitting Buttons to Bitmaps Pin
Guinness4Strength24-May-04 15:15
Guinness4Strength24-May-04 15:15 
First off thanks for the response. I have tried searching botht the artciles and messageboad but I cannot find anything on point.

I think I understand what you mean, but i'm not sure if that will give me what I want. I'd like to fit the button to the picture, not stretch the picture to the button. Is your solution still the same ?
I assume I will need to inherit the Button Class and create my own control in order to override the OnPaint() method ?

I've tried to create the buttons and fit to the picture using the code below, but for some reason the bottom of the picture is getting chopped off, or at least it appears to be.

Image ButtonPic = null;
Stream ImgStream=null;
int ImageHeight,ImageWidth,ButtonY,ButtonX=0;

//previous button
ImgStream = this.GetType().Assembly.GetManifestResourceStream("MiniP3.PlayerPrevious.bmp");
ButtonPic = Image.FromStream(ImgStream);
btPrevious = new Button();
btPrevious.Image=ButtonPic;
btPrevious.Size = ButtonPic.Size;
btPrevious.ImageAlign=ContentAlignment.MiddleCenter;
ImageHeight = ButtonPic.Height;
ImageWidth = ButtonPic.Width;
ButtonY = (int)(pnButtons.Height-ImageHeight)/2;
btPrevious.Location = new Point(ButtonX,ButtonY);
this.btPrevious.Click += new System.EventHandler(this.PreviousClick);
pnButtons.Controls.Add(btPrevious);

GeneralRe: Fitting Buttons to Bitmaps Pin
Heath Stewart25-May-04 2:36
protectorHeath Stewart25-May-04 2:36 
GeneralRe: Fitting Buttons to Bitmaps Pin
Guinness4Strength24-May-04 15:25
Guinness4Strength24-May-04 15:25 
GeneralCR 9 for C#.net Question Pin
frank2124-May-04 10:17
frank2124-May-04 10:17 
GeneralRe: CR 9 for C#.net Question Pin
Heath Stewart24-May-04 11:40
protectorHeath Stewart24-May-04 11:40 
GeneralAdding Menu Items in C# using Visual Studio Tools for Microsoft Office Pin
mevenson24-May-04 8:39
mevenson24-May-04 8:39 
Generaldataset error Pin
MrJJKoolJ24-May-04 8:23
MrJJKoolJ24-May-04 8:23 
GeneralRe: dataset error Pin
Marc Clifton24-May-04 8:37
mvaMarc Clifton24-May-04 8:37 
GeneralRe: dataset error Pin
Dave Kreskowiak24-May-04 8:39
mveDave Kreskowiak24-May-04 8:39 
GeneralRe: dataset error Pin
MrJJKoolJ24-May-04 8:57
MrJJKoolJ24-May-04 8:57 
GeneralRe: dataset error Pin
sreejith ss nair24-May-04 20:08
sreejith ss nair24-May-04 20:08 
GeneralRe: dataset error Pin
sreejith ss nair24-May-04 20:09
sreejith ss nair24-May-04 20:09 
General64bit Pin
Dimitris Iliopoulos24-May-04 7:54
Dimitris Iliopoulos24-May-04 7:54 
GeneralRe: 64bit Pin
Marc Clifton24-May-04 8:10
mvaMarc Clifton24-May-04 8:10 
GeneralRe: 64bit Pin
Dave Kreskowiak24-May-04 8:22
mveDave Kreskowiak24-May-04 8:22 
GeneralRe: 64bit Pin
leppie24-May-04 11:04
leppie24-May-04 11:04 
GeneralCalling a Web Service Pin
MrJJKoolJ24-May-04 7:44
MrJJKoolJ24-May-04 7:44 
GeneralRe: Calling a Web Service Pin
Dave Kreskowiak24-May-04 8:07
mveDave Kreskowiak24-May-04 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.