Sign in to follow this  
Followers 0
blakel

Problem with FileOpenDialog and drag n drop together

3 posts in this topic

I have written a script to allow the user to choose between FileOpenDialog and drag and drop as they see fit.

An interesting problem occurred when a co-worker tested it. He hit the browse button, FileOpenDialog opened and he dragged files from the FileOpenDialog to the edit control. While the FileOpenDialog is open, the script is paused and cannot react to the drag events, which makes the results unpredicable.

Possible solutions:

1. Disable drag n drop on the main window before FileOpenDialog is called, and then re-enable after it returns.

2. Disable drag n drop on each control and re-enable. (problem: there are a lot of them.)

3. Disable drag n drop or FileOpenDialog all together.

Obviously the first one is the most preferable, only 2 statements, but I cannot find the equivalent of GUICtrlSetState to work on the main window.

The second will be a lot of work.

Does anyone any better possible solutions?

Does anyone have a good way to implement the above?

Thanks

Share this post


Link to post
Share on other sites



This might work:

create a second window and never make it visible. then use guiswitch to make it the window to receive messages while the file dialog is open.

any thoughts?

Share this post


Link to post
Share on other sites

Any solution for this issue. Please let me lmpw if u get the solution. If u provide code then it is great full !

Thanks

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0