J
johnxsun
Hello,
I am having a problem with set AllowDrop from a callback function for
any types of control boxes, ie. ListView. The following is the example
code that creates the problem. The listView1.AllowDrop never get set
and there is no error or warning as well. Also, if there is any code
after the line "listView1.AllowDrop = false;" will never get excuted.
It seems only happen to the AllowDrop property, others, such as color,
Enabled, are fine.
I appreciate if anybody can help me out here.
Thanks.
John
-------------------------------------------------------------------------------------------
public delegate void ipcEventCallback();
public static ipcEventCallback ipcEventHandler;
private void Form1_Load(object sender, System.EventArgs e)
{
// Init ipcEventCallback interface
ipcEventHandler = new ipcEventCallback(IpcEventHandler);
}
void IpcEventHandler()
{
listView1.AllowDrop = false;
}
private void button1_Click(object sender, System.EventArgs e)
{
ipcEventHandler.BeginInvoke(null, null);
}
-------------------------------------------------------------------------------------------
I am having a problem with set AllowDrop from a callback function for
any types of control boxes, ie. ListView. The following is the example
code that creates the problem. The listView1.AllowDrop never get set
and there is no error or warning as well. Also, if there is any code
after the line "listView1.AllowDrop = false;" will never get excuted.
It seems only happen to the AllowDrop property, others, such as color,
Enabled, are fine.
I appreciate if anybody can help me out here.
Thanks.
John
-------------------------------------------------------------------------------------------
public delegate void ipcEventCallback();
public static ipcEventCallback ipcEventHandler;
private void Form1_Load(object sender, System.EventArgs e)
{
// Init ipcEventCallback interface
ipcEventHandler = new ipcEventCallback(IpcEventHandler);
}
void IpcEventHandler()
{
listView1.AllowDrop = false;
}
private void button1_Click(object sender, System.EventArgs e)
{
ipcEventHandler.BeginInvoke(null, null);
}
-------------------------------------------------------------------------------------------