Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

SET ENABLED BUTTON PROPERTY TRIGGER RADION BUTTON EVENT

Posted on 2013-06-11
14
249 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
Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 
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
 
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

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
How to use odbc in vb to connect to ms sql 14 62
get column names from table in vb.net 8 49
vb.net class 3 21
VB.net capture  result of a SQL query in variables 3 20
I think the Typed DataTable and Typed DataSet are very good options when working with data, but I don't like auto-generated code. First, I create an Abstract Class for my DataTables Common Code.  This class Inherits from DataTable. Also, it can …
It’s quite interesting for me as I worked with Excel using vb.net for some time. Here are some topics which I know want to share with others whom this might help. First of all if you are working with Excel then you need to Download the Following …
Email security requires an ever evolving service that stays up to date with counter-evolving threats. The Email Laundry perform Research and Development to ensure their email security service evolves faster than cyber criminals. We apply our Threat…

860 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