473,418 Members | 2,386 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,418 software developers and data experts.

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 2177
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

11
by: kiran | last post by:
I am trying to implement a rubber band/image selection script. For that I need to remove the default drag behaviour on an image. I am able to do this in IE but not Netscape. Does any one have a...
1
by: kiran | last post by:
I am trying to implement a rubber band/image selection script. For that I need to remove the default drag behaviour on an image. I am able to do this in IE but not Netscape. Does any one have a...
3
by: NewSun | last post by:
How can i drag a datarow from a datagrid to a other control? e.g. Drag a datarow from a datagrid to a TextBox,Then display one colnumn' value of the datarow . Or Drag a cell's value to a controll...
1
by: Jon Cosby | last post by:
I need an event handler for dragging the cursor on a PictureBox. The existing events only include handlers for dragging and dropping objects over the controls. I'm trying to use the MouseDown and...
0
by: Samuel R. Neff | last post by:
I have a typical TreeView/ListView combo and can drag from the ListView to the TreeView. I'd like to select the TreeView node that is the target of the drag operation as the ListView items are...
0
by: david | last post by:
Yesterday I got a suggestion about the web page layout from Stas. Thanks, Stas. However, I have a problem to drag the existing radio buttons into the table cell. Case: I have a lot of radion...
2
by: vunet.us | last post by:
Hello JavaScript experts, I have a floating div which I drag all over the page. If the page has scrollbars and users drag the floating div to the very top, page scrolls up too. The problem occurs...
0
by: =?Utf-8?B?RGF2ZQ==?= | last post by:
Being you can drag webparts from zone to zone, is there a way to control drag speed while dragging/scrolling up the page? I have a list of webparts that may go beyond the page. If a user wants...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.