468,250 Members | 1,619 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

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

Drag-Drop stops working after one or two days

I have a VS.NET windows application which use drag-drop feather. It works
fine when application start, but stops working after application run one or
two days. The application is related to Video process, CPU/Memory extensive.

The drag-drop is in a new windows form. It drags from TreeView Control to
other control in the same form. It cannot trigger ItemDrag event of TreeView
after drag-drop feather die.

Can you give me any idea? Thanks.

Nov 17 '05 #1
4 1914
Qingdong,

Without seeing the code, it is hard to say. Chances are there is some
sort of exception being thrown, but because all of the drag/drop actions are
performed in event handlers, the exception is swallowed.

What you want to do is wrap all of your event handling code related to
drag/drop in try/catch handlers, and see if an exception is thrown. Once
you find out where it is thrown, you can work from there to figure out what
the problem is.

Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"Qingdong Z." <Qi*******@discussions.microsoft.com> wrote in message
news:C3**********************************@microsof t.com...
I have a VS.NET windows application which use drag-drop feather. It works
fine when application start, but stops working after application run one
or
two days. The application is related to Video process, CPU/Memory
extensive.

The drag-drop is in a new windows form. It drags from TreeView Control to
other control in the same form. It cannot trigger ItemDrag event of
TreeView
after drag-drop feather die.

Can you give me any idea? Thanks.

Nov 17 '05 #2
Nicholas,

Here is the code:

Private Sub tvMapItems_ItemDrag(ByVal sender As Object, ByVal e As
System.Windows.Forms.ItemDragEventArgs) Handles tvMapItems.ItemDrag
If e.Item.GetType.Name = "FacilityMapNode" Then
DoDragDrop(e.Item, DragDropEffects.Move)
End If
End Sub

Private Sub picMap_DragEnter(ByVal sender As Object, ByVal e As
System.Windows.Forms.DragEventArgs) Handles picMap.DragEnter
e.Effect = DragDropEffects.Move
End Sub

Private Sub picMap_DragDrop(ByVal sender As Object, ByVal e As
System.Windows.Forms.DragEventArgs) Handles picMap.DragDrop
...
End Sub
"Nicholas Paldino [.NET/C# MVP]" wrote:
Qingdong,

Without seeing the code, it is hard to say. Chances are there is some
sort of exception being thrown, but because all of the drag/drop actions are
performed in event handlers, the exception is swallowed.

What you want to do is wrap all of your event handling code related to
drag/drop in try/catch handlers, and see if an exception is thrown. Once
you find out where it is thrown, you can work from there to figure out what
the problem is.

Hope this helps.

Nov 17 '05 #3
That's the thing, without seeing what goes on in picMap_DragDrop, there
is nothing that can be determined.

I think that you should place try/catch blocks in your event handlers,
and log if there are exceptions.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"Qingdong Z." <Qi*******@discussions.microsoft.com> wrote in message
news:BF**********************************@microsof t.com...
Nicholas,

Here is the code:

Private Sub tvMapItems_ItemDrag(ByVal sender As Object, ByVal e As
System.Windows.Forms.ItemDragEventArgs) Handles tvMapItems.ItemDrag
If e.Item.GetType.Name = "FacilityMapNode" Then
DoDragDrop(e.Item, DragDropEffects.Move)
End If
End Sub

Private Sub picMap_DragEnter(ByVal sender As Object, ByVal e As
System.Windows.Forms.DragEventArgs) Handles picMap.DragEnter
e.Effect = DragDropEffects.Move
End Sub

Private Sub picMap_DragDrop(ByVal sender As Object, ByVal e As
System.Windows.Forms.DragEventArgs) Handles picMap.DragDrop
...
End Sub
"Nicholas Paldino [.NET/C# MVP]" wrote:
Qingdong,

Without seeing the code, it is hard to say. Chances are there is
some
sort of exception being thrown, but because all of the drag/drop actions
are
performed in event handlers, the exception is swallowed.

What you want to do is wrap all of your event handling code related
to
drag/drop in try/catch handlers, and see if an exception is thrown. Once
you find out where it is thrown, you can work from there to figure out
what
the problem is.

Hope this helps.

Nov 17 '05 #4
Nicholas,

I think the drop event is never triggered, because the drag event should
have been fired first. For what ever reason, the tvMapItems_ItemDrag was not
fired, because there is no drag-move effect.

"Nicholas Paldino [.NET/C# MVP]" wrote:
That's the thing, without seeing what goes on in picMap_DragDrop, there
is nothing that can be determined.

I think that you should place try/catch blocks in your event handlers,
and log if there are exceptions.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"Qingdong Z." <Qi*******@discussions.microsoft.com> wrote in message
news:BF**********************************@microsof t.com...
Nicholas,

Here is the code:

Private Sub tvMapItems_ItemDrag(ByVal sender As Object, ByVal e As
System.Windows.Forms.ItemDragEventArgs) Handles tvMapItems.ItemDrag
If e.Item.GetType.Name = "FacilityMapNode" Then
DoDragDrop(e.Item, DragDropEffects.Move)
End If
End Sub

Private Sub picMap_DragEnter(ByVal sender As Object, ByVal e As
System.Windows.Forms.DragEventArgs) Handles picMap.DragEnter
e.Effect = DragDropEffects.Move
End Sub

Private Sub picMap_DragDrop(ByVal sender As Object, ByVal e As
System.Windows.Forms.DragEventArgs) Handles picMap.DragDrop
...
End Sub
"Nicholas Paldino [.NET/C# MVP]" wrote:
Qingdong,

Without seeing the code, it is hard to say. Chances are there is
some
sort of exception being thrown, but because all of the drag/drop actions
are
performed in event handlers, the exception is swallowed.

What you want to do is wrap all of your event handling code related
to
drag/drop in try/catch handlers, and see if an exception is thrown. Once
you find out where it is thrown, you can work from there to figure out
what
the problem is.

Hope this helps.


Nov 17 '05 #5

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

1 post views Thread by Jon Cosby | last post: by
2 posts views Thread by vunet.us | last post: by
reply views Thread by =?Utf-8?B?RGF2ZQ==?= | last post: by
reply views Thread by NPC403 | last post: by
reply views Thread by zattat | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.