4 Replies - 22546 Views - Last Post: 06 December 2008 - 11:35 AM Rate Topic: -----

#1 Zooms  Icon User is offline

  • D.I.C Head

Reputation: 2
  • View blog
  • Posts: 78
  • Joined: 04-December 08

How to re-enable, and disable button

Posted 05 December 2008 - 02:42 PM

Hiya!

I wanted to know how to disable a commandbutton when a progressbar is in a certain value.
And i also wanted to know how to re-enable a button, when the progressbar is in a certain value.

This is how far ive got:

If ProgressBar1.Value = "100" Then
Button6_EnabledChanged()


But i dont know what to type inside the ( ),s.
So, anybody know what to type there? :)


Add: Im using Visual Basic -08

Is This A Good Question/Topic? 0
  • +

Replies To: How to re-enable, and disable button

#2 Jayman  Icon User is offline

  • Student of Life
  • member icon

Reputation: 418
  • View blog
  • Posts: 9,532
  • Joined: 26-December 05

Re: How to re-enable, and disable button

Posted 05 December 2008 - 03:52 PM

Moved to VB.NET.
Was This Post Helpful? 0
  • +
  • -

#3 jacobjordan  Icon User is offline

  • class Me : Perfection
  • member icon

Reputation: 113
  • View blog
  • Posts: 1,499
  • Joined: 11-June 08

Re: How to re-enable, and disable button

Posted 05 December 2008 - 04:59 PM

Just use
Button6.Enabled = True 'To Enable It
Button6.Enabled = False 'To Disable It


That's all, you don't need to call the event handler like you were trying to do.
Was This Post Helpful? 1
  • +
  • -

#4 Zooms  Icon User is offline

  • D.I.C Head

Reputation: 2
  • View blog
  • Posts: 78
  • Joined: 04-December 08

Re: How to re-enable, and disable button

Posted 06 December 2008 - 03:22 AM

View Postjacobjordan, on 5 Dec, 2008 - 03:59 PM, said:

Just use
Button6.Enabled = True 'To Enable It
Button6.Enabled = False 'To Disable It


That's all, you don't need to call the event handler like you were trying to do.


Oh, thanks! :)
Was This Post Helpful? 0
  • +
  • -

#5 jacobjordan  Icon User is offline

  • class Me : Perfection
  • member icon

Reputation: 113
  • View blog
  • Posts: 1,499
  • Joined: 11-June 08

Re: How to re-enable, and disable button

Posted 06 December 2008 - 11:35 AM

For the record, calling the EnabledChanged event handler won't enable or disable your button.
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1