473,405 Members | 2,415 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,405 software developers and data experts.

Open File Dialog and Picturebox Click Event

Hello,
Not sure if anyone else has seen this bug, but I have a form where
the entire form is covered with a picturebox. The picturebox has a
mouseup event. I also have an open file dialog for loading images into
the picturebox. If you double click the file you want to open in the
open file dialog, it somehow interperets one of the clicks as a mouseup
on the picturebox and fires the mouseup event for the picturebox. How
can I get around this? I tried disabling the picturebox before loading
the dialog and enabling it after I complete loading the file, but it
still fires the mouseup event.

Any thoughts would be a big help!

Nov 21 '05 #1
2 6083
Hi I can repoduce the same behavior, but do you open your open file dialog
from the click event of your picturebox? If that's the case it's expected
behavior for the mouseup to fire after the open file dialog is closed.
Because you click the picturebox hence the click event gets raised but
whenever you click on the picturebox there's also a mousedown and a mouseup
to be fired and if you than handle the mouse up it's normal behavior for the
mouseup to be fired after the click event is processed even if you open an
open file dialog in the click event.

Hth

Greetz Peter

--
Programming today is a race between software engineers striving to build
bigger and better idiot-proof programs, and the Universe trying to produce
bigger and better idiots. So far, the Universe is winning.

"Mattbooty" <ma*******@mattbooty.com> schreef in bericht
news:11*********************@o13g2000cwo.googlegro ups.com...
Hello,
Not sure if anyone else has seen this bug, but I have a form where
the entire form is covered with a picturebox. The picturebox has a
mouseup event. I also have an open file dialog for loading images into
the picturebox. If you double click the file you want to open in the
open file dialog, it somehow interperets one of the clicks as a mouseup
on the picturebox and fires the mouseup event for the picturebox. How
can I get around this? I tried disabling the picturebox before loading
the dialog and enabling it after I complete loading the file, but it
still fires the mouseup event.

Any thoughts would be a big help!

Nov 21 '05 #2
No, I'm opening the open file dialog from a menu item. And it doesn't
fire the mouseup when I click the file I want then click "open" button,
only when I double click the file. I believe the open file is
interpereting a double click as a mousedown mouseup mousedown (i.e. a
single click plus another mousedown) so there is a mouseup remaining
after double clicking the file.

Peter Proost wrote:
Hi I can repoduce the same behavior, but do you open your open file dialog
from the click event of your picturebox? If that's the case it's expected
behavior for the mouseup to fire after the open file dialog is closed.
Because you click the picturebox hence the click event gets raised but
whenever you click on the picturebox there's also a mousedown and a mouseup
to be fired and if you than handle the mouse up it's normal behavior for the
mouseup to be fired after the click event is processed even if you open an
open file dialog in the click event.

Hth

Greetz Peter

--
Programming today is a race between software engineers striving to build
bigger and better idiot-proof programs, and the Universe trying to produce
bigger and better idiots. So far, the Universe is winning.

"Mattbooty" <ma*******@mattbooty.com> schreef in bericht
news:11*********************@o13g2000cwo.googlegro ups.com...
Hello,
Not sure if anyone else has seen this bug, but I have a form where
the entire form is covered with a picturebox. The picturebox has a
mouseup event. I also have an open file dialog for loading images into
the picturebox. If you double click the file you want to open in the
open file dialog, it somehow interperets one of the clicks as a mouseup
on the picturebox and fires the mouseup event for the picturebox. How
can I get around this? I tried disabling the picturebox before loading
the dialog and enabling it after I complete loading the file, but it
still fires the mouseup event.

Any thoughts would be a big help!


Nov 21 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Jonatan | last post by:
Hi all, I'm trying to upload files doing something like gmail. I almost got it but I have a problem when I post the form. Basicaly, I am doing the following. When the user presses the link...
5
by: John Bowman | last post by:
Hi, I need some dialog handling help, I must be missing something obvious here but I can't figure out the solution to the following problem... Simple Win Forms app that has button on the form....
2
by: Bradley1234 | last post by:
Seems simple but Im missing something. In a C# form Ive got a picturebox and a button I have the File Open dialog linked to the button, but Im drawing a blank on how to take the stream and push...
4
by: John | last post by:
Hi, I generate a report in a comma delimited file and give it a name like MyReport.csv . I then set a Hyperlink control to point tp the file HyperLink1.text = "Download"...
7
by: theyas | last post by:
How can I get my code to NOT display two "Open/Save/Cancel/More Info" dialog boxes when using the "Response.WriteFile" method to download a file to IE I've asked about this before and didn't get a...
4
by: Dorte | last post by:
Hi, I am using the code below to stream a CSV file with the response object. Dim FileName As String = "Test.csv" With Web.HttpContext.Current.Response ...
2
by: John | last post by:
Hi I am opening a dialog using; frmdialog = New frmdialognew frmdialog.ShowDialog() Is there a way to see if this dialog is already open to avoid opening multiple instances of it?
5
by: toby | last post by:
Hi there, Is it possible to create an array of picturebox controls during run-time. I wish to create a new image/picturebox everytime a user clicks the button on a form, and they need to be...
6
by: robusto33 | last post by:
Hi everyone, I'm really new to C#.net development, especially for win32 applications. I'm basically making a board game and was wondering if anyone could help me out with this predicament: I have...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
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
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
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,...

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.