Click here to Skip to main content
15,896,118 members
Home / Discussions / C#
   

C#

 
GeneralRe: Open Child Form and threading Pin
0x3c012-Aug-09 4:16
0x3c012-Aug-09 4:16 
GeneralRe: Open Child Form and threading Pin
Saamir12-Aug-09 4:33
Saamir12-Aug-09 4:33 
GeneralRe: Open Child Form and threading Pin
0x3c012-Aug-09 4:49
0x3c012-Aug-09 4:49 
GeneralRe: Open Child Form and threading Pin
Saamir12-Aug-09 5:27
Saamir12-Aug-09 5:27 
GeneralRe: Open Child Form and threading Pin
Dave Kreskowiak12-Aug-09 6:23
mveDave Kreskowiak12-Aug-09 6:23 
GeneralRe: Open Child Form and threading Pin
Saamir12-Aug-09 6:51
Saamir12-Aug-09 6:51 
GeneralRe: Open Child Form and threading Pin
Luc Pattyn12-Aug-09 7:59
sitebuilderLuc Pattyn12-Aug-09 7:59 
QuestionCut,Copy ,Paste Problem... Pin
Rahul DSG12-Aug-09 3:00
Rahul DSG12-Aug-09 3:00 
Private StringBuilder sb=null

private void CutCopyPaste(bool Cut, bool Copy, bool Paste)
{
foreach (Form f in this.MdiChildren)
{
if (f.ContainsFocus)
{
foreach (Control c in f.Controls)
{
if (c.Focused)
{
if (c.GetType() != typeof(Label))
{
if (Cut)
{
sb.Append(c.Text);
c.Text = "";
}
else if (Copy)
sb.Append(c.Text);
else if (Paste)
c.Text = sb.ToString();
break;
}
}
}
}
}
}



private void copyToolStripMenuItem_Click(object sender, EventArgs e)
{
try
{
sb = null;
sb = new StringBuilder();
CutCopyPaste(false, true, false);
}
catch (Exception ex)
{
MessageBox.Show(ex.Message);
}
}

private void pasteToolStripMenuItem_Click(object sender, EventArgs e)
{
try
{
if (sb != null)
CutCopyPaste(false, false, true);
}
catch (Exception ex)
{
MessageBox.Show(ex.Message);
}
}

private void cutToolStripMenuItem_Click(object sender, EventArgs e)
{
try
{
sb = null;
sb = new StringBuilder();
CutCopyPaste(true, false, false);
}
catch (Exception ex)
{
MessageBox.Show(ex.Message);
}
}

It is the complete code for cut copy and paste but if we take textbox inside the container like groupbox,panel etc. its not working ...and i want also include the feature Undo and SelectAll...how can i do this...
AnswerRe: Cut,Copy ,Paste Problem... Pin
ricmil4212-Aug-09 3:46
ricmil4212-Aug-09 3:46 
GeneralRe: Cut,Copy ,Paste Problem... Pin
Rahul DSG12-Aug-09 18:38
Rahul DSG12-Aug-09 18:38 
GeneralRe: Cut,Copy ,Paste Problem... Pin
ricmil4213-Aug-09 3:26
ricmil4213-Aug-09 3:26 
GeneralRe: Cut,Copy ,Paste Problem... Pin
Rahul DSG22-Aug-09 3:11
Rahul DSG22-Aug-09 3:11 
GeneralRe: Cut,Copy ,Paste Problem... Pin
ricmil4224-Aug-09 3:19
ricmil4224-Aug-09 3:19 
GeneralRe: Cut,Copy ,Paste Problem... Pin
Rahul DSG30-Aug-09 18:55
Rahul DSG30-Aug-09 18:55 
AnswerRe: Cut,Copy ,Paste Problem... Pin
Andrew Rissing12-Aug-09 3:47
Andrew Rissing12-Aug-09 3:47 
QuestionConnectionString Problem with MSACCESS Pin
M Riaz Bashir12-Aug-09 2:19
M Riaz Bashir12-Aug-09 2:19 
AnswerRe: ConnectionString Problem with MSACCESS Pin
Mike Ellison12-Aug-09 2:43
Mike Ellison12-Aug-09 2:43 
AnswerRe: ConnectionString Problem with MSACCESS Pin
Luc Pattyn12-Aug-09 2:54
sitebuilderLuc Pattyn12-Aug-09 2:54 
QuestionLimit checkedListBox for maximum values [modified] Pin
bonzaiholding12-Aug-09 2:08
bonzaiholding12-Aug-09 2:08 
AnswerRe: Limit checkedListBox for maximum values Pin
Ashfield12-Aug-09 2:09
Ashfield12-Aug-09 2:09 
GeneralRe: Limit checkedListBox for maximum values Pin
bonzaiholding12-Aug-09 2:11
bonzaiholding12-Aug-09 2:11 
AnswerRe: Limit checkedListBox for maximum values Pin
Alan N12-Aug-09 2:34
Alan N12-Aug-09 2:34 
GeneralRe: Limit checkedListBox for maximum values Pin
bonzaiholding12-Aug-09 2:39
bonzaiholding12-Aug-09 2:39 
Questionbrowse my computer Pin
Vivek Vijayan12-Aug-09 2:02
Vivek Vijayan12-Aug-09 2:02 
AnswerRe: browse my computer Pin
musefan12-Aug-09 2:09
musefan12-Aug-09 2:09 

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.