Click here to Skip to main content
14,387,739 members
Rate this:
Please Sign up or sign in to vote.
See more:
Hi
We have a VB.2017 Windows Form Desktop app that has been running for over a year but we noticed that when running on our client's machine, Windows 7 Pro, that the main form DragDrop event is entered twice. The 2nd time the first event is still in control based on our logs.

This does NOT happen on the development machine which is Windows 10 Enterprise. Not in the IDE nor when executed from the exe in the deployed deployed folder.

Client log shows.

Main Form DragDrop Event entered first time file name passed
Main Form DragDrop Event entered Second Time no file names passed so exits event
filenamesAR = e.Data.GetData(DataFormats.FileDrop) is nothing then it exists

--- code gets a Object reference not set to an instance of an object but not sure where ---
Main Form DragDrop Event Exit
Main Form DragDrop Event Exit

This is impossible to debug if the events are invoked differently.

So the question is why is the event getting invoked twice on the client's Windows 7 machine but not on the development Windows 10 machine.

Any help is appreciated. Thanks

What I have tried:

Break Points, Log Entries and anything else that I can think. Running it on a Windows 7 machine here is extremely difficult due to the other requirements on the App.
Posted
Updated 20-Jun-19 4:55am

1 solution

Rate this:
Please Sign up or sign in to vote.

Solution 1

Try changing the mouse on the Win7 machine: when microswitches get old, they can do some very strange things, including bounce on release - which could conceivably cause the drop event to fire twice.

If that doesn't help, you will need to get it running on Win7 under the debugger to stand a chance of finding out what is going on.
   

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month



CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100