Click here to Skip to main content
15,899,475 members
Home / Discussions / C#
   

C#

 
GeneralRe: Drawing column headers Pin
Heath Stewart5-Mar-04 9:09
protectorHeath Stewart5-Mar-04 9:09 
GeneralRe: Drawing column headers Pin
Amberite005-Mar-04 9:13
Amberite005-Mar-04 9:13 
GeneralRe: Drawing column headers Pin
Heath Stewart5-Mar-04 9:37
protectorHeath Stewart5-Mar-04 9:37 
GeneralRe: Drawing column headers Pin
Amberite005-Mar-04 9:41
Amberite005-Mar-04 9:41 
GeneralInstall remote Window Service Pin
hxxbin5-Mar-04 4:43
hxxbin5-Mar-04 4:43 
GeneralCounting Items post RowFilter in a DataView Pin
MrEyes5-Mar-04 3:33
MrEyes5-Mar-04 3:33 
QuestionHow can I pull multiple icons from a single embedded bitmap? Pin
AppMaker885-Mar-04 1:20
AppMaker885-Mar-04 1:20 
AnswerRe: How can I pull multiple icons from a single embedded bitmap? Pin
Heath Stewart5-Mar-04 6:14
protectorHeath Stewart5-Mar-04 6:14 
If you want to create an ImageList, you can use ImageList.Images.AddStrip. To do this manually, it really isn't that hard. In most cases, squares are used. If the image is 32 pixels high, bitmaps consisting of 32 pixels wide are copied to individual Bitmap instances. You can use Graphics.DrawImage(Image, Rectangle, Rectangle, GraphicsUnit) or a similar method to assist with this process. Once Rectangle specifies the source bounds (in which case you increment the X coordinate by the height of the strip, if dealing with a horizontal strip) and the other specifies the destination bounds (in which case you use Image.GetBounds or the assumed Size and Point(0, 0)). Use the same GraphicsUnit, which you'll most likely want to use GraphicsUnit.Pixel.

In most cases, ImageList.Images.AddStrip will do nicely.

 

Microsoft MVP, Visual C#
My Articles
GeneralGraphics, Bitmaps, and a Process that doesn't close Pin
Rendall4-Mar-04 23:35
Rendall4-Mar-04 23:35 
GeneralRe: Graphics, Bitmaps, and a Process that doesn't close Pin
Heath Stewart5-Mar-04 6:07
protectorHeath Stewart5-Mar-04 6:07 
GeneralRe: Graphics, Bitmaps, and a Process that doesn't close Pin
Rendall12-Mar-04 20:01
Rendall12-Mar-04 20:01 
GeneralRe: Graphics, Bitmaps, and a Process that doesn't close Pin
Rendall13-Mar-04 0:11
Rendall13-Mar-04 0:11 
GeneralMarshalling Problem Pin
nvenkat4-Mar-04 23:02
nvenkat4-Mar-04 23:02 
GeneralRe: Marshalling Problem Pin
Roman Rodov4-Mar-04 23:51
Roman Rodov4-Mar-04 23:51 
GeneralRe: Marshalling Problem Pin
nvenkat5-Mar-04 19:19
nvenkat5-Mar-04 19:19 
Generalchecklistbox problem Pin
ASGill4-Mar-04 21:34
ASGill4-Mar-04 21:34 
GeneralRe: checklistbox problem Pin
Mazdak4-Mar-04 21:40
Mazdak4-Mar-04 21:40 
GeneralRe: checklistbox problem Pin
ASGill4-Mar-04 22:09
ASGill4-Mar-04 22:09 
GeneralRe: checklistbox problem Pin
Mazdak4-Mar-04 22:25
Mazdak4-Mar-04 22:25 
GeneralRe: checklistbox problem Pin
ASGill5-Mar-04 0:53
ASGill5-Mar-04 0:53 
GeneralRe: checklistbox problem Pin
MasudM5-Mar-04 1:50
MasudM5-Mar-04 1:50 
GeneralRe: checklistbox problem Pin
Mazdak5-Mar-04 4:51
Mazdak5-Mar-04 4:51 
GeneralRe: checklistbox problem Pin
ASGill5-Mar-04 7:04
ASGill5-Mar-04 7:04 
GeneralYCbCr image construction Pin
yyyychan4-Mar-04 21:12
yyyychan4-Mar-04 21:12 
GeneralI2C communication Pin
yyyychan4-Mar-04 21:05
yyyychan4-Mar-04 21:05 

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.