Attachment 99121
Hi there. Attached is a picture of my XAML form.
I have just added a progress bar to it and a status bar. I have no code for these yet.
I have been playing about with some code but I really don't know what I'm doing and would like some help to start a fresh.
I have a button on my form.. which when clicked, opens a SQL connection, downloads data to a datatable, does some calculations, adds the datatable to an Excel spreadsheet and creates a pivot table. All works fine.
I have done a bit of reading on progress bars and looked at some other posts on the site but I don't know how to implement it into my code as some examples talk about doing it in a background thread?
What I want to understand is, Can I have the progress bar on the same form? Would code needed to make it work be placed inside my button click event? If outside where would I need to place it?
I am confused as to where to place code relating to a progress bar... i.e in the Main Window Class which i have at the moment and how to make the progress correlate to what actions are being taken in the button click event. I think one of the things that has confused me is a lot of the examples online have a timer which is something I don't know if a WPF form can have? And these examples show how the progress relates to the timer.. but not to other stuff.
I would like if somebody has got the time to provide some example code and treat me as If I'm a dummy so I can understand how I can implement it into my project as at the moment I am feeling like one :)
I'd really appreciate it
Hi there. Attached is a picture of my XAML form.
I have just added a progress bar to it and a status bar. I have no code for these yet.
I have been playing about with some code but I really don't know what I'm doing and would like some help to start a fresh.
I have a button on my form.. which when clicked, opens a SQL connection, downloads data to a datatable, does some calculations, adds the datatable to an Excel spreadsheet and creates a pivot table. All works fine.
I have done a bit of reading on progress bars and looked at some other posts on the site but I don't know how to implement it into my code as some examples talk about doing it in a background thread?
What I want to understand is, Can I have the progress bar on the same form? Would code needed to make it work be placed inside my button click event? If outside where would I need to place it?
Code:
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.Windows.RoutedEventArgs) Handles Button2.Click
I would like if somebody has got the time to provide some example code and treat me as If I'm a dummy so I can understand how I can implement it into my project as at the moment I am feeling like one :)
I'd really appreciate it