How to show message After tabpage is displayed in vb.net??
-
Hi, I have a form with TabControl object at which there are 5 tabpages What I want to do is that when user click the tab, the new tabpage is showing on form, at this time I want to show some message use msgbox "". Now I use TabControl1_Selected event, the message is always shown before the actually tabpage is displayed, I want the message is shown after tabpage is displayed. How can I do it? Thanks!
-
Hi, I have a form with TabControl object at which there are 5 tabpages What I want to do is that when user click the tab, the new tabpage is showing on form, at this time I want to show some message use msgbox "". Now I use TabControl1_Selected event, the message is always shown before the actually tabpage is displayed, I want the message is shown after tabpage is displayed. How can I do it? Thanks!
The Selected event may be the wrong one. IMO you should use the SelectedIndexChanged event, and wire it after the Form is completely ready, i.e. in its Shown handler. :)
Luc Pattyn [Forum Guidelines] [Why QA sucks] [My Articles] Nil Volentibus Arduum
Please use <PRE> tags for code snippets, they preserve indentation, and improve readability.
-
Hi, I have a form with TabControl object at which there are 5 tabpages What I want to do is that when user click the tab, the new tabpage is showing on form, at this time I want to show some message use msgbox "". Now I use TabControl1_Selected event, the message is always shown before the actually tabpage is displayed, I want the message is shown after tabpage is displayed. How can I do it? Thanks!
You might also try handling the
TabPage.Enter
event.Henry Minute Do not read medical books! You could die of a misprint. - Mark Twain Girl: (staring) "Why do you need an icy cucumber?" “I want to report a fraud. The government is lying to us all.”
-
You might also try handling the
TabPage.Enter
event.Henry Minute Do not read medical books! You could die of a misprint. - Mark Twain Girl: (staring) "Why do you need an icy cucumber?" “I want to report a fraud. The government is lying to us all.”
Thanks for reply! TabPage.Enter event doesn't work.
-
The Selected event may be the wrong one. IMO you should use the SelectedIndexChanged event, and wire it after the Form is completely ready, i.e. in its Shown handler. :)
Luc Pattyn [Forum Guidelines] [Why QA sucks] [My Articles] Nil Volentibus Arduum
Please use <PRE> tags for code snippets, they preserve indentation, and improve readability.
Thanks! SelectedIndexChanged event works if the tabpage is not the first one. If the tabpage is the first page (index = 0), the message still cannot be shown.