vb.net - Changing text in splashscreen -


i have created splashscreen in vb.net , everythings works perfect except fact change loading text multiple texts changes every x seconds during loading.

loading text

exemple : dim loadingtexts string = {"charging 1...", "charging 2...", "info1..."}

i have no idea how can apart fact surely have use timer... how ?

actual code:

public class frmsplashscreen    private stringtable() string = {"shovelling coal server...", "programming flux capacitor...", _                                       "searching answer live, universe , everything...",                                       "waiting godot...", "starting..."}    private stringmove integer = 0      sub new()         initializecomponent()     end sub      public overrides sub processcommand(byval cmd system.enum, byval arg object)         mybase.processcommand(cmd, arg)     end sub      public enum splashscreencommand         somecommandid     end enum      public sub splashtimer_tick(sender object, e eventargs) handles splashtimer.tick         me.splashtimer.enabled = false          me.labelstarting.text = stringtable(stringmove)         me.labelstarting.refresh()          stringmove += 1         if stringmove < stringtable.length me.splashtimer.enabled = true     end sub end class 

thanks.

assuming have timer,progress bar,button , label,with progress bar's step value set 10,your code may this:

public class form1

private sub butstart_click(sender system.object, e system.eventargs) handles butstart.click     timer1.enabled = true end sub  private sub timer1_tick(sender system.object, e system.eventargs) handles timer1.tick     progressbar1.increment(progressbar1.step) 'use method below     'progressbar1.value+=progressbar1.step       me.refresh()      if progressbar1.value >= 0 andalso progressbar1.value < 35         label1.text = progressbar1.value & "% starting"         me.refresh()     elseif progressbar1.value >= 35 andalso progressbar1.value < 75         label1.text = progressbar1.value & "% mid value"         me.refresh()     elseif progressbar1.value >= 75 andalso progressbar1.value < 100         label1.text = progressbar1.value & "% finishing"         me.refresh()     elseif progressbar1.value = 100         timer1.enabled = false         'move next form or     end if end sub 

end class


Comments

Popular posts from this blog

java - activate/deactivate sonar maven plugin by profile? -

python - TypeError: can only concatenate tuple (not "float") to tuple -

java - What is the difference between String. and String.this. ? -