EDN Admin
Well-known member
hi, on win7. Ive noticed that if i double click a label, the text of that label appears in the clipboard. what to do? how to fix?
Ive found a solution (http://www.eggheadcafe.com/software/aspnet/32231136/-double-click-label-an.aspx) like this:class MyLabel:Label
{
int WM_GETTEXT = 0xD;
int WM_LBUTTONDBLCLK = 0x203;
bool doubleclickflag = false;
protected override void WndProc(ref Message m)
{
if (m.Msg == WM_LBUTTONDBLCLK)
{
doubleclickflag = true;
}
if (m.Msg == WM_GETTEXT && doubleclickflag)
{
doubleclickflag = false;
return;
}
base.WndProc(ref m);
}
}
but still there is a small problem:
no data appears in the clipboard but the clipboard content is cleared (clipboard is empty)
View the full article
Ive found a solution (http://www.eggheadcafe.com/software/aspnet/32231136/-double-click-label-an.aspx) like this:class MyLabel:Label
{
int WM_GETTEXT = 0xD;
int WM_LBUTTONDBLCLK = 0x203;
bool doubleclickflag = false;
protected override void WndProc(ref Message m)
{
if (m.Msg == WM_LBUTTONDBLCLK)
{
doubleclickflag = true;
}
if (m.Msg == WM_GETTEXT && doubleclickflag)
{
doubleclickflag = false;
return;
}
base.WndProc(ref m);
}
}
but still there is a small problem:
no data appears in the clipboard but the clipboard content is cleared (clipboard is empty)
View the full article