By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
455,567 Members | 1,723 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 455,567 IT Pros & Developers. It's quick & easy.

Toolbar stops catching "Click" event after some time.

P: n/a
Hi All,

I am working on a project, where maximum operations carried out on Files and
multi-dimensional arrays. Since array data is huge application takes too
much memory.

My problem is, after few operations, toolbar on MDI from doesn't catch
"Click" event.
But it catch all other events like mouse leave etc.

I am not been able to find out the reason.

Please help me by giving some thoughts.

Thanks in advance,

Sakharam Phapale


Nov 16 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
hi Sasharam
Does it work initially or it doesn't catch the event at all. ( mostly you
tried debuging to see if the handler is called). would you post the event
handler you have
Mohamed Mahfouz

Nov 16 '05 #2

P: n/a
Hi Mohamed,

Actually my code is in VB.

I am using Toolbar in which there are few buttons (Cut, Copy, Paste, Delete,
etc..)
After starting the application click events works perfectly but after some
time click event doesn't get fired.
But still other event like "ToolBar1_MouseEnter" works fine.
Since it is in VB you don't need to write code to add event handler like in
C#.
To acheive the same I need to add it in procedure itself.

Private Sub Toolbar1_ButtonClick(ByVal sender as Object, ByVal e as
ToolBarButtonClickEventArgs) Handles Toolbar1.ButtonClick

Above code gets generated at design time.

For run time I am using following alternate code

Dim ei As EventInfo
Dim myType As Type = GetType(ToolBar)
ei = myType.GetEvent("ButtonClick")
ei.AddEventHandler(ToolBar1, New ToolBarButtonClickEventHandler(AddressOf
ToolBar1_ButtonClick))

I think it is related to event handler which gets remove automatically after
some time.
But I am not sure how to trace that.

Thanks and Regards,
Sakharam Phapale
"Mohamoss" <mo************@egdsc.microsoft.com> wrote in message
news:$L**************@TK2MSFTNGXA02.phx.gbl...
hi Sasharam
Does it work initially or it doesn't catch the event at all. ( mostly you
tried debuging to see if the handler is called). would you post the event
handler you have
Mohamed Mahfouz

Nov 16 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.