ProgressBar not visible

AHilberink

Active Member
Licensed User
Longtime User
Hi,

I have a problem making my progressbar visible.

Could it be a problem using SQL library, making it visible?

The only way I see the progressbar is when I put a MsgBox within the procedure.

I tried: Activity.Addview("ProgressBar1",....) and ProgressDialogShow

Any suggestions?

Thanks,
André
 

AHilberink

Active Member
Licensed User
Longtime User
Hi Erel,

I tried both.

Doesn't matter which one I show, just inform that the process is running.
Choose the easiest one.

Part source:
B4X:
Activity_Create(FirstTime As Boolean)
   If FirstTime Then
      File.MakeDir(File.DirRootExternal,"DVDProfiler")
      ProgressBar1.Initialize("ProgressBar1")
      ProgressBar1.Indeterminate = True
      parser.Initialize
      Activity.AddMenuItem2("Importeren","Import",LoadBitmap(File.DirAssets,"import.png"))
      InitTable      
      SQL1.Initialize(DBFilePath, DBFileName, True)
      SQLTableCreate
   End If

........

Sub ReadXML
   Dim in As TextReader
      
   If File.Exists(XMLFilePath, XMLFile) = True Then
      Activity.AddView(ProgressBar1,60,140,200,200)
      ProgressBar1.BringToFront
      SQL1.ExecNonQuery("DROP TABLE IF EXISTS " & DBTableName)
      SQLTableCreate
      in.Initialize2(File.OpenInput(XMLFilePath, XMLFile),"windows-1252")
      parser.Parse2(in, "Parser")
      in.Close
      ProgressBar1.RemoveView
   
      FetchTitelLijst
   Else
      Msgbox("XML bestand niet gevonden.","")
   End If
End Sub
I hope you can help.

Thanks,
André
 
Last edited by a moderator:
Upvote 0

AHilberink

Active Member
Licensed User
Longtime User
Hi Erel,

It looks like DoEvents slows the programm down.

Is this correct or did I something wrong?

André
 
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…