Click here to Skip to main content
12,998,363 members (60,966 online)
   

C#

 
GeneralRe: data Set Not Coming In GridView Pin
jibesh2-Jan-13 0:02
memberjibesh2-Jan-13 0:02 
GeneralRe: data Set Not Coming In GridView Pin
GugliMugli2-Jan-13 1:27
memberGugliMugli2-Jan-13 1:27 
GeneralRe: data Set Not Coming In GridView Pin
jibesh2-Jan-13 1:29
memberjibesh2-Jan-13 1:29 
AnswerRe: data Set Not Coming In GridView Pin
Richard MacCutchan2-Jan-13 1:47
mvpRichard MacCutchan2-Jan-13 1:47 
GeneralRe: data Set Not Coming In GridView Pin
jibesh2-Jan-13 2:06
memberjibesh2-Jan-13 2:06 
GeneralRe: data Set Not Coming In GridView Pin
GugliMugli2-Jan-13 2:18
memberGugliMugli2-Jan-13 2:18 
GeneralRe: data Set Not Coming In GridView Pin
Richard MacCutchan2-Jan-13 4:15
mvpRichard MacCutchan2-Jan-13 4:15 
QuestionHow to show file association icon,one button and a progress bar on webbrowser control c# Pin
Tridip Bhattacharjee1-Jan-13 6:50
memberTridip Bhattacharjee1-Jan-13 6:50 
i work with webbrowser for showing simple text. i am in situation where i want that when user drag any file on webbrowser control then i want to show a icon for that file and one progressbar and one button programmatically. i manage to show file associated icon ob richtextbox just like using
System.Drawing.Icon.ExtractAssociatedIcon(string filePath)


here is the code for handling file drag drop on richtextbox like below one

public Form1()
    {
        InitializeComponent();
        richTextBox1.AllowDrop = true;
        //richTextBox1.EnableAutoDragDrop = true;
        this.richTextBox1.DragEnter += new DragEventHandler(richTextBox1_DragEnter);
        this.richTextBox1.DragDrop += new DragEventHandler(richTextBox1_DragDrop);
    }

    void richTextBox1_DragEnter(object sender, System.Windows.Forms.DragEventArgs e)
    {
        if ((e.Data.GetDataPresent(DataFormats.FileDrop)))
        {
            e.Effect = DragDropEffects.Copy;
        }
    }
    void richTextBox1_DragDrop(object sender, System.Windows.Forms.DragEventArgs e)
    {
        //Image img = default(Image);
        //img = Image.FromFile(((Array)e.Data.GetData(DataFormats.FileDrop)).GetValue(0).ToString());
        //Clipboard.SetImage(img);

        //this.richTextBox1.SelectionStart = 0;
        //richTextBox1.AppendText("Hello");
        //this.richTextBox1.Paste();

        /*
            Dim img As Image = Image.FromFile(fname)
            Clipboard.SetImage(img)
            RichTextBox1.Paste()
        */

        string strFilePath = ((Array)e.Data.GetData(DataFormats.FileDrop)).GetValue(0).ToString();
        Icon oIcon= System.Drawing.Icon.ExtractAssociatedIcon(strFilePath);
        Bitmap myBitmap = new Bitmap(oIcon.ToBitmap());
        Clipboard.SetDataObject(myBitmap);
        DataFormats.Format myFormat = DataFormats.GetFormat(DataFormats.Bitmap);
        richTextBox1.Text = "";
        if (richTextBox1.CanPaste(myFormat))
        {
            richTextBox1.Paste(myFormat);
            richTextBox1.AppendText("   " + System.IO.Path.GetFileName(strFilePath));
        }
        else
        {
            MessageBox.Show("The data format that you attempted site" +
              " is not supportedby this control.");
        }
    }


here is one image link for your visualization purpose http://i.stack.imgur.com/5oRkt.png
i want to accomplish the same thing for webbrowser control for handing file drag drop and want to show one file associated icon and one progressbar and one button. please guide me with sample code for doing with webbrowser control. thanks
tbhattacharjee

Question"sendkeys" does not work KnightOnline Pin
ismail2031-Dec-12 3:09
memberismail2031-Dec-12 3:09 
AnswerRe: "sendkeys" does not work KnightOnline Pin
Dave Kreskowiak31-Dec-12 3:28
mvpDave Kreskowiak31-Dec-12 3:28 
GeneralRe: "sendkeys" does not work KnightOnline Pin
ismail2031-Dec-12 3:42
memberismail2031-Dec-12 3:42 
GeneralRe: "sendkeys" does not work KnightOnline Pin
Dave Kreskowiak31-Dec-12 5:38
mvpDave Kreskowiak31-Dec-12 5:38 
GeneralRe: "sendkeys" does not work KnightOnline Pin
ismail2031-Dec-12 6:30
memberismail2031-Dec-12 6:30 
GeneralRe: "sendkeys" does not work KnightOnline Pin
Dave Kreskowiak31-Dec-12 6:47
mvpDave Kreskowiak31-Dec-12 6:47 
GeneralRe: "sendkeys" does not work KnightOnline Pin
ismail2031-Dec-12 7:35
memberismail2031-Dec-12 7:35 
GeneralRe: "sendkeys" does not work KnightOnline Pin
Marcus Kramer31-Dec-12 7:53
memberMarcus Kramer31-Dec-12 7:53 
GeneralRe: "sendkeys" does not work KnightOnline Pin
Dave Kreskowiak31-Dec-12 7:59
mvpDave Kreskowiak31-Dec-12 7:59 
GeneralRe: "sendkeys" does not work KnightOnline Pin
Pete O'Hanlon31-Dec-12 9:01
protectorPete O'Hanlon31-Dec-12 9:01 
GeneralRe: "sendkeys" does not work KnightOnline Pin
harold aptroot31-Dec-12 12:40
memberharold aptroot31-Dec-12 12:40 
AnswerRe: "sendkeys" does not work KnightOnline Pin
Abhinav S1-Jan-13 4:38
mvpAbhinav S1-Jan-13 4:38 
AnswerRe: "sendkeys" does not work KnightOnline Pin
ProgramFOX1-Jan-13 5:52
member ProgramFOX1-Jan-13 5:52 
AnswerIt's a game :) Pin
Eddy Vluggen1-Jan-13 6:01
memberEddy Vluggen1-Jan-13 6:01 
GeneralRe: It's a game :) Pin
ProgramFOX1-Jan-13 6:05
member ProgramFOX1-Jan-13 6:05 
Generalto access latitudes and longitudes from database Pin
naveen 201230-Dec-12 22:28
membernaveen 201230-Dec-12 22:28 
GeneralRe: to access latitudes and longitudes from database Pin
OriginalGriff30-Dec-12 23:22
mvpOriginalGriff30-Dec-12 23:22 

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.


Advertise | Privacy | Mobile
Web01 | 2.8.170622.1 | Last Updated 23 Jun 2017
Copyright © CodeProject, 1999-2017
All Rights Reserved. Terms of Service
Layout: fixed | fluid