Click here to Skip to main content
15,886,919 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi, i am using tabstrip control, on one of the pages I have a combobox with list of pdf files from a network source and a webcontrol to show them.
It is not sure if a user will change to this tab and that is why I am loading the list of files only on the first selection of this tab to not slowdown the form showing by doing this in the load event. The problem is that there is a lot of files and it takes few seconds to load them. Meanwhile I would like to show a message that the files are loading.

What I have tried:

I tried to use the selecting event and when the tabpage with the drawings is clicked then I launch the loading sub. Befeore launching the loading subroutine I tried to show a label with text "Loading.." but from what I have checked the tabpage controls are created ont the first showing of the tab. So as a result the label doesnt even become visible as the tabstrip hangs in the backgournd and after loading the combobox with data then it becomes visible.

If e.TabPageIndex = 7 Then
            lbl_drawings_loading.Visible = True
            drawings_refresh()
            lbl_drawings_loading.Visible = False
End If
Posted
Comments
Ralf Meier 5-Feb-24 4:12am    
I'm not quiet sure what you are exactly doing (not much code posted) - but perhaps it could help if you write an Invalidate to your Label and after this an "Application.doEvents" before you start your method ...

1 solution

Instead of a Loading Popup I would try a separate task or multithreading for loading the list.
Multithreading with VB.NET - A beginner's choice[^]
Tasks/Continuations and Death of the ThreadPool?[^]
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900