A control on a UserControl has it's mouseup event raised.
I want the usercontrol to pass it on.
That is , I want the form containing the UserControl to receive a MouseUp
event from the UserControl.
Do I have to define an event in the user control and raise it in the
controls MouseUp event, or is there a neater way?
If I have to define an event, can I call it MouseUp?
Thanks 2 1644
Hi,
You have to shadow the event and raise it manually. This example
will raise the mousemove event when the mouse moves over a textbox in the
user control.
Public Shadows Event MouseMove(ByVal sender As Object, ByVal e As
MouseEventArgs)
Private Sub TextBox1_MouseMove(ByVal sender As Object, ByVal e As
System.Windows.Forms.MouseEventArgs) Handles TextBox1.MouseMove
RaiseEvent MouseMove(sender, e)
End Sub
Ken
-----------------------
" Just Me" <ne********@a-znet.com> wrote in message
news:Oy**************@TK2MSFTNGP09.phx.gbl...
A control on a UserControl has it's mouseup event raised.
I want the usercontrol to pass it on.
That is , I want the form containing the UserControl to receive a MouseUp
event from the UserControl.
Do I have to define an event in the user control and raise it in the
controls MouseUp event, or is there a neater way?
If I have to define an event, can I call it MouseUp?
Thanks
Ken, Thanks again
"Ken Tucker [MVP]" <vb***@bellsouth.net> wrote in message
news:%2***************@TK2MSFTNGP11.phx.gbl... Hi,
You have to shadow the event and raise it manually. This example will raise the mousemove event when the mouse moves over a textbox in the user control.
Public Shadows Event MouseMove(ByVal sender As Object, ByVal e As MouseEventArgs) Private Sub TextBox1_MouseMove(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles TextBox1.MouseMove
RaiseEvent MouseMove(sender, e)
End Sub Ken
-----------------------
" Just Me" <ne********@a-znet.com> wrote in message news:Oy**************@TK2MSFTNGP09.phx.gbl... A control on a UserControl has it's mouseup event raised.
I want the usercontrol to pass it on.
That is , I want the form containing the UserControl to receive a MouseUp event from the UserControl.
Do I have to define an event in the user control and raise it in the controls MouseUp event, or is there a neater way?
If I have to define an event, can I call it MouseUp?
Thanks This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: nmueggler |
last post by:
Hi
I'm working on a Word 2003 mail merge component for a windows client.
My problem is that the BeforePrint Event ist not raised if the user is
printing directly out of word, but if I'm running...
|
by: Stijn Goris |
last post by:
Hi all,
I place a usercontrol (2) on another usercontrol (1). The second usercontrol
has a button. Is there a way usercontrol (1) can know when the button is
clicked on usercontrol (2) without...
|
by: Solel Software |
last post by:
Hi,
I have a user control embedded in another user control that is embedded in a
web form
Page.aspx < Module.ascx < ProblemHere.ascx
In ProblemHere.ascx I have a regular <asp:Button and a ...
|
by: Max |
last post by:
Last time I tried to explain this on another forum it didn't go too
well, so I'll try my best and if you know what I'm talking about then
please tell me how to do this.
I have a class, inside I...
|
by: AMP |
last post by:
Hello,
I have this in form1:
namespace Pass
{
public partial class Form1 : Form
{
public Form2 form2;
public Form1()
{
|
by: simplediscourse |
last post by:
i'm trying to demonstrate timeslicing among equal high priority threads without putting threads to sleep. to do this i'm trying to run a timer while executing a very long loop sequence in order to...
|
by: Karch |
last post by:
I have an event that is not being raised on postback from client script. It
DOES get raised during a "normal" postback. The event is wired up in the
Page Init. I have traced through and my event...
|
by: Tom |
last post by:
This is probably a really basic question, but I know someone will be
able to help me. I have a single object A that contains a hash of
objects B. Each object B contains its own TCP client object...
|
by: =?Utf-8?B?bWljaGFlbCBzb3JlbnM=?= |
last post by:
I created a user control that handles certain keystrokes, e.g. Ctrl-C for
cut, Ctrl-V for paste, plus other more specialized keystrokes. I want to list
these in the menubar like any other menu...
|
by: DolphinDB |
last post by:
Tired of spending countless mintues downsampling your data? Look no further!
In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
|
by: ryjfgjl |
last post by:
ExcelToDatabase: batch import excel into database automatically...
|
by: Vimpel783 |
last post by:
Hello!
Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
|
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...
|
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)...
|
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...
|
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....
|
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: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...
| |