By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
425,600 Members | 1,683 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 425,600 IT Pros & Developers. It's quick & easy.

C# Mouse Disable Event itz urgent plzzzzzzzzzzzz

P: 14
Hi,

i am new to C#,

i have a multiselection treeview, where if i select a nodes with ctrl and shift corresponding nodes will be copied to another treenode,

i want to unselect the childnode selection with ctrl and shift if parent node is selected.

i think of disablin the mouse click event inside that treenode if parent node is selected?

private void treeViewMS1_AfterSelect(object sender, TreeViewEventArgs e)
{

MyKeyEvent kEv = new MyKeyEvent();

bool kControl2 = (ModifierKeys == Keys.Control);
bool kShift2 = (ModifierKeys == Keys.Shift);
bool mClick = (MouseButtons==MouseButtons.Left);
// bool parent =IsP


if (e.Node.Text == "WeldDataFile")
{

if ((kControl2) && (mClick))
{
// OnKeyAction(this, kEv);
//Here i have to disable mouse event till i copy that selected node to another treeview
}
else if ((kShift2) && (mClick))
{
//OnKeyAction(this, kEv);
//Here i have to disable mouse event till i copy that selected node to another treeview
}
}
}

Can anybody plz help me in this regards, its urgent
Feb 29 '08 #1
Share this Question
Share on Google+
1 Reply


epots9
Expert 100+
P: 1,351
Moved to the .NET Forums where the resident experts can better assist you. Please provide some code to show the problem, if no code is provided it will be assumed that this is a homework question and here at TSDN we Do Not Answer Homework Questions.

**Moved form Programming Challenges.
Feb 29 '08 #2

Post your reply

Sign in to post your reply or Sign up for a free account.