Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Windows Forms / WinForm Controls / March 2008

Tip: Looking for answers? Try searching our database.

Custom event handler does not show up in controls event properties

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Stefan - 03 Mar 2008 09:49 GMT
Hi,

I wrote a custom event handler for a combo box control class. The
event handler itself works, it gets fired, I can define an event
handler in my form window and it gets called when I want to. But what
must be done so that this new event shows up in the controls event
property. I already marked the public event handler with attribute
[Browseable(true)], but it still gets not listed.

Typical beginners question...

TIA,
Stefan
Luc Kumps - 03 Mar 2008 13:18 GMT
> property. I already marked the public event handler with attribute
> [Browseable(true)], but it still gets not listed.

Did you try Restarting Visual Studio after modifying the component?
Or to re-install the component DLL in the Toolbox?

Luc K
Stefan - 04 Mar 2008 07:41 GMT
Yep - that did it. I'm not sure wether it was restarting VS2005-SP1 or
re-installing the DLL (guess that), but now I see my event. As a
beginner however I still feel "uncomfortable" why VS needs this "hard
refresh" to see the event...

Thanks again,
Stefan

> > property. I already marked the public event handler with attribute
> > [Browseable(true)], but it still gets not listed.
[quoted text clipped - 3 lines]
>
> Luc K
bolo - 08 Mar 2008 02:49 GMT
It's better to resolve it if paste your code here.

> Yep - that did it. I'm not sure wether it was restarting VS2005-SP1 or
> re-installing the DLL (guess that), but now I see my event. As a
[quoted text clipped - 11 lines]
>>
>> Luc K
Herfried K. Wagner [MVP] - 03 Mar 2008 15:52 GMT
"Stefan" <olympus_mons@gmx.de> schrieb:
> I wrote a custom event handler for a combo box control class. The
> event handler itself works, it gets fired, I can define an event
> handler in my form window and it gets called when I want to. But what
> must be done so that this new event shows up in the controls event
> property. I already marked the public event handler with attribute
> [Browseable(true)], but it still gets not listed.

My guess is that the event window only shows event handlers which are set up
in the 'InitializeComponent' method.

Signature

M S   Herfried K. Wagner
M V P  <URL:http://dotnet.mvps.org/>
V B   <URL:http://dotnet.mvps.org/dotnet/faqs/>


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.