Hello,
I am new to this news group. Please forgive me if this has been asked
before.
In my VB application, I have next and previous command buttons. I would
like to be able to hold the left mouse button down on these buttons and have
the operation repeat. Is this a property?
adTHANKSvance,
Stephen Saunders 16 5263
On Fri, 04 Mar 2005 10:50:04 GMT, "Stephen Saunders"
<kd****@earthlink.net> wrote: Hello,
I am new to this news group. Please forgive me if this has been asked before.
In my VB application, I have next and previous command buttons. I would like to be able to hold the left mouse button down on these buttons and have the operation repeat. Is this a property?
A Timer ?
On Fri, 04 Mar 2005 10:50:04 GMT, "Stephen Saunders"
<kd****@earthlink.net> wrote: Hello,
I am new to this news group. Please forgive me if this has been asked before.
In my VB application, I have next and previous command buttons. I would like to be able to hold the left mouse button down on these buttons and have the operation repeat. Is this a property?
A Timer ?
On Fri, 04 Mar 2005 10:50:04 GMT, "Stephen Saunders"
<kd****@earthlink.net> wrote: Hello,
I am new to this news group. Please forgive me if this has been asked before.
In my VB application, I have next and previous command buttons. I would like to be able to hold the left mouse button down on these buttons and have the operation repeat. Is this a property?
Oops - also you'll need to use the MouseDown and MouseUp events, and
get rid of the Click
I would wrap it in a UserControl (NOT OCXed) and call it something
like a PulseButton
On Fri, 04 Mar 2005 10:50:04 GMT, "Stephen Saunders"
<kd****@earthlink.net> wrote: Hello,
I am new to this news group. Please forgive me if this has been asked before.
In my VB application, I have next and previous command buttons. I would like to be able to hold the left mouse button down on these buttons and have the operation repeat. Is this a property?
Oops - also you'll need to use the MouseDown and MouseUp events, and
get rid of the Click
I would wrap it in a UserControl (NOT OCXed) and call it something
like a PulseButton
In responce to the post:
On Fri, 04 Mar 2005 10:50:04 GMT, "Stephen Saunders"
<kd****@earthlink.net> stated...and I replied: Hello,
I am new to this news group. Please forgive me if this has been asked before.
In my VB application, I have next and previous command buttons. I would like to be able to hold the left mouse button down on these buttons and have the operation repeat. Is this a property?
adTHANKSvance,
Stephen Saunders
You may do better changing the 2 command buttons into a single
horizontal scrollbar control. If you size it down so only the 2 (left
& right) buttons show, it will look like 2 command buttons with left
and right arrows.
Just a thought,
Shell
- http://drshell.home.mindspring.com/
Into computers since 1972.
WARNING! Information and e-mail addresses contained herein, are for personal use only. By entering this site, you agree that you will use this data only for lawful purposes and that, under no circumstances will you use this data to: allow, enable, or otherwise support the transmission of mass unsolicited, commercial advertising or solicitations via direct mail, electronic mail, or by telephone. Violators will be dealt with accordingly.
-
In responce to the post:
On Fri, 04 Mar 2005 10:50:04 GMT, "Stephen Saunders"
<kd****@earthlink.net> stated...and I replied: Hello,
I am new to this news group. Please forgive me if this has been asked before.
In my VB application, I have next and previous command buttons. I would like to be able to hold the left mouse button down on these buttons and have the operation repeat. Is this a property?
adTHANKSvance,
Stephen Saunders
You may do better changing the 2 command buttons into a single
horizontal scrollbar control. If you size it down so only the 2 (left
& right) buttons show, it will look like 2 command buttons with left
and right arrows.
Just a thought,
Shell
- http://drshell.home.mindspring.com/
Into computers since 1972.
WARNING! Information and e-mail addresses contained herein, are for personal use only. By entering this site, you agree that you will use this data only for lawful purposes and that, under no circumstances will you use this data to: allow, enable, or otherwise support the transmission of mass unsolicited, commercial advertising or solicitations via direct mail, electronic mail, or by telephone. Violators will be dealt with accordingly.
-
What J French is saying is to do something like the following:
Add a timer for each button, say TmrNext and TmrPrev. Set their
interval property to the repeat time (how often does it repeat the
click), in milliseconds.
Then, instead of a CmdNext_Click event that looks like this:
Sub CmdNext_Click()
[do stuff]
End Sub
Make a CmdNext_MouseDown event that looks like this:
Sub CmdNext_MouseDown()
TmrNext_Timer()
TmrNext.Enabled = True
End Sub
And put the [do stuff] in the TmrNext_Timer() event:
Sub TmrNext_Timer()
[do stuff]
End Sub
Finally, add a CmdNext_MouseUp() event to disable the timer:
Sub CmdNext_MouseUp()
TmrNext.Enabled = False
End Sub
That way, when the user presses the button, it will set off the
MouseDown event. This will first run the TmrNext_Timer() event, which
just does the [do stuff]. Then it will set the timer ticking. Then
every time the timer goes off, it'll do the [do stuff] again. When
they let go of the button, CmdNext_MouseUp(), the timer will be
stopped, so [do stuff] won't happen again.
You would, of course, do the same for CmdPrev. And because all this is
a lot to do twice and would be useful, wrapping it in a UserControl
would be helpful, but not necessary.
The only problem with this plan that I see is that if they clicked and
then dragged off the button to let go (Triggering MouseDown but not
MouseUp), the [do stuff] would keep happening until they clicked the
button again (Triggering MouseDown _and_ MouseUp). But this problem is
easily worked around (click the button again).
What J French is saying is to do something like the following:
Add a timer for each button, say TmrNext and TmrPrev. Set their
interval property to the repeat time (how often does it repeat the
click), in milliseconds.
Then, instead of a CmdNext_Click event that looks like this:
Sub CmdNext_Click()
[do stuff]
End Sub
Make a CmdNext_MouseDown event that looks like this:
Sub CmdNext_MouseDown()
TmrNext_Timer()
TmrNext.Enabled = True
End Sub
And put the [do stuff] in the TmrNext_Timer() event:
Sub TmrNext_Timer()
[do stuff]
End Sub
Finally, add a CmdNext_MouseUp() event to disable the timer:
Sub CmdNext_MouseUp()
TmrNext.Enabled = False
End Sub
That way, when the user presses the button, it will set off the
MouseDown event. This will first run the TmrNext_Timer() event, which
just does the [do stuff]. Then it will set the timer ticking. Then
every time the timer goes off, it'll do the [do stuff] again. When
they let go of the button, CmdNext_MouseUp(), the timer will be
stopped, so [do stuff] won't happen again.
You would, of course, do the same for CmdPrev. And because all this is
a lot to do twice and would be useful, wrapping it in a UserControl
would be helpful, but not necessary.
The only problem with this plan that I see is that if they clicked and
then dragged off the button to let go (Triggering MouseDown but not
MouseUp), the [do stuff] would keep happening until they clicked the
button again (Triggering MouseDown _and_ MouseUp). But this problem is
easily worked around (click the button again).
"five of nothing" <50**@mailinator.com> wrote in message
news:11**********************@l41g2000cwc.googlegr oups.com... The only problem with this plan that I see is that if they clicked and then dragged off the button to let go (Triggering MouseDown but not MouseUp), the [do stuff] would keep happening until they clicked the button again (Triggering MouseDown _and_ MouseUp). But this problem is easily worked around (click the button again).
Actually that is not a problem. Even if they drag away from the command button,
it will still receive the MouseUp event when the user releases the button. The X
and Y values will just be outside the boundaries of the command button.
"five of nothing" <50**@mailinator.com> wrote in message
news:11**********************@l41g2000cwc.googlegr oups.com... The only problem with this plan that I see is that if they clicked and then dragged off the button to let go (Triggering MouseDown but not MouseUp), the [do stuff] would keep happening until they clicked the button again (Triggering MouseDown _and_ MouseUp). But this problem is easily worked around (click the button again).
Actually that is not a problem. Even if they drag away from the command button,
it will still receive the MouseUp event when the user releases the button. The X
and Y values will just be outside the boundaries of the command button.
I tried out the advice given and came up with this as an example:-
Add a timer to your form (say Timer1) add a command button to the form (say
Button1) - Set its Enabled Property to False - Set its Interval Property to
100.
Then:-
Private Sub command1_MouseDown(button As Integer, shift As Integer, x As
Single, y As Single)
timer1_timer
Timer1.Enabled = True
End Sub
Sub timer1_timer()
Print "In"
End Sub
Private Sub command1_Mouseup(button As Integer, shift As Integer, x As
Single, y As Single)
Timer1.Enabled = False
Print "Out"
End Sub
Thanks Group
Martin
"Stephen Saunders" <kd****@earthlink.net> wrote in message
news:w3**************@newsread2.news.atl.earthlink .net... Hello,
I am new to this news group. Please forgive me if this has been asked before.
In my VB application, I have next and previous command buttons. I would like to be able to hold the left mouse button down on these buttons and
have the operation repeat. Is this a property?
adTHANKSvance,
Stephen Saunders
I tried out the advice given and came up with this as an example:-
Add a timer to your form (say Timer1) add a command button to the form (say
Button1) - Set its Enabled Property to False - Set its Interval Property to
100.
Then:-
Private Sub command1_MouseDown(button As Integer, shift As Integer, x As
Single, y As Single)
timer1_timer
Timer1.Enabled = True
End Sub
Sub timer1_timer()
Print "In"
End Sub
Private Sub command1_Mouseup(button As Integer, shift As Integer, x As
Single, y As Single)
Timer1.Enabled = False
Print "Out"
End Sub
Thanks Group
Martin
"Stephen Saunders" <kd****@earthlink.net> wrote in message
news:w3**************@newsread2.news.atl.earthlink .net... Hello,
I am new to this news group. Please forgive me if this has been asked before.
In my VB application, I have next and previous command buttons. I would like to be able to hold the left mouse button down on these buttons and
have the operation repeat. Is this a property?
adTHANKSvance,
Stephen Saunders
Yes, and thanks once again.
Martin
"five of nothing" <50**@mailinator.com> wrote in message
news:11**********************@l41g2000cwc.googlegr oups.com... So I presume it worked?
Yes, and thanks once again.
Martin
"five of nothing" <50**@mailinator.com> wrote in message
news:11**********************@l41g2000cwc.googlegr oups.com... So I presume it worked? This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: George C |
last post by:
How can I get this to repeat an infinite number of times?
Thanks
=================
</head>
<body onload="starttimer()" onunload="stoptimer()">
<script type="text/javascript">
|
by: Theodore A. Jencks |
last post by:
Hi all,
I posted a question about a side navigation bar earlier where I was
encountering this problem. I thought I'd repost the question in a more
general format because I'm not sure people...
|
by: Salvador |
last post by:
Hi,
Maybe is a simple question but I found difficult to find the answer.
Context:
I am creating a site where designers ONLY touch the ASPX page and I.S. touch
the code behind.
Task:
I...
|
by: Simon Gare |
last post by:
Hi
I have a booking page that the user enters 2 addresses date and time etc
what I need is the option for the user to select multiple date entries for
the same journey or maybe multiple days ie...
|
by: Csaba Gabor |
last post by:
I wrote a .repeat(n) function for strings which seemed to work fine:
String.prototype.repeat = function(n) {
// repeats the string n times
if (n<1) return "";
if (n<2) return this;
for (var...
| |
by: nicky77 |
last post by:
hi there, i'm pretty inexperienced with CSS, so apologies for the shoddy coding. i'm trying to set a 3 column layout using different background images for each column. however, i have whitespace at...
|
by: XedinUnknown |
last post by:
Hi!
I am new to this forum, but not new to web design and programming. Nevertheless, I have never tried to use PNG so extensively in my pages. here's the problem.
First, I have found that the...
|
by: win_cpp |
last post by:
Hello,
I was wondering if there is something equivalent to 'Repeat' pattern
in C# where I can say,
Repeat(10) myobj.SayHi();
The expansion of this being,
for (int i = 0; i < 10; ++i)
|
by: shapper |
last post by:
Hello,
I am trying to give a background to a Div repeating it on the y
direction.
Please, notice the alternate of colors:
http://www.27lamps.com/Beta/Background/Background.html
Does anyone...
|
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,...
|
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,...
| |
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
|
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: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
| |
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |