G
Geoff Jones
Hi
I posted a question yesterday but didn't get any replies - probably because
I didn't give enough information to what I'm trying to do, so here we go
again but this time with a bit more detail:
In my main application form, I am performing some lengthy calculations.
During these calculations I want to display another form with a progress
control in it to give the user an idea of how far the calculations have
gone. For the sake of argument, let the main form be called Form1 and the
form with the progress control Form2.
The pseudo code I have written below gives an idea of what I am doing at
present:
'In the code of Form1
Dim frm2 As New Form2
frm2.Show()
frm2.ProgressControl1.Minimum = 1
frm2.ProgressControl1.Maximum = 1000
For count=1 To 1000
' Do some calculations
frm2.ProgressControl1.Increment(1) ' Increment the progress control
End For
frm2.Hide()
etc.
This does work! However, the form which includes the progress control is not
centered in Form1. I've tried using StartPosition and CenterParent.
Can anybody help me do this?
Thanks in advance
Geoff
I posted a question yesterday but didn't get any replies - probably because
I didn't give enough information to what I'm trying to do, so here we go
again but this time with a bit more detail:
In my main application form, I am performing some lengthy calculations.
During these calculations I want to display another form with a progress
control in it to give the user an idea of how far the calculations have
gone. For the sake of argument, let the main form be called Form1 and the
form with the progress control Form2.
The pseudo code I have written below gives an idea of what I am doing at
present:
'In the code of Form1
Dim frm2 As New Form2
frm2.Show()
frm2.ProgressControl1.Minimum = 1
frm2.ProgressControl1.Maximum = 1000
For count=1 To 1000
' Do some calculations
frm2.ProgressControl1.Increment(1) ' Increment the progress control
End For
frm2.Hide()
etc.
This does work! However, the form which includes the progress control is not
centered in Form1. I've tried using StartPosition and CenterParent.
Can anybody help me do this?
Thanks in advance
Geoff