Jump to content

Auto Progress bar

Need some help with Visual Basic.

 

I have some checkboxes that run commands I'm wanting the progress bar to auto the value of the progress of the bar.

 

Example:

 
        If CheckBox5.Checked Then
            MsgBox("Company information updated")
            ProgressBar1.PerformStep()
        End If

 

Please Help!!!

 

Hope that makes sense.

 

Edward.

Link to comment
Share on other sites

Link to post
Share on other sites

8 minutes ago, AgentEddie99 said:

Need some help with Visual Basic.

 

I have some checkboxes that run commands I'm wanting the progress bar to auto the value of the progress of the bar.

 

Example:

 
        If CheckBox5.Checked Then
            MsgBox("Company information updated")
            ProgressBar1.PerformStep()
        End If

 

Please Help!!!

 

Hope that makes sense.

 

Edward.

I don't know much about Visual Basic but I know the .NET framework and C#.

 

So I'm guessing it works really similarly.

 

Have you told it how much to increment by OR if you want to automatically go to a set progress?

Judge a product on its own merits AND the company that made it.

How to setup MSI Afterburner OSD | How to make your AMD Radeon GPU more efficient with Radeon Chill | (Probably) Why LMG Merch shipping to the EU is expensive

Oneplus 6 (Early 2023 to present) | HP Envy 15" x360 R7 5700U (Mid 2021 to present) | Steam Deck (Late 2022 to present)

 

Mid 2023 AlTech Desktop Refresh - AMD R7 5800X (Mid 2023), XFX Radeon RX 6700XT MBA (Mid 2021), MSI X370 Gaming Pro Carbon (Early 2018), 32GB DDR4-3200 (16GB x2) (Mid 2022

Noctua NH-D15 (Early 2021), Corsair MP510 1.92TB NVMe SSD (Mid 2020), beQuiet Pure Wings 2 140mm x2 & 120mm x1 (Mid 2023),

Link to comment
Share on other sites

Link to post
Share on other sites

9 minutes ago, AgentEddie99 said:

Need some help with Visual Basic.

Why are you using Visual Basic and not C#?

9 minutes ago, AgentEddie99 said:

Example:

 
        If CheckBox5.Checked Then
            MsgBox("Company information updated")
            ProgressBar1.PerformStep()
        End If

Use code tags:

PZ20Fqo.png

9 minutes ago, AgentEddie99 said:

I have some checkboxes that run commands I'm wanting the progress bar to auto the value of the progress of the bar.

Hope that makes sense.

That doesn't really make any sense...

The single biggest problem in communication is the illusion that it has taken place.

Link to comment
Share on other sites

Link to post
Share on other sites

1 minute ago, Nuluvius said:

Why are you using Visual Basic and not C#?

Use code tags:

PZ20Fqo.png

That doesn't really make any sense...

Basically it sounds like this.

 

He wants to check to see if somebody checks a checkbox.

 

If that happens he wants to say that information was saved and wants to show a progress bar animation to show that.

Judge a product on its own merits AND the company that made it.

How to setup MSI Afterburner OSD | How to make your AMD Radeon GPU more efficient with Radeon Chill | (Probably) Why LMG Merch shipping to the EU is expensive

Oneplus 6 (Early 2023 to present) | HP Envy 15" x360 R7 5700U (Mid 2021 to present) | Steam Deck (Late 2022 to present)

 

Mid 2023 AlTech Desktop Refresh - AMD R7 5800X (Mid 2023), XFX Radeon RX 6700XT MBA (Mid 2021), MSI X370 Gaming Pro Carbon (Early 2018), 32GB DDR4-3200 (16GB x2) (Mid 2022

Noctua NH-D15 (Early 2021), Corsair MP510 1.92TB NVMe SSD (Mid 2020), beQuiet Pure Wings 2 140mm x2 & 120mm x1 (Mid 2023),

Link to comment
Share on other sites

Link to post
Share on other sites

11 minutes ago, AluminiumTech said:

Basically it sounds like this.

 

He wants to check to see if somebody checks a checkbox.

 

If that happens he wants to say that information was saved and wants to show a progress bar animation to show that.

Then it would be best to pass a IProgress into a Task and optionally a CancellationToken if you need to support cancellation. You register a callback on the IProgress interface for updating your progress bar with whatever model you like.

The single biggest problem in communication is the illusion that it has taken place.

Link to comment
Share on other sites

Link to post
Share on other sites

15 minutes ago, AluminiumTech said:

Basically it sounds like this.

 

He wants to check to see if somebody checks a checkbox.

 

If that happens he wants to say that information was saved and wants to show a progress bar animation to show that.

Thats what im wanting thanks.

Link to comment
Share on other sites

Link to post
Share on other sites

1 minute ago, AgentEddie99 said:

Thats what im wanting thanks.

Well then just set a value to it.

 

Underneath you're messagebox just type:

 

ProgressBar1.Value = 100;

This is C# code by the way. I have no idea if this works in VB.

Judge a product on its own merits AND the company that made it.

How to setup MSI Afterburner OSD | How to make your AMD Radeon GPU more efficient with Radeon Chill | (Probably) Why LMG Merch shipping to the EU is expensive

Oneplus 6 (Early 2023 to present) | HP Envy 15" x360 R7 5700U (Mid 2021 to present) | Steam Deck (Late 2022 to present)

 

Mid 2023 AlTech Desktop Refresh - AMD R7 5800X (Mid 2023), XFX Radeon RX 6700XT MBA (Mid 2021), MSI X370 Gaming Pro Carbon (Early 2018), 32GB DDR4-3200 (16GB x2) (Mid 2022

Noctua NH-D15 (Early 2021), Corsair MP510 1.92TB NVMe SSD (Mid 2020), beQuiet Pure Wings 2 140mm x2 & 120mm x1 (Mid 2023),

Link to comment
Share on other sites

Link to post
Share on other sites

6 minutes ago, AluminiumTech said:

Well then just set a value to it.

If you do that from the context of another thread then it will explode. If you do this plus the work in the same UI thread then your UI is going to become unresponsive/work like crap.

 

That is why I suggested that you process your work in a separate thread.

The single biggest problem in communication is the illusion that it has taken place.

Link to comment
Share on other sites

Link to post
Share on other sites

1 minute ago, Nuluvius said:

If you do that from the context of another thread then it will explode. If you do this plus the work in the same UI thread then your UI is going to become unresponsive/work like crap.

 

That is why I suggested that you process your work in a separate thread.

It's .NET . You can do everything from the same place.

Judge a product on its own merits AND the company that made it.

How to setup MSI Afterburner OSD | How to make your AMD Radeon GPU more efficient with Radeon Chill | (Probably) Why LMG Merch shipping to the EU is expensive

Oneplus 6 (Early 2023 to present) | HP Envy 15" x360 R7 5700U (Mid 2021 to present) | Steam Deck (Late 2022 to present)

 

Mid 2023 AlTech Desktop Refresh - AMD R7 5800X (Mid 2023), XFX Radeon RX 6700XT MBA (Mid 2021), MSI X370 Gaming Pro Carbon (Early 2018), 32GB DDR4-3200 (16GB x2) (Mid 2022

Noctua NH-D15 (Early 2021), Corsair MP510 1.92TB NVMe SSD (Mid 2020), beQuiet Pure Wings 2 140mm x2 & 120mm x1 (Mid 2023),

Link to comment
Share on other sites

Link to post
Share on other sites

2 minutes ago, AluminiumTech said:

It's .NET . You can do everything from the same place.

You can if you don't really care about what it is that you are doing or have any real aspirations.

 

It seems that it's exactly that kind of mentality that results in you comming on here so often moaning when things go so badly wrong: case and point.

 

Ultimately there's only one response I can give to such a statement:

MkCNa9w.jpg

The single biggest problem in communication is the illusion that it has taken place.

Link to comment
Share on other sites

Link to post
Share on other sites

2 minutes ago, Nuluvius said:

You can if you don't really care about what it is that you are doing or have any real aspirations.

 

It seems that it's exactly that kind of mentality that results in you comming on here so often moaning when things go so badly wrong: case and point.

 

Ultimately there's only one response I can give to such a statement:

MkCNa9w.jpg

With that I realized the component couldn't be used in a multi-threaded way. It could only be dealt with in a single threaded way.

Judge a product on its own merits AND the company that made it.

How to setup MSI Afterburner OSD | How to make your AMD Radeon GPU more efficient with Radeon Chill | (Probably) Why LMG Merch shipping to the EU is expensive

Oneplus 6 (Early 2023 to present) | HP Envy 15" x360 R7 5700U (Mid 2021 to present) | Steam Deck (Late 2022 to present)

 

Mid 2023 AlTech Desktop Refresh - AMD R7 5800X (Mid 2023), XFX Radeon RX 6700XT MBA (Mid 2021), MSI X370 Gaming Pro Carbon (Early 2018), 32GB DDR4-3200 (16GB x2) (Mid 2022

Noctua NH-D15 (Early 2021), Corsair MP510 1.92TB NVMe SSD (Mid 2020), beQuiet Pure Wings 2 140mm x2 & 120mm x1 (Mid 2023),

Link to comment
Share on other sites

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×