General discussion

Locked

VB6 using a progress bar

By BSchoening ·
I added mscomctl.ocx to my VB6 project to use a progress bar, now VB6 dies. Any ideas?

This conversation is currently closed to new comments.

5 total posts (Page 1 of 1)  
| Thread display: Collapse - | Expand +

All Comments

Collapse -

VB6 using a progress bar

by Sakis Samaras In reply to VB6 using a progress bar

Hi,
First of all: What do you mean by "VB6 dies"?
Second :some times ago when I 've used some data controls seemed like the VB6 colapsed and the open project seemed to Die too. Well it was some OCX I 've used which had a definition for a controll underthe same name with other used OCXs. So one thing to check:look what have you includen in your project; another thing is do you face that even after including progress bar it does 'nt seem to work at all then take a look at the sample code:
{
sub my_sub
dim dyn as recordset, db as database
dim i as integer
set db=opendatabase("c:\db\db.mdb")
set dyn=db.openrecordset("Select * from table",dbopendynaset)
if not (dyn.eof and dyn.bof) then
dyn.movelast
progressbar1.maxvalue=dyn.recordcount
' this sets the maximum value of progress bar
dyn.movefirst
end if
while not dyn.eof
i=i+1
'do something here - place your code here
progressbar.value=i
'this is to asign a new value to be displaied
progressbar.refresh
'to make visible t

Collapse -

VB6 using a progress bar

by BSchoening In reply to VB6 using a progress bar

The question was auto-closed by TechRepublic

Collapse -

VB6 using a progress bar

by wtatters In reply to VB6 using a progress bar

If you dont have service pack 3 for VB6 get it. This solves a lot of problems with common control.

Second make sure that you havent accidentilly registed an older verion of the common controls ... either instead of ... or as well as mccomctl.Next... try adding mscomctl as a component of an empty project to see if you get the same problem.

Next ... try adding mscomctl as a component with no project open.

If all else fails ... reinstall Service Pack 3 ... this should replace the version of mscomctl on your machinge with the latest version - chances are at this stage that your component is corrupted some how.

Collapse -

VB6 using a progress bar

by BSchoening In reply to VB6 using a progress bar

The question was auto-closed by TechRepublic

Collapse -

VB6 using a progress bar

by BSchoening In reply to VB6 using a progress bar

This question was auto closed due to inactivity

Back to Web Development Forum
5 total posts (Page 1 of 1)  

Software Forums