468,283 Members | 1,929 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,283 developers. It's quick & easy.

C# Mouse Disable Event itz urgent plzzzzzzzzzzzz

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
1 3913
epots9
1,351 Expert 1GB
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.

Similar topics

4 posts views Thread by Seen | last post: by
reply views Thread by robson_king | last post: by
7 posts views Thread by Steve | last post: by
1 post views Thread by =?Utf-8?B?bGpsZXZlbmQy?= | last post: by
22 posts views Thread by schneider | last post: by
reply views Thread by zattat | last post: by
2 posts views Thread by MrBee | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.