I have an msn style c# windows application with a form and panel on
it.
A news list is drawn from the database and dynamically added via
labels, link lables during form loading. In this application at run
time this list should be generated again as the filtering criteria
changes. So I clear the controls(labels) on the panel, get the list
from the database and generate the list again. The list is created
and
it works fine. But sometimes the form begins not to respond to mouse
clicks. Only mouse over and mousemove events work. Does anybody have
suggestions on why this happens? 5 2312
A mouse click is handled by a Control, not by the Form, unless there is no
Control in the location of the mouse click. If the Control does not have the
focus, the first mouse click will focus on the Control, and the second will
cause the Click event.
--
HTH,
Kevin Spencer
Microsoft MVP
Software Composer http://unclechutney.blogspot.com
I had the same problem once. Fixed it using the same solution.
"moonie" <se************@gmail.comwrote in message
news:11**********************@q2g2000cwa.googlegro ups.com...
>I have an msn style c# windows application with a form and panel on
it.
A news list is drawn from the database and dynamically added via
labels, link lables during form loading. In this application at run
time this list should be generated again as the filtering criteria
changes. So I clear the controls(labels) on the panel, get the list
from the database and generate the list again. The list is created
and
it works fine. But sometimes the form begins not to respond to mouse
clicks. Only mouse over and mousemove events work. Does anybody have
suggestions on why this happens?
Thanks for your answer Kevin.
But I did not understand what should I do to fix the problem :)
I placed this.Refresh();this.Activate(); in the form code but it
did'nt help.
Also I should inform you that there are three panels on the form and
the labels, buttons etc. are on these panels.
On 22 Þubat, 15:55, "Kevin Spencer" <unclechut...@nothinks.comwrote:
A mouse click is handled by a Control, not by the Form, unless there is no
Control in the location of the mouse click. If the Control does not have the
focus, the first mouse click will focus on the Control, and the second will
cause the Click event.
--
HTH,
Kevin Spencer
Microsoft MVP
Software Composerhttp://unclechutney.blogspot.com
I had the same problem once. Fixed it using the same solution.
"moonie" <serafettina...@gmail.comwrote in message
news:11**********************@q2g2000cwa.googlegro ups.com...
I have an msn style c# windows application with a form and panel on
it.
A news list is drawn from the database and dynamically added via
labels, link lables during form loading. In this application at run
time this list should be generated again as the filtering criteria
changes. So I clear the controls(labels) on the panel, get the list
from the database and generate the list again. The list is created
and
it works fine. But sometimes the form begins not to respond to mouse
clicks. Only mouse over and mousemove events work. Does anybody have
suggestions on why this happens?- Alýntýyý gizle -
- Alýntýyý göster -
I found the solution :) I called Panel.Controls.Clear() method to
remove the labels and links. That is why the controls were not
disposed and their event handlers were not removed. So when I added
new controls with same event handlers somehow it got confused and the
click event did not work. Now I call Panel.Control[i].Dispose() for
every control on the panel and add new controls and it works great!
On 22 Åžubat, 16:21, "moonie" <serafettina...@gmail.comwrote:
Thanks for your answer Kevin.
But I did not understand what should I do to fix the problem :)
I placed this.Refresh();this.Activate(); in the form code but it
did'nt help.
Also I should inform you that there are three panels on the form and
the labels, buttons etc. are on these panels.
On 22 Þubat, 15:55, "Kevin Spencer" <unclechut...@nothinks.comwrote:
A mouse click is handled by a Control, not by the Form, unless there isno
Control in the location of the mouse click. If the Control does not have the
focus, the first mouse click will focus on the Control, and the second will
cause the Click event.
--
HTH,
Kevin Spencer
Microsoft MVP
Software Composerhttp://unclechutney.blogspot.com
I had the same problem once. Fixed it using the same solution.
"moonie" <serafettina...@gmail.comwrote in message
news:11**********************@q2g2000cwa.googlegro ups.com...
>I have an msn style c# windows application with a form and panel on
it.
A news list is drawn from the database and dynamically added via
labels, link lables during form loading. In this application at run
time this list should be generated again as the filtering criteria
changes. So I clear the controls(labels) on the panel, get the list
from the database and generate the list again. The list is created
and
it works fine. But sometimes the form begins not to respond to mouse
clicks. Only mouse over and mousemove events work. Does anybody have
suggestions on why this happens?- Alýntýyý gizle -
- Alýntýyý göster -- Alıntıyı gizle -
- Alıntıyı göster -
I found the solution :) I called Panel.Controls.Clear() method to
remove the labels and links. That is why the controls were not
disposed and their event handlers were not removed. So when I added
new controls with same event handlers somehow it got confused and the
click event did not work. Now I call Panel.Control[i].Dispose() for
every control on the panel and add new controls and it works great!
On 22 Åžubat, 16:21, "moonie" <serafettina...@gmail.comwrote:
Thanks for your answer Kevin.
But I did not understand what should I do to fix the problem :)
I placed this.Refresh();this.Activate(); in the form code but it
did'nt help.
Also I should inform you that there are three panels on the form and
the labels, buttons etc. are on these panels.
On 22 Þubat, 15:55, "Kevin Spencer" <unclechut...@nothinks.comwrote:
A mouse click is handled by a Control, not by the Form, unless there isno
Control in the location of the mouse click. If the Control does not have the
focus, the first mouse click will focus on the Control, and the second will
cause the Click event.
--
HTH,
Kevin Spencer
Microsoft MVP
Software Composerhttp://unclechutney.blogspot.com
I had the same problem once. Fixed it using the same solution.
"moonie" <serafettina...@gmail.comwrote in message
news:11**********************@q2g2000cwa.googlegro ups.com...
>I have an msn style c# windows application with a form and panel on
it.
A news list is drawn from the database and dynamically added via
labels, link lables during form loading. In this application at run
time this list should be generated again as the filtering criteria
changes. So I clear the controls(labels) on the panel, get the list
from the database and generate the list again. The list is created
and
it works fine. But sometimes the form begins not to respond to mouse
clicks. Only mouse over and mousemove events work. Does anybody have
suggestions on why this happens?- Alýntýyý gizle -
- Alýntýyý göster -- Alıntıyı gizle -
- Alıntıyı göster -
Good work, moonie. Yes, it is important to dispose of any Controls that are
added to another Control.
--
HTH,
Kevin Spencer
Microsoft MVP
Software Composer http://unclechutney.blogspot.com
I had the same problem once. Fixed it using the same solution.
"moonie" <se************@gmail.comwrote in message
news:11**********************@s48g2000cws.googlegr oups.com...
I found the solution :) I called Panel.Controls.Clear() method to
remove the labels and links. That is why the controls were not
disposed and their event handlers were not removed. So when I added
new controls with same event handlers somehow it got confused and the
click event did not work. Now I call Panel.Control[i].Dispose() for
every control on the panel and add new controls and it works great!
On 22 Subat, 16:21, "moonie" <serafettina...@gmail.comwrote:
Thanks for your answer Kevin.
But I did not understand what should I do to fix the problem :)
I placed this.Refresh();this.Activate(); in the form code but it
did'nt help.
Also I should inform you that there are three panels on the form and
the labels, buttons etc. are on these panels.
On 22 Þubat, 15:55, "Kevin Spencer" <unclechut...@nothinks.comwrote:
A mouse click is handled by a Control, not by the Form, unless there is
no
Control in the location of the mouse click. If the Control does not have
the
focus, the first mouse click will focus on the Control, and the second
will
cause the Click event.
--
HTH,
Kevin Spencer
Microsoft MVP
Software Composerhttp://unclechutney.blogspot.com
I had the same problem once. Fixed it using the same solution.
"moonie" <serafettina...@gmail.comwrote in message
news:11**********************@q2g2000cwa.googlegro ups.com...
>I have an msn style c# windows application with a form and panel on
it.
A news list is drawn from the database and dynamically added via
labels, link lables during form loading. In this application at run
time this list should be generated again as the filtering criteria
changes. So I clear the controls(labels) on the panel, get the list
from the database and generate the list again. The list is created
and
it works fine. But sometimes the form begins not to respond to mouse
clicks. Only mouse over and mousemove events work. Does anybody have
suggestions on why this happens?- Alýntýyý gizle -
- Alýntýyý göster -- Alintiyi gizle -
- Alintiyi göster -
This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: Steve |
last post by:
I have a form with about 25 fields. In the BeforeUpdate event of the form, I
have code that sets the default value of each field to its current value. For a
new record, I can put the focus in any...
|
by: Thomas W Ping |
last post by:
Putting focus in a form element like a dropdown box and using the mouse
wheel - even one click forward or backward with it - cycles through
every record, in that direction, until first or last...
|
by: lauren quantrell |
last post by:
I have a command button on a continuous subform and I want the user to
click it to open a small popup form that opens in the position of the
mouse (which is the same as the position of the command...
|
by: Nikki |
last post by:
Hi,
Can anybody help me in solving this problem. I m developing an
application in which the main application form is borderless. now i m
not able to move the application form with the help of...
|
by: Lloyd Sheen |
last post by:
I have the following situation:
Need a user resizable user control. After much trying with user control I
came across the idea of hosting the controls in a form marked as not
TopLevel = false. ...
|
by: moonie |
last post by:
I have an msn style c# windows application with a form and panel on
it.
A news list is drawn from the database and dynamically added via
labels, link lables during form loading. In this...
|
by: mflll |
last post by:
I am having trouble responding writing a Javascript Program respond
to keypresses on top of a paragraph. Here is the code I tried:
<HTML>
<SCRIPT Language="JavaScript">...
|
by: Joergen Bech |
last post by:
Hope someone has a solution or some suggestions for this.
This cannot be right?!?
Problem:
I have multiple non-modal forms open at the same time.
One or more of these forms have a...
|
by: DavidGeorge |
last post by:
I have an unbound form with three list boxes. The selections made in
these list boxes 'filter' the records that appear in an unbound
subform. The subform record source is a query which looks at...
|
by: lllomh |
last post by:
Define the method first
this.state = {
buttonBackgroundColor: 'green',
isBlinking: false, // A new status is added to identify whether the button is blinking or not
}
autoStart=()=>{
|
by: isladogs |
last post by:
The next Access Europe meeting will be on Wednesday 4 Oct 2023 starting at 18:00 UK time (6PM UTC+1) and finishing at about 19:15 (7.15PM)
The start time is equivalent to 19:00 (7PM) in Central...
|
by: Aliciasmith |
last post by:
In an age dominated by smartphones, having a mobile app for your business is no longer an option; it's a necessity. Whether you're a startup or an established enterprise, finding the right mobile app...
|
by: tracyyun |
last post by:
Hello everyone,
I have a question and would like some advice on network connectivity. I have one computer connected to my router via WiFi, but I have two other computers that I want to be able to...
|
by: giovanniandrean |
last post by:
The energy model is structured as follows and uses excel sheets to give input data:
1-Utility.py contains all the functions needed to calculate the variables and other minor things (mentions...
|
by: NeoPa |
last post by:
Hello everyone.
I find myself stuck trying to find the VBA way to get Access to create a PDF of the currently-selected (and open) object (Form or Report).
I know it can be done by selecting :...
|
by: Teri B |
last post by:
Hi, I have created a sub-form Roles. In my course form the user selects the roles assigned to the course.
0ne-to-many. One course many roles.
Then I created a report based on the Course form and...
|
by: nia12 |
last post by:
Hi there,
I am very new to Access so apologies if any of this is obvious/not clear.
I am creating a data collection tool for health care employees to complete. It consists of a number of...
|
by: isladogs |
last post by:
The next online meeting of the Access Europe User Group will be on Wednesday 6 Dec 2023 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM).
In this month's session, Mike...
| |