Solved

SET ENABLED BUTTON PROPERTY TRIGGER RADION BUTTON EVENT

Posted on 2013-06-11
14
242 Views
Last Modified: 2013-06-17
Hi All,

I have weird problem.

  Private Sub btnProses_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles _
                btnProses.Click

        Dim btn As Button = DirectCast(sender, Button)
       
           blnProcess = True

        btn.Enabled = False

       ----coding
End Sub

After  btn.Enabled = False this, application goes to :

  Private Sub RadioButton_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles _
                rdbDariTemplate.Click, _
                rdbDariPerusahaan.Click

        If blnProcess Then Exit Sub

End Sub

That's why I put blnProcess

Why's going on ?

Thank you.
0
Comment
Question by:emi_sastra
  • 7
  • 7
14 Comments
 
LVL 83

Expert Comment

by:CodeCruiser
ID: 39240323
No idea what the question is. You want to raise radio button select event when button is clicked?

By the way, you can replace this

        Dim btn As Button = DirectCast(sender, Button)
       
           blnProcess = True

        btn.Enabled = False

with

        blnProcess = True
        btnProses.Enabled = False

as you are only handling one button click in that procedure (as this code shows).
0
 
LVL 1

Author Comment

by:emi_sastra
ID: 39240341
I mean.

When I press btnProses, it goes to :

  Private Sub btnProses_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles _
                btnProses.Click

        Dim btn As Button = DirectCast(sender, Button)
       
           blnProcess = True

        btn.Enabled = False -->> The problem is it goes to RadioButton_Click automatically.

       ----coding
End Sub


Thank you.
0
 
LVL 83

Expert Comment

by:CodeCruiser
ID: 39242493
Can you show your complete code? I don't see why it would do that based on existing code.
0
 
LVL 1

Author Comment

by:emi_sastra
ID: 39250789
Please see the video.

You won't believe it.

Thank you.
ENABLED-PROBLEM.swf
0
 
LVL 83

Expert Comment

by:CodeCruiser
ID: 39251219
Ok. As a test, can you change this

        Dim btn As Button = DirectCast(sender, Button)
       
           blnProcess = True

        btn.Enabled = False

to
       
           blnProcess = True

           btnProses.Enabled = False
0
 
LVL 1

Author Comment

by:emi_sastra
ID: 39251256
Same effect.

Thank you.
0
 
LVL 83

Expert Comment

by:CodeCruiser
ID: 39251260
In that case we will need to see more code.
0
Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

 
LVL 1

Author Comment

by:emi_sastra
ID: 39251265
What that be ?

Thank you.
0
 
LVL 83

Expert Comment

by:CodeCruiser
ID: 39251305
Possible all the code from that form.
0
 
LVL 1

Author Comment

by:emi_sastra
ID: 39251324
What could be the problem ?
Even I put those radio button inside panel, the problem still there.

Thank you.
0
 
LVL 83

Expert Comment

by:CodeCruiser
ID: 39251707
Problem could be anything and hard for me to guess without having access to all the code. One way of finding it out would be to look at the call stack window when radio button change event fires and see where it is coming from.
0
 
LVL 1

Author Comment

by:emi_sastra
ID: 39251952
- One way of finding it out would be to look at the call stack window when radio button change event fires and see where it is coming from.
How to check it, what should I do ?

Thank you.
0
 
LVL 83

Accepted Solution

by:
CodeCruiser earned 500 total points
ID: 39253584
0
 
LVL 1

Author Closing Comment

by:emi_sastra
ID: 39255051
Great.

Thank you very much for your help.
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Introduction As chip makers focus on adding processor cores over increasing clock speed, developers need to utilize the features of modern CPUs.  One of the ways we can do this is by implementing parallel algorithms in our software.   One recent…
Microsoft Reports are based on a report definition, which is an XML file that describes data and layout for the report, with a different extension. You can create a client-side report definition language (*.rdlc) file with Visual Studio, and build g…
This video shows how to remove a single email address from the Outlook 2010 Auto Suggestion memory. NOTE: For Outlook 2016 and 2013 perform the exact same steps. Open a new email: Click the New email button in Outlook. Start typing the address: …
You have products, that come in variants and want to set different prices for them? Watch this micro tutorial that describes how to configure prices for Magento super attributes. Assigning simple products to configurable: We assigned simple products…

757 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now