|
-
Sep 9th, 2007, 03:44 PM
#1
Thread Starter
Hyperactive Member
[RESOLVED] [2005] Progress Bar Created in a Module?
I've found that asking one or two questions before I attempt something new prevents 10 questions later, so with that in mind: is it possible to create and update a progress bar from a module?
I ask because the mass of calculating under the hood that I want get through occurs inside a module - it has nothing to do with the display, so I send a sub out to do it.
Something makes me uneasy about idea, and I was wondering what experienced programmers do when this type of situation occurs.
Thanx!
Last edited by neef; Sep 11th, 2007 at 07:23 PM.
Intermediate Level Programmer Extraordinaire 
-
Sep 9th, 2007, 06:29 PM
#2
Fanatic Member
Re: [2005] Progress Bar Created in a Module?
Ive never tried it but the way i would approch this is to make a class that inherets the progress bar object, then add the calculation code. This would mean you would have the lot wrapped up in a nice little object.
EDIT: I would just like to state this is how i would approch it im not sure if this is the best way as i have not needed to use progress bars yet.
Languages: Visual Basic 05/08, C# 08
IDE: Express Editions
Framework: 2.0, 3.0, 3.5
Lesson 5: Don't take domestic advice from perpetual singles. - Mendhak
-
Sep 9th, 2007, 06:53 PM
#3
Thread Starter
Hyperactive Member
Re: [2005] Progress Bar Created in a Module?
That's not a bad idea at all; just mostly involves cut and pasting what I have and passing the correct info to the inherited class.
Intermediate Level Programmer Extraordinaire 
-
Sep 9th, 2007, 06:57 PM
#4
Fanatic Member
Re: [2005] Progress Bar Created in a Module?
More or less. Really a module is a type of class. So why use a type of class when you can use one itself. I would also try make it as generic as possible that way it becomes reusable. Maybe overload the functions that exept your data to cater for different data types.
BTW: If robdog888 is looking, i finally found a good use for classes
Languages: Visual Basic 05/08, C# 08
IDE: Express Editions
Framework: 2.0, 3.0, 3.5
Lesson 5: Don't take domestic advice from perpetual singles. - Mendhak
-
Sep 11th, 2007, 07:22 PM
#5
Thread Starter
Hyperactive Member
Re: [2005] Progress Bar Created in a Module?
Just implemented this idea in my project and with some fiddling it works great! Thanks for your help CodedFire!
Intermediate Level Programmer Extraordinaire 
-
Sep 12th, 2007, 02:48 AM
#6
Fanatic Member
Re: [RESOLVED] [2005] Progress Bar Created in a Module?
Languages: Visual Basic 05/08, C# 08
IDE: Express Editions
Framework: 2.0, 3.0, 3.5
Lesson 5: Don't take domestic advice from perpetual singles. - Mendhak
-
Sep 12th, 2007, 02:55 AM
#7
Re: [2005] Progress Bar Created in a Module?
 Originally Posted by CodedFire
i finally found a good use for classes 
No, you finally found a good use for inheritance. There's more to classes than just inheritance. In fact, classes and inheritance don't even have to go together because VB6 used classes but didn't support inheritance. Apart from that, every time you add a form to your project you're inheriting the Form class, so you've been using inheritance all along.
-
Sep 12th, 2007, 11:28 AM
#8
Fanatic Member
Re: [RESOLVED] [2005] Progress Bar Created in a Module?
Thanks jmcilinney for raining on my parade
Although you are correct. I am only implementing classes and all things OO into my projects. I was finding it difficul to understand a classes use over a module. But inheritance has really helped me understand one of the ways of class usage.
Obviously ive been using all the features of basic OO since day one but trying to, i suppose understand it has been a bit awkward but im getting there.
Languages: Visual Basic 05/08, C# 08
IDE: Express Editions
Framework: 2.0, 3.0, 3.5
Lesson 5: Don't take domestic advice from perpetual singles. - Mendhak
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|