User control 'global' events

User control 'global' events

Post by Mark » Thu, 15 Nov 2001 02:40:48



Hi

I've created a control, based on a
System.Windows.Forms.UserControl. This control has other
controls on it. e.g. TextBox, label etc. I've now placed
my new user-control onto a form and want the new control
as a whole, to respond to a double-click. However, the
individual controls are responding to the double-click,
depending on what control the mouse is over. How can I
get my user control to respond 'globally' to a double
click event?

Thanks

M

 
 
 

User control 'global' events

Post by Jonathan Alle » Thu, 15 Nov 2001 04:34:58


Pass the sub-control's DoubleClick to the control's DoubleClick?

--
Jonathan Allen


Quote:> Hi

> I've created a control, based on a
> System.Windows.Forms.UserControl. This control has other
> controls on it. e.g. TextBox, label etc. I've now placed
> my new user-control onto a form and want the new control
> as a whole, to respond to a double-click. However, the
> individual controls are responding to the double-click,
> depending on what control the mouse is over. How can I
> get my user control to respond 'globally' to a double
> click event?

> Thanks

> M


 
 
 

User control 'global' events

Post by Mark » Thu, 15 Nov 2001 20:44:08


Any idea how to do this? I see events can be 'bubbled up'
using ASP.Net but not with Windows.Forms??!!!

M

>-----Original Message-----
>Pass the sub-control's DoubleClick to the control's
DoubleClick?

>--
>Jonathan Allen



>> Hi

>> I've created a control, based on a
>> System.Windows.Forms.UserControl. This control has
other
>> controls on it. e.g. TextBox, label etc. I've now
placed
>> my new user-control onto a form and want the new
control
>> as a whole, to respond to a double-click. However, the
>> individual controls are responding to the double-click,
>> depending on what control the mouse is over. How can I
>> get my user control to respond 'globally' to a double
>> click event?

>> Thanks

>> M

>.

 
 
 

User control 'global' events

Post by Jonathan Alle » Fri, 16 Nov 2001 04:05:56


I think you can do something like this inside the UserControl.

Class MyUserControl

Sub Control_DoubleClick(~) Handles [list all controls]
    RaiseEvent DoubleClick(~)
End Sub

End Class

--
Jonathan Allen


> Any idea how to do this? I see events can be 'bubbled up'
> using ASP.Net but not with Windows.Forms??!!!

> M

> >-----Original Message-----
> >Pass the sub-control's DoubleClick to the control's
> DoubleClick?

> >--
> >Jonathan Allen



> >> Hi

> >> I've created a control, based on a
> >> System.Windows.Forms.UserControl. This control has
> other
> >> controls on it. e.g. TextBox, label etc. I've now
> placed
> >> my new user-control onto a form and want the new
> control
> >> as a whole, to respond to a double-click. However, the
> >> individual controls are responding to the double-click,
> >> depending on what control the mouse is over. How can I
> >> get my user control to respond 'globally' to a double
> >> click event?

> >> Thanks

> >> M

> >.

 
 
 

1. Global.asax.cs Error Could not load type 'localhost.Global'.

Hello all,

    I'm new to the ASP.NET framework.  I created a simple C# web
project on my local server just to test things out.  I started with
the obligatory "Hello World" application.  I created a default.aspx
page and put in <h1>Hello World</h1>.  When I tried to view the page
in the browser it came up with.

---------------------------------------------------------------------------

Parser Error
Description: An error occurred during the parsing of a resource
required to service this request. Please review the following specific
parse error details and modify your source file appropriately.

Parser Error Message: Could not load type 'localhost.Global'.

Source Error:


Inherits="localhost.Global" %>

Source File: C:\Inetpub\wwwroot\global.asax    Line: 1

---------------------------------------------------------------------------

I've tried searching and can't find anything in reference to this
error.  Any help would be very much appreciated.

Thanks,
Scott

2. Panel in pdfscreen - how to alter?

3. error C2039: '`global namespace'' : is not a member of '`global namespace''

4. AN: Ask the Guru apple column reprints

5. User Control Instances and how .NET Prefixes control collection's ID's

6. 11231

7. SQL Server Login failed for user 'IUSER_'..error '80040e4d'

8. Help! Lost IBM Internet Cust Service Files

9. How to show 'b' if user press 'a' in TextBox?

10. Help with an user control's event not firing

11. First event don't fire in a User Control

12. Webform user control event won't fire

13. Parser error 'could not load type' for user control