473,323 Members | 1,560 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,323 software developers and data experts.

BUG: Inherited Button

Steps to reproduce:

Inherit from button.
Add button to project's form.
Run project.
Make button Default.
Press and Hold SpaceBar (so button is pressed)
Move Mouse.
Release SpaceBar.

The button now recieves the first MouseDown and MouseUp events even if the
cursor is not over the button.

Has anyone else seen this? I couldn't find it documented.
Nov 20 '05 #1
4 1384
What's more:
Inherit from ButtonBase and the Button will not repaint after a click by
mouse. It stays Pushed until it loses focus.

"Mick Doherty"
<EX***********@AND.REMOVE.SQUAREBRACKETS.[mdaudi100#ntlworld.com]> wrote in
message news:%2****************@TK2MSFTNGP09.phx.gbl...
Steps to reproduce:

Inherit from button.
Add button to project's form.
Run project.
Make button Default.
Press and Hold SpaceBar (so button is pressed)
Move Mouse.
Release SpaceBar.

The button now recieves the first MouseDown and MouseUp events even if the
cursor is not over the button.

Has anyone else seen this? I couldn't find it documented.

Nov 20 '05 #2
For anyone who's interested, both bugs are related.
The actual Bug is the ButtonBase one which Button then Inherits.
Simple Solution is to Override the OnClick and OnDoubleClick events and add:

MyBase.OnClick(e)
MyBase.OnLostFocus(EventArgs.Empty)
"Mick Doherty"
<EX***********@AND.REMOVE.SQUAREBRACKETS.[mdaudi100#ntlworld.com]> wrote in
message news:OI**************@TK2MSFTNGP12.phx.gbl...
What's more:
Inherit from ButtonBase and the Button will not repaint after a click by
mouse. It stays Pushed until it loses focus.

"Mick Doherty"
<EX***********@AND.REMOVE.SQUAREBRACKETS.[mdaudi100#ntlworld.com]> wrote in message news:%2****************@TK2MSFTNGP09.phx.gbl...
Steps to reproduce:

Inherit from button.
Add button to project's form.
Run project.
Make button Default.
Press and Hold SpaceBar (so button is pressed)
Move Mouse.
Release SpaceBar.

The button now recieves the first MouseDown and MouseUp events even if the cursor is not over the button.

Has anyone else seen this? I couldn't find it documented.


Nov 20 '05 #3
Nice one Mick. Cheers for sharing with the group. I wish more people done
this more often.

If you ever feel like solving the other 101 bugs in dotnet and Visual
Studio, feel free to share them too ;)

"Mick Doherty"
<EX***********@AND.REMOVE.SQUAREBRACKETS.[mdaudi100#ntlworld.com]> wrote in
message news:er*************@tk2msftngp13.phx.gbl...
For anyone who's interested, both bugs are related.
The actual Bug is the ButtonBase one which Button then Inherits.
Simple Solution is to Override the OnClick and OnDoubleClick events and add:
MyBase.OnClick(e)
MyBase.OnLostFocus(EventArgs.Empty)
"Mick Doherty"
<EX***********@AND.REMOVE.SQUAREBRACKETS.[mdaudi100#ntlworld.com]> wrote in message news:OI**************@TK2MSFTNGP12.phx.gbl...
What's more:
Inherit from ButtonBase and the Button will not repaint after a click by
mouse. It stays Pushed until it loses focus.

"Mick Doherty"
<EX***********@AND.REMOVE.SQUAREBRACKETS.[mdaudi100#ntlworld.com]> wrote

in
message news:%2****************@TK2MSFTNGP09.phx.gbl...
Steps to reproduce:

Inherit from button.
Add button to project's form.
Run project.
Make button Default.
Press and Hold SpaceBar (so button is pressed)
Move Mouse.
Release SpaceBar.

The button now recieves the first MouseDown and MouseUp events even if the cursor is not over the button.

Has anyone else seen this? I couldn't find it documented.



Nov 20 '05 #4
And I thought no one was listening.

Are there only 101? :-)

I just thought I'd sort out the "No Icon in a FlatStyle.System Button" bug.
I thought it was going to be easy and to a certain extent it was, but I was
banging my head trying to figure out what I had done wrong to cause the
Paint errors I was seeing, and as it turns out it wasn't me, it was the
Tools I was using (does that make me a bad workman?).
I think I've finished it now, at least I can't think of any other things a
user might do to misuse a button.
Time to look over the code and see what improvements I can make.

"Codemonkey" <hu*********@hotmail.com> wrote in message
news:Ot**************@TK2MSFTNGP12.phx.gbl...
Nice one Mick. Cheers for sharing with the group. I wish more people done
this more often.

If you ever feel like solving the other 101 bugs in dotnet and Visual
Studio, feel free to share them too ;)

"Mick Doherty"
<EX***********@AND.REMOVE.SQUAREBRACKETS.[mdaudi100#ntlworld.com]> wrote in message news:er*************@tk2msftngp13.phx.gbl...
For anyone who's interested, both bugs are related.
The actual Bug is the ButtonBase one which Button then Inherits.
Simple Solution is to Override the OnClick and OnDoubleClick events and

add:

MyBase.OnClick(e)
MyBase.OnLostFocus(EventArgs.Empty)
"Mick Doherty"
<EX***********@AND.REMOVE.SQUAREBRACKETS.[mdaudi100#ntlworld.com]> wrote

in
message news:OI**************@TK2MSFTNGP12.phx.gbl...
What's more:
Inherit from ButtonBase and the Button will not repaint after a click by mouse. It stays Pushed until it loses focus.

"Mick Doherty"
<EX***********@AND.REMOVE.SQUAREBRACKETS.[mdaudi100#ntlworld.com]>
wrote in
message news:%2****************@TK2MSFTNGP09.phx.gbl...
> Steps to reproduce:
>
> Inherit from button.
> Add button to project's form.
> Run project.
> Make button Default.
> Press and Hold SpaceBar (so button is pressed)
> Move Mouse.
> Release SpaceBar.
>
> The button now recieves the first MouseDown and MouseUp events even
if the
> cursor is not over the button.
>
> Has anyone else seen this? I couldn't find it documented.
>
>



Nov 20 '05 #5

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

Similar topics

2
by: Terrance | last post by:
Hello all I have a question I'm hoping someone can shed some light on. I have 2 user Inherited Controls on a form. When I click 1 inherited control I would like to change the text of the other...
3
by: Tamir Khason | last post by:
Please help. I know that there are a lot of developers suffer from this bug in VS.NET. I know to ho reproduce it quickly!!! BUG: Code disappear when moving from code to design time and compiling...
3
by: Mick Doherty | last post by:
Minimal Code and steps needed to show problem. Inherit from Button and set Region as below. \\\ Protected Overrides Sub OnPaint(ByVal pevent as PaintEventArgs) MyBase.OnPaint(pevent)...
13
by: Lorne Smith | last post by:
Hi, First, sorry for the crosspost, but it seemed appropriate... :) I've come accross what I consider to be a bug, but I don't know if it's already known or not. (VS .Net 2003 Pro - VB.Net) ...
9
by: fabio.bizzetti | last post by:
Hello all, I went across what seems possibly a bug of the compiler (VisualC 2005, just for the record) or a very strange and non-expected (by me at least) behaviour of the C++ ISO standard. Thus...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

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.