i have 9 pages that mostly follow on after each other and pages 4 and 5 both have to use information that has been added to textboxes on page three, both to show text in a label and also to use the added text to write to the registry.
to go from one page to the next i have been using show/hide eg.


as someone told me that showing and hiding would enable me to use information from one page to the next.

the problem i have got is that when you have moved form1 i need form2 to then appear in the same position as form1 has been moved to and so on throughout all the pages.
i have tried doing it by having the position defined by using

Private Sub Form3_Shown(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Shown
Me.Location = Form2.Location
End Sub

but when each page appears there is a flash of the page in the top left hand corner of the screen before it actually lands where the previous form was.

is there a better way to do this that won't flash up in the wrong place first?

after going out for an hour with my dog i have realised that i could instead make myself the worlds most complicated single form and combine all 9 pages into one with the buttons for every page except the first being invisible at the start and then using the show/hide to hide the first pages buttons and show the second pages buttons so i dont need to worry about the second page flashing up in the wrong place.

i've now realised after completely rebuilding my program all onto one form which has been very complicated and confusing to do that instead of having the form location look backwards to where the last one was and then positioning itself accordingly that i could have arranged the position of the second form within the code on the first one. this prevents the second form appearing as a flash at the top left hand corner of the screen before repositioning itself to where the first one was as it already knows where to appear before it is shown.

Private Sub Form1_Move(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Move
Form2.Location = Me.Location
End Sub

it's a shame no-one told me this as i have wasted a load more time but i suppose all the people who know what they are doing are on holiday at the moment. anyway it doesnt matter because i have also learnt more things in my struggles to get everything to work.

i don't know if there is something wrong with the Visual Basic 2005 Express Edition Beta 2 but all day today it has been struggling to do anything whilst the rest of my computer has been running fine - i suppose thats why it's a Beta rather than a final version?

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.