|
web
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Open a form and select the tab pageHow can I make a hyperlink open another form and select the specified tab
page on that form. I have declared the form I want to open as "Details" so: Details.Show() Opens the form. And to select the tab page I can use: MainTabControl.SelectedTab = SearchTabPage However I cannot combine these two commands into one click action. Can anyone help? Thanks
Show quote
Hide quote
"lukegregory" <lukegreg***@discussions.microsoft.com> schrieb: What's the problem?> How can I make a hyperlink open another form and select the specified tab > page on that form. > > I have declared the form I want to open as "Details" so: > > Details.Show() > > Opens the form. And to select the tab page I can use: > > MainTabControl.SelectedTab = SearchTabPage > > However I cannot combine these two commands into one click action. \\\ Dim d As New DetailsForm() d.MainTabControl.SelectedIndex = 2 d.Show() /// -- M S Herfried K. Wagner M V P <URL:http://dotnet.mvps.org/> V B <URL:http://classicvb.org/petition/> Thank you ever so much, simple mistake, I had the two commands in the wrong
order and it would not work. I am still in the early stages of learning VB.Net and sadly my deadline is fast approaching. Would it be possible to email you a zipped copy of my application to clear up a few bugs for me, this would be greatly appreciated. I am happy to offer you a reasonable agreed for for this service. Show quoteHide quote "Herfried K. Wagner [MVP]" wrote: > "lukegregory" <lukegreg***@discussions.microsoft.com> schrieb: > > How can I make a hyperlink open another form and select the specified tab > > page on that form. > > > > I have declared the form I want to open as "Details" so: > > > > Details.Show() > > > > Opens the form. And to select the tab page I can use: > > > > MainTabControl.SelectedTab = SearchTabPage > > > > However I cannot combine these two commands into one click action. > > > What's the problem? > > \\\ > Dim d As New DetailsForm() > d.MainTabControl.SelectedIndex = 2 > d.Show() > /// > > -- > M S Herfried K. Wagner > M V P <URL:http://dotnet.mvps.org/> > V B <URL:http://classicvb.org/petition/> > > |
|||||||||||||||||||||||