on 09-15-2008 9:27 AM
Hi All,
I tried Following code for ProgressBar. But i heard that ProgressBar not working in SAP B1 2005. That's y following code not working.
But in Financial Module -> Financial reports -> Financial -> In that plz select any one Like Balance Sheet. In that select Date and To date. And click on Ok button. After clicking how it shows ProgressBar. Like that i want to show ProgressBar.
Try
Dim PBar As SAPbouiCOM.ProgressBar
PBar = SBO_Application.StatusBar.CreateProgressBar("Start...", 27, True)
PBar.Stop()
System.Runtime.InteropServices.Marshal.ReleaseComObject(PBar)
PBar = Nothing
Catch ex As Exception
End Try
Thanks and Regards
Harish Patil
Hi Harish,
There is a good sample provided with the SDK, you can find it in C:\Program Files\SAP\SAP Business One SDK\Samples\COM UI\VB.NET\09.ProgressBar\2003. (the default path for the samples)
I have just tested this sample on SAP Business One 2005 A SP01 PL48 and it worked correctly for me. It is a sample showing how to start the progress bar, move it forwards, backwards and how to stop it.
This is the method to start the bar:
Private Sub cmdStart_Click(ByVal sender As System.Object, ByVal e
As System.EventArgs) Handles cmdStart.Click
'Create a Progress Bar
oProgBar = SBO_Application.StatusBar.CreateProgressBar("Sample Progress Bar", 27, True)
''Enable the progress bar controls
cmdFoward.Enabled = True
cmdBack.Enabled = True
cmdStop.Enabled = True
'Enable the 'Start' button
cmdStart.Enabled = True
End Sub
You can then increment it with
oProgBar.Value += 1
And finally, stop it or release it with
oProgBar.Stop()
Hope this is useful,
Regards,
Niall
SAP Business One Forums
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
I don't understand this code. I created on form in SAP Screen Painter. On this i taken one button. And on this button i open new form. I want when i click on that button fisrt process ProgressBar after that form should be open.
Like plz see Financial -> Financial Reports -> Financial -> open Balance Sheet form .
And in that click on OK button. I want same thing.
How to do it ?
Thanks and Regards
Harish
Hi ,
Just put a FOR loop and in that u increment ur progress bar and then after a specific period of time u stop the progeress bar and then open ur User form.
Just check the sample below.
Dim oProgressBar As SAPbouiCOM.ProgressBar = Nothing
oProgressBar = objSBOAPI.SBO_Appln.StatusBar.CreateProgressBar("Opeing new form...", 17, True)
for i as interger = 0 to 60
oProgressBar.Value = i
Next
'Open ur form here and do ur functionality.
oProgressBar.Stop()
Hope it helps,
Vasu Natari.
Dear Harish,
I am not sure how to produce the progress bar you see when following that path in the application.
The progress bar object I am referring to is the one in the bottom left of the application which is controlled by the StatusBar object of the UI API.
You can have this type of progress bar take the same action as you described - catch the event of the button being clicked, and in this event create and manage the Progress bar, and when progress bar is finsished, open a new form - but it won't look 100% the same as the example you suggested.
Regards,
Niall
Hi,
I use the folowing code below,
Dim oProgressBar As SAPbouiCOM.ProgressBar = Nothing
oProgressBar = objSBOAPI.SBO_Appln.StatusBar.CreateProgressBar("Initilizing Database...", 17, True)
oProgressBar.Value = 0
oProgressBar.Value = oProgressBar.Value + 1
oProgressBar.Text = "Create Table "
'Write my table creation code here
oProgressBar.Value = oProgressBar.Value + 1
oProgressBar.Stop()
If Not oProgressBar Is Nothing Then
oProgressBar.Stop()
End If
Hope it helps,
Vasu Natari.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
98 | |
11 | |
11 | |
6 | |
6 | |
4 | |
4 | |
3 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.