Click here to Skip to main content
15,890,282 members
Home / Discussions / C#
   

C#

 
AnswerRe: Creating a completely unclickable WebBrowser Pin
BillWoodruff24-Jul-09 5:14
professionalBillWoodruff24-Jul-09 5:14 
QuestionMCI Video Playback - How to get MPEG-4 to work Pin
shultas24-Jul-09 3:22
shultas24-Jul-09 3:22 
Questiontimer control in C# Pin
wasifmuneer24-Jul-09 2:59
wasifmuneer24-Jul-09 2:59 
AnswerRe: timer control in C# Pin
Manas Bhardwaj24-Jul-09 3:03
professionalManas Bhardwaj24-Jul-09 3:03 
GeneralRe: timer control in C# Pin
wasifmuneer24-Jul-09 3:05
wasifmuneer24-Jul-09 3:05 
GeneralRe: timer control in C# Pin
Manas Bhardwaj24-Jul-09 3:09
professionalManas Bhardwaj24-Jul-09 3:09 
GeneralRe: timer control in C# Pin
wasifmuneer24-Jul-09 3:10
wasifmuneer24-Jul-09 3:10 
QuestionCopy text to clipboard Pin
jaro1624-Jul-09 2:00
jaro1624-Jul-09 2:00 
Hi, I want to copy selected text (e.g. from Firefox) to clipboard using hot key.

This is part of my code:
switch (m.Msg)
{
    case WM_HOTKEY:
        if ((short)m.WParam == hotkey.HotkeyID)
        {
            Clipboard.Clear();
            SendKeys.SendWait("^c");
            SendKeys.Flush();

            if (Clipboard.ContainsText())
            {
                string text = Clipboard.GetText(TextDataFormat.UnicodeText);

                RichTextBox rtb = new RichTextBox();
                rtb.Text = text;
                rtb.SelectAll();
                rtb.SelectionFont = new Font(new FontFamily("Verdana"), 9.0f, FontStyle.Regular);

                Clipboard.SetText(rtb.Rtf, TextDataFormat.Rtf);

            }
            else
            {
                MessageBox.Show("Error!");
            }

        }
        break;
    default:
        base.WndProc(ref m);
        break;
}


When I use my application first time it is working fine, but later I recive message "Error".

Can anybody help me solve this problem?

Thanks...
AnswerRe: Copy text to clipboard Pin
Abhijit Jana24-Jul-09 2:05
professionalAbhijit Jana24-Jul-09 2:05 
AnswerRe: Copy text to clipboard [modified] Pin
musefan24-Jul-09 2:11
musefan24-Jul-09 2:11 
AnswerRe: Copy text to clipboard Pin
Luc Pattyn24-Jul-09 4:07
sitebuilderLuc Pattyn24-Jul-09 4:07 
GeneralRe: Copy text to clipboard Pin
jaro1624-Jul-09 6:03
jaro1624-Jul-09 6:03 
Questiongetting timeout expired error Pin
venu65624-Jul-09 1:49
venu65624-Jul-09 1:49 
RantRe: getting timeout expired error Pin
musefan24-Jul-09 2:08
musefan24-Jul-09 2:08 
AnswerRe: getting timeout expired error Pin
MumbleB24-Jul-09 2:46
MumbleB24-Jul-09 2:46 
AnswerRe: getting timeout expired error Pin
Dave Kreskowiak24-Jul-09 4:08
mveDave Kreskowiak24-Jul-09 4:08 
Answer1 lac = 100,000 : Re: getting timeout expired error Pin
BillWoodruff24-Jul-09 5:19
professionalBillWoodruff24-Jul-09 5:19 
QuestionInresponsive program during an Active Directory search. Pin
Hardus Lombaard24-Jul-09 1:42
Hardus Lombaard24-Jul-09 1:42 
AnswerRe: Inresponsive program during an Active Directory search. Pin
musefan24-Jul-09 2:02
musefan24-Jul-09 2:02 
AnswerRe: Inresponsive program during an Active Directory search. Pin
Abhijit Jana24-Jul-09 2:09
professionalAbhijit Jana24-Jul-09 2:09 
Questionconversion a jpg image in to 16 bit Pin
shekhar25839524-Jul-09 1:12
shekhar25839524-Jul-09 1:12 
QuestionDirectUIHWND Pin
Satish Pai24-Jul-09 0:17
Satish Pai24-Jul-09 0:17 
AnswerRe: DirectUIHWND Pin
stancrm24-Jul-09 0:32
stancrm24-Jul-09 0:32 
QuestionHow to use bytes in bytes buffer? Pin
Member 474292223-Jul-09 23:33
Member 474292223-Jul-09 23:33 
AnswerRe: How to use bytes in bytes buffer? Pin
DaveyM6923-Jul-09 23:39
professionalDaveyM6923-Jul-09 23:39 

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.