Click here to Skip to main content
15,920,508 members
Home / Discussions / C#
   

C#

 
GeneralRe: blob data from mysql Pin
benjamin yap11-Jun-09 7:46
benjamin yap11-Jun-09 7:46 
Thanks i got it working.

Btw, i have 15 buttons name btn1, btn2, btn3 etc etc

i have 15 images as well in my database. How do i get those images to be on each button.

private void getMainCommImages()
{
    Byte[] image = null;
    MySqlDataReader reader = db.getMainCommImages();
    MemoryStream ms;
    Image returnImage;
    while (reader.Read())
    {
        image = new Byte[(reader.GetBytes(0,0,null,0,int.MaxValue))];
        reader.GetBytes(0, 0, image, 0, image.Length);

        ms = new MemoryStream(image);
        returnImage = Image.FromStream(ms);
        for (int i = 1; i < 15; i++)
        {
             btn[i].Image = returnImage;
        }
    }
    reader.Close();
    db.Close();
}

something wrong with this part btn[i].Image = returnImage;
GeneralRe: blob data from mysql Pin
0x3c011-Jun-09 8:17
0x3c011-Jun-09 8:17 
GeneralRe: blob data from mysql Pin
benjamin yap11-Jun-09 8:24
benjamin yap11-Jun-09 8:24 
GeneralRe: blob data from mysql Pin
benjamin yap11-Jun-09 8:41
benjamin yap11-Jun-09 8:41 
QuestionC #define to C# constant converstion tool Pin
mbender11-Jun-09 4:44
mbender11-Jun-09 4:44 
AnswerRe: C #define to C# constant converstion tool Pin
saurabh sahay11-Jun-09 5:24
saurabh sahay11-Jun-09 5:24 
AnswerRe: C #define to C# constant converstion tool Pin
PIEBALDconsult11-Jun-09 6:22
mvePIEBALDconsult11-Jun-09 6:22 
GeneralRe: C #define to C# constant converstion tool Pin
mbender11-Jun-09 7:07
mbender11-Jun-09 7:07 
GeneralRe: C #define to C# constant converstion tool Pin
PIEBALDconsult11-Jun-09 7:33
mvePIEBALDconsult11-Jun-09 7:33 
GeneralRe: C #define to C# constant converstion tool Pin
mbender11-Jun-09 7:40
mbender11-Jun-09 7:40 
GeneralRe: C #define to C# constant converstion tool [modified] Pin
PIEBALDconsult11-Jun-09 8:24
mvePIEBALDconsult11-Jun-09 8:24 
GeneralRe: C #define to C# constant converstion tool Pin
mbender16-Jun-09 7:02
mbender16-Jun-09 7:02 
AnswerRe: C #define to C# constant converstion tool Pin
Rob Philpott11-Jun-09 6:27
Rob Philpott11-Jun-09 6:27 
QuestionMultiple Default buttons on a form dependant on the situation Pin
Mustafa Ismail Mustafa11-Jun-09 4:44
Mustafa Ismail Mustafa11-Jun-09 4:44 
AnswerRe: Multiple Default buttons on a form dependant on the situation Pin
0x3c011-Jun-09 4:55
0x3c011-Jun-09 4:55 
GeneralRe: Multiple Default buttons on a form dependant on the situation Pin
Mustafa Ismail Mustafa11-Jun-09 6:13
Mustafa Ismail Mustafa11-Jun-09 6:13 
GeneralRe: Multiple Default buttons on a form dependant on the situation Pin
Henry Minute11-Jun-09 6:18
Henry Minute11-Jun-09 6:18 
GeneralRe: Multiple Default buttons on a form dependant on the situation Pin
Mustafa Ismail Mustafa11-Jun-09 6:24
Mustafa Ismail Mustafa11-Jun-09 6:24 
GeneralRe: Multiple Default buttons on a form dependant on the situation Pin
Henry Minute11-Jun-09 6:30
Henry Minute11-Jun-09 6:30 
GeneralRe: Multiple Default buttons on a form dependant on the situation Pin
Mustafa Ismail Mustafa11-Jun-09 6:36
Mustafa Ismail Mustafa11-Jun-09 6:36 
GeneralRe: Multiple Default buttons on a form dependant on the situation Pin
0x3c011-Jun-09 6:25
0x3c011-Jun-09 6:25 
GeneralRe: Multiple Default buttons on a form dependant on the situation Pin
Mustafa Ismail Mustafa11-Jun-09 6:30
Mustafa Ismail Mustafa11-Jun-09 6:30 
GeneralRe: Multiple Default buttons on a form dependant on the situation Pin
0x3c011-Jun-09 6:35
0x3c011-Jun-09 6:35 
AnswerRe: Multiple Default buttons on a form dependant on the situation Pin
S. Senthil Kumar11-Jun-09 7:38
S. Senthil Kumar11-Jun-09 7:38 
Questionxp sidebar in .net2005 Pin
gadeypavan11-Jun-09 4:32
gadeypavan11-Jun-09 4:32 

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.