Click here to Skip to main content
15,886,833 members
Home / Discussions / C#
   

C#

 
GeneralRe: data Set Not Coming In GridView Pin
Jibesh2-Jan-13 0:02
professionalJibesh2-Jan-13 0:02 
GeneralRe: data Set Not Coming In GridView Pin
GugliMugli2-Jan-13 1:27
GugliMugli2-Jan-13 1:27 
GeneralRe: data Set Not Coming In GridView Pin
Jibesh2-Jan-13 1:29
professionalJibesh2-Jan-13 1:29 
AnswerRe: data Set Not Coming In GridView Pin
Richard MacCutchan2-Jan-13 1:47
mveRichard MacCutchan2-Jan-13 1:47 
GeneralRe: data Set Not Coming In GridView Pin
Jibesh2-Jan-13 2:06
professionalJibesh2-Jan-13 2:06 
GeneralRe: data Set Not Coming In GridView Pin
GugliMugli2-Jan-13 2:18
GugliMugli2-Jan-13 2:18 
GeneralRe: data Set Not Coming In GridView Pin
Richard MacCutchan2-Jan-13 4:15
mveRichard 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
professionalTridip 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
C#
System.Drawing.Icon.ExtractAssociatedIcon(string filePath)


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

C#
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
ismail2031-Dec-12 3:09 
AnswerRe: "sendkeys" does not work KnightOnline Pin
Dave Kreskowiak31-Dec-12 3:28
mveDave Kreskowiak31-Dec-12 3:28 
GeneralRe: "sendkeys" does not work KnightOnline Pin
ismail2031-Dec-12 3:42
ismail2031-Dec-12 3:42 
GeneralRe: "sendkeys" does not work KnightOnline Pin
Dave Kreskowiak31-Dec-12 5:38
mveDave Kreskowiak31-Dec-12 5:38 
GeneralRe: "sendkeys" does not work KnightOnline Pin
ismail2031-Dec-12 6:30
ismail2031-Dec-12 6:30 
GeneralRe: "sendkeys" does not work KnightOnline Pin
Dave Kreskowiak31-Dec-12 6:47
mveDave Kreskowiak31-Dec-12 6:47 
GeneralRe: "sendkeys" does not work KnightOnline Pin
ismail2031-Dec-12 7:35
ismail2031-Dec-12 7:35 
GeneralRe: "sendkeys" does not work KnightOnline Pin
fjdiewornncalwe31-Dec-12 7:53
professionalfjdiewornncalwe31-Dec-12 7:53 
GeneralRe: "sendkeys" does not work KnightOnline Pin
Dave Kreskowiak31-Dec-12 7:59
mveDave Kreskowiak31-Dec-12 7:59 
GeneralRe: "sendkeys" does not work KnightOnline Pin
Pete O'Hanlon31-Dec-12 9:01
mvePete O'Hanlon31-Dec-12 9:01 
GeneralRe: "sendkeys" does not work KnightOnline Pin
harold aptroot31-Dec-12 12:40
harold aptroot31-Dec-12 12:40 
AnswerRe: "sendkeys" does not work KnightOnline Pin
Abhinav S1-Jan-13 4:38
Abhinav S1-Jan-13 4:38 
AnswerRe: "sendkeys" does not work KnightOnline Pin
Thomas Daniels1-Jan-13 5:52
mentorThomas Daniels1-Jan-13 5:52 
AnswerIt's a game :) Pin
Eddy Vluggen1-Jan-13 6:01
professionalEddy Vluggen1-Jan-13 6:01 
GeneralRe: It's a game :) Pin
Thomas Daniels1-Jan-13 6:05
mentorThomas Daniels1-Jan-13 6:05 
Generalto access latitudes and longitudes from database Pin
naveen 201230-Dec-12 22:28
naveen 201230-Dec-12 22:28 
GeneralRe: to access latitudes and longitudes from database Pin
OriginalGriff30-Dec-12 23:22
mveOriginalGriff30-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.