Click here to Skip to main content
15,923,168 members
Home / Discussions / C#
   

C#

 
AnswerRe: Can i check if a specific user has loged on? Pin
David Stone12-Oct-05 6:53
sitebuilderDavid Stone12-Oct-05 6:53 
QuestionAtom table Pin
Sabry190512-Oct-05 1:38
Sabry190512-Oct-05 1:38 
AnswerRe: Atom table Pin
leppie12-Oct-05 4:28
leppie12-Oct-05 4:28 
GeneralRe: Atom table Pin
Andy Brummer12-Oct-05 12:06
sitebuilderAndy Brummer12-Oct-05 12:06 
AnswerRe: Atom table Pin
Sabry190512-Oct-05 21:06
Sabry190512-Oct-05 21:06 
Questionlosing focus totally after some.ShowDialog() Pin
FreeClimber11-Oct-05 23:20
FreeClimber11-Oct-05 23:20 
QuestionSlow speed on second query Pin
AesopTurtle11-Oct-05 23:03
AesopTurtle11-Oct-05 23:03 
QuestionDynamic images in imagelist-Urgent!!!!!!!!!!!!!! Pin
tanishq151011-Oct-05 22:04
tanishq151011-Oct-05 22:04 
Dear all,

I have created an imagelist at runtime and am trying to fill it with images created at runtime.These images are of type Bitmap and are created based on the info from database.

Everything works fine but the problem is all the images in the imagelist are of the same color whereas it has to be be of different colors...here is my code...Any help would be appreciated.


/***********************************************************************************

iList myImageList;

FormLoad()
{
CreateImage();
myImageList = new ImageList();
if (myList.Count != 0)
{
foreach(Bitmap ic in myList)
{
myImageList.Images.Add(ic);
}
}
foreach (TwigCategory cat in m_TwigCategories)
{
this.cmb_CATEGORY.ImageList = myImageList;
Item = new ComboBoxExItem(cat.Description,0, cat.ID);
this.cmb_CATEGORY.Items.Add(Item);
}
}


private void CreateImage()
{
foreach (TwigCategory cat in m_TwigCategories)
{
Color color = ConvertRGB2Color((int)cat.RGB);
System.Drawing.Bitmap bmp = new System.Drawing.Bitmap(16, 16);
for (int x = 0; x < bmp.Height; ++x)
for (int y = 0; y < bmp.Width; ++y)
bmp.SetPixel(x, y, color);
for (int x = 0; x < bmp.Height; ++x)
bmp.SetPixel(x, x, color);

myList.Add(image);
}
m_TwigCategories.Reset();
}

private Color ConvertRGB2Color(int rgb)
{
int red = (int)rgb & 255;
int green = (int)((int)rgb / 256)& 255;
int blue = (int)((int)rgb / 65536) & 255;
Color color = Color.FromArgb(255, red, green, blue);
return color;
}
AnswerRe: Dynamic images in imagelist-Urgent!!!!!!!!!!!!!! Pin
David Stone12-Oct-05 7:06
sitebuilderDavid Stone12-Oct-05 7:06 
GeneralRe: Dynamic images in imagelist-Urgent!!!!!!!!!!!!!! Pin
Anonymous12-Oct-05 20:11
Anonymous12-Oct-05 20:11 
GeneralRe: Dynamic images in imagelist-Urgent!!!!!!!!!!!!!! Pin
tanishq151012-Oct-05 20:39
tanishq151012-Oct-05 20:39 
AnswerSolution : Dynamic images in imagelist-Urgent!!!!!!!!!!!!!! Pin
tanishq151013-Oct-05 5:09
tanishq151013-Oct-05 5:09 
Questionowndraw for a scrollbar Pin
Sasuko11-Oct-05 21:29
Sasuko11-Oct-05 21:29 
AnswerRe: owndraw for a scrollbar Pin
David Stone12-Oct-05 6:56
sitebuilderDavid Stone12-Oct-05 6:56 
QuestionWindows Search Gif Pin
Greeky11-Oct-05 20:40
Greeky11-Oct-05 20:40 
AnswerRe: Windows Search Gif Pin
XRaheemX13-Oct-05 3:48
XRaheemX13-Oct-05 3:48 
GeneralRe: Windows Search Gif Pin
Greeky13-Oct-05 3:57
Greeky13-Oct-05 3:57 
QuestionC# and animated GIFs (VS.Net 2003) Pin
raysot77711-Oct-05 19:14
raysot77711-Oct-05 19:14 
Questiondataadapter fill question Pin
theStorminMormon11-Oct-05 16:49
theStorminMormon11-Oct-05 16:49 
AnswerRe: dataadapter fill question Pin
Wjousts12-Oct-05 3:38
Wjousts12-Oct-05 3:38 
GeneralRe: dataadapter fill question Pin
theStorminMormon12-Oct-05 4:17
theStorminMormon12-Oct-05 4:17 
GeneralRe: dataadapter fill question Pin
Wjousts12-Oct-05 7:42
Wjousts12-Oct-05 7:42 
GeneralRe: dataadapter fill question Pin
theStorminMormon14-Oct-05 7:01
theStorminMormon14-Oct-05 7:01 
Questionadminstrator Pin
momoo11-Oct-05 16:47
momoo11-Oct-05 16:47 
AnswerRe: adminstrator Pin
Dave Kreskowiak12-Oct-05 3:50
mveDave Kreskowiak12-Oct-05 3:50 

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.