Any thoughts?

ZeroEffect

Junior Contributor
Joined
Oct 24, 2004
Messages
204
Location
Detroit, MI
I have a tab control on a form with three tabs each tab has three list views on them. They are but as an array at runtime. Everything is working well. The I built a sub that will load the last saved data into each list view. when I do this everything goes well until the sub is finished. then on two of the tabs all of the listviews are gone. I put the sub in a thread I couuld pause and when the "loop" has gone through all of the list views everything is there once the sub is complete and the tab page is indexed to 0 showing the first tab the listviews and data are gone from the other two. This happens on to the second and third tab.

Any thoughts?

ZeroEffect
 
Code would really help. It is hard to explain why bizarre things happen when one thinks he's doing everything correctly and doesn't post any code.
 
I am a tool.

it was in my code and how I built the Array. I changed the way the array was built and everything works.

Side note though, has any other than me run into this? With a tab strip on my form and I switch between tabs I lose the ability to do alot of functions from all the menus. No copy and paste, no ceter objects all that is availible is view code. Now if I go and move around some code in the windows design form everything comes back but if I switch the tab again I lose the menu items again.

Here is how I ajust the code.

Visual Basic:
'menu items are not availible with code this way.

        CType(Me.StatusBarPanel1, System.ComponentModel.ISupportInitialize).EndInit()
        CType(Me.StatusBarPanel2, System.ComponentModel.ISupportInitialize).EndInit()
        CType(Me.StatusBarPanel3, System.ComponentModel.ISupportInitialize).EndInit()
        CType(Me.StatusBarPanel4, System.ComponentModel.ISupportInitialize).EndInit()
        CType(Me.StatusBarPanel5, System.ComponentModel.ISupportInitialize).EndInit()
        CType(Me.StatusBarPanel6, System.ComponentModel.ISupportInitialize).EndInit()
        CType(Me.StatusBarPanel8, System.ComponentModel.ISupportInitialize).EndInit()
        CType(Me.StatusBarPanel9, System.ComponentModel.ISupportInitialize).EndInit()
        Me.GroupBox2.ResumeLayout(False)
        Me.bgTodaysTimedEvents.ResumeLayout(False)
        Me.GroupBox5.ResumeLayout(False)
        Me.Panel1.ResumeLayout(False)
        CType(Me.NPTimeLCD, System.ComponentModel.ISupportInitialize).EndInit()
        CType(Me.NowPlayingLCD, System.ComponentModel.ISupportInitialize).EndInit()
        CType(Me.MediaPlayer, System.ComponentModel.ISupportInitialize).EndInit()
        CType(Me.tmrPlay, System.ComponentModel.ISupportInitialize).EndInit()
        CType(Me.FadeOutTimer, System.ComponentModel.ISupportInitialize).EndInit()
        CType(Me.tmrTimedEvents, System.ComponentModel.ISupportInitialize).EndInit()
        CType(Me.CleanupTimer, System.ComponentModel.ISupportInitialize).EndInit()
        CType(Me.Time_Timer, System.ComponentModel.ISupportInitialize).EndInit()
        Me.ResumeLayout(False)

'Change it to this way and the menu items are back until the tab is changed.

        CType(Me.StatusBarPanel1, System.ComponentModel.ISupportInitialize).EndInit()
        CType(Me.StatusBarPanel2, System.ComponentModel.ISupportInitialize).EndInit()
        CType(Me.StatusBarPanel3, System.ComponentModel.ISupportInitialize).EndInit()
        CType(Me.StatusBarPanel4, System.ComponentModel.ISupportInitialize).EndInit()
        CType(Me.StatusBarPanel5, System.ComponentModel.ISupportInitialize).EndInit()
        CType(Me.StatusBarPanel6, System.ComponentModel.ISupportInitialize).EndInit()
        CType(Me.StatusBarPanel8, System.ComponentModel.ISupportInitialize).EndInit()
        CType(Me.StatusBarPanel9, System.ComponentModel.ISupportInitialize).EndInit()
        CType(Me.NPTimeLCD, System.ComponentModel.ISupportInitialize).EndInit()
        CType(Me.NowPlayingLCD, System.ComponentModel.ISupportInitialize).EndInit()
        CType(Me.MediaPlayer, System.ComponentModel.ISupportInitialize).EndInit()
        CType(Me.tmrPlay, System.ComponentModel.ISupportInitialize).EndInit()
        CType(Me.FadeOutTimer, System.ComponentModel.ISupportInitialize).EndInit()
        CType(Me.tmrTimedEvents, System.ComponentModel.ISupportInitialize).EndInit()
        CType(Me.CleanupTimer, System.ComponentModel.ISupportInitialize).EndInit()
        CType(Me.Time_Timer, System.ComponentModel.ISupportInitialize).EndInit()
        Me.GroupBox2.ResumeLayout(False)
        Me.bgTodaysTimedEvents.ResumeLayout(False)
        Me.GroupBox5.ResumeLayout(False)
        Me.Panel1.ResumeLayout(False)
        Me.ResumeLayout(False)

Is this a known bug and is there a fix. oh the code reverts back to the way it is on the top after a tab page is changed to another tab.


Thanks,

ZeroEffect
 
Back
Top