Click here to Skip to main content
15,897,146 members
Home / Discussions / C#
   

C#

 
AnswerRe: remoting server in console app? Pin
Blake Coverett29-Sep-03 23:09
Blake Coverett29-Sep-03 23:09 
GeneralRe: remoting server in console app? Pin
Roger Alsing29-Sep-03 23:31
Roger Alsing29-Sep-03 23:31 
GeneralControl Key Combo Pin
deanoA29-Sep-03 20:40
deanoA29-Sep-03 20:40 
GeneralRe: Control Key Combo Pin
Heath Stewart30-Sep-03 2:16
protectorHeath Stewart30-Sep-03 2:16 
QuestionPicture & Streamer : closed or not? Pin
Stephane David29-Sep-03 20:24
Stephane David29-Sep-03 20:24 
GeneralCallling a dll in COM+ Component Pin
Member 83727229-Sep-03 20:16
Member 83727229-Sep-03 20:16 
GeneralSave a picture Pin
Birdy29-Sep-03 18:43
Birdy29-Sep-03 18:43 
GeneralRe: Save a picture Pin
J. Dunlap29-Sep-03 19:20
J. Dunlap29-Sep-03 19:20 
Birdy wrote:
how to save a picture in the datadabses

Probably, you'd be best storing the filename in the DB, and storing the images themselves in a different folder. Just my 2c.


Birdy wrote:
i would be greatfull if u ppl tell me how to load picture in a picture box by using file open dialog

Here's for starters (not tested, but should work):
void OpenBitmap()
{
    OpenFileDialog dlg=new OpenFileDialog();

    //get available image format decoders, and create a filter string from them
    //TODO: Filter out metafile formats!
    ImageCodecInfo[] decoders=System.Drawing.Imaging.ImageCodecInfo.GetImageDecoders();
    string allfiltersname="All Supported Bitmap Files (";
    string allfilters="";
    ArrayList filters=new ArrayList();
    for(int i=0;i<decoders.GetUpperBound(0);i++)
    {
        allfilters+=(i==0?"":";")+decoders[i].FilenameExtension;
        filters.Add(decoders[i].CodecName+ 
                " (" + decoders[i].FilenameExtension + ")|" + 
                decoders[i].FilenameExtension);
    }
    dlg.Filter=allfiltersname+allfilters+"|"+allfilters+"|"+
                String.Join("|",((string[])(filters.ToArray(typeof(string)))));
    
    
    dlg.Title="Open a Bitmap";
    dlg.ShowDialog((IWin32Window)this);
    
    if(dlg.FileName!="")
    {
        Bitmap b=null;
        try{b = new Bitmap(dlg.FileName);}
        catch(Exception e)
        {
                MessageBox.Show(
                        "The bitmap could not be loaded, because there was an error:\r\n\r\n" + 
                        e.ToString(),
                        "Error Loading Bitmap!",
                        MessageBoxButtons.OK,MessageBoxIcon.Error);
        }
        if(b!=null)
        {
            
            //TODO: set the PictureBox's image property
        }
        
    }
}



"Blessed are the peacemakers, for they shall be called sons of God." - Jesus

"You must be the change you wish to see in the world." - Mahatma Gandhi







GeneralCopy file to server Pin
Anonymous29-Sep-03 10:17
Anonymous29-Sep-03 10:17 
GeneralRe: Copy file to server Pin
Daniel M. Edwards29-Sep-03 10:20
Daniel M. Edwards29-Sep-03 10:20 
GeneralTaskbar window button Pin
blade29-Sep-03 9:02
blade29-Sep-03 9:02 
QuestionWhich NUD called this MenuItem? Pin
james-cxx29-Sep-03 8:52
james-cxx29-Sep-03 8:52 
AnswerRe: Which NUD called this MenuItem? Pin
james-cxx29-Sep-03 13:16
james-cxx29-Sep-03 13:16 
Generalpostioning of printer dialog Pin
trythat29-Sep-03 8:06
trythat29-Sep-03 8:06 
GeneralRe: postioning of printer dialog Pin
Heath Stewart29-Sep-03 9:01
protectorHeath Stewart29-Sep-03 9:01 
Generaltoolbar rightclick Pin
trythat29-Sep-03 8:03
trythat29-Sep-03 8:03 
GeneralRe: toolbar rightclick Pin
Heath Stewart29-Sep-03 8:43
protectorHeath Stewart29-Sep-03 8:43 
GeneralGDI+ Dashed line Pin
gadgetfbi29-Sep-03 7:35
gadgetfbi29-Sep-03 7:35 
GeneralRe: GDI+ Dashed line Pin
Heath Stewart29-Sep-03 9:04
protectorHeath Stewart29-Sep-03 9:04 
GeneralRe: GDI+ Dashed line Pin
Daniel M. Edwards29-Sep-03 10:25
Daniel M. Edwards29-Sep-03 10:25 
GeneralRe: GDI+ Dashed line Pin
gadgetfbi29-Sep-03 12:16
gadgetfbi29-Sep-03 12:16 
GeneralJPEG2000 Pin
gicio29-Sep-03 7:02
gicio29-Sep-03 7:02 
GeneralImport CSV File to MS Access Pin
raysot29-Sep-03 6:21
raysot29-Sep-03 6:21 
GeneralRe: Import CSV File to MS Access Pin
Steve McLenithan29-Sep-03 7:29
Steve McLenithan29-Sep-03 7:29 
GeneralReading StandardOutput Pin
Wjousts29-Sep-03 4:57
Wjousts29-Sep-03 4:57 

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.