473,800 Members | 2,404 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

how to disable textbox when click on radiobutton using VB script on Visual Studio.Net

7 New Member
how to disable textbox when click on radiobutton using VB script on Visual Studio.Net 2005.

currently i used this coding but it is not functioning.


Expand|Select|Wrap|Line Numbers
  1. Private sub RadioButton1_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles RadioButton1.CheckedChanged
  2.  
  3.         If RadioButton1.Checked Then
  4.             Me.textBox1.Visible = True
  5.         Else
  6.             Me.textBox1.Visible = False
  7.         End If
  8.     End Sub
Mar 11 '10 #1
5 9083
tlhintoq
3,525 Recognized Expert Specialist
TIP: When you are writing your question, there is a button on the tool bar that wraps the [code] tags around your copy/pasted code. It helps a bunch. Its the button with a '#' on it. More on tags. They're cool. Check'em out.
Mar 11 '10 #2
tlhintoq
3,525 Recognized Expert Specialist
I might suggest something a bit more... smooth.

Expand|Select|Wrap|Line Numbers
  1. Private sub RadioButton1_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles RadioButton1.CheckedChanged
  2.  
  3. Me.textBox1.Visible = RadioButton1.Checked
  4.  
  5.     End Sub
The right side of an equasion is evaluated before the left.
Thus if RadioButton1.Ch ecked evaluates to true, then me.textBox1.Vis ible is set to true.
Mar 11 '10 #3
hidayu1986
7 New Member
thank u very much for your tips and your code suggestion. i already try it but it still the same not functioning when i click on radiobutton, the text box still not visible
Mar 11 '10 #4
tlhintoq
3,525 Recognized Expert Specialist
Then you aren't running the code. It's that simple.

Are you sure you have assigned this method as the event handler to the control?

Have you put a breakpoint in (at line 3) to watch the code break on this line, to ensure it is being executed?
Mar 11 '10 #5
hidayu1986
7 New Member
i already try this code. is it that you mean?


Private Sub RadioButton1_Ch eckedChanged(By Val sender As System.Object, ByVal e As System.EventArg s) Handles RadioButton1.Ch eckedChanged
Me.TextBox3.Vis ible = RadioButton1.Ch ecked
End Sub
End Class
Mar 11 '10 #6

Sign in to post your reply or Sign up for a free account.

Similar topics

9
3619
by: msnews.microsoft.com | last post by:
Hello! I'm Jim by asp How can show "abc" in textbox when click one botton?
0
1399
by: James Smith | last post by:
When I am trying to compile c# code with visual studio 2003 it takes about ten times longer than it should. It appears t be trying to connect to various servers and times out on three of them which is causing the delay. What I can't work it is why or what is trying to connect to these servers as all the source code is located on the C:\ and any webservices are configured to localhost. I have checked to make sure that all *.csproj files do not...
6
9068
by: Reinhard Lehner | last post by:
Hi there! I spent the last week trying to fix this problem - I am always getting an error when trying to run an application (WinForms or PPC) out of Visual Studio IDE: 'Error while trying to run project: Unable to start debugging.' 'The debugger is not properly installed. Run setup to install or repair the debugger.'
0
1169
by: Wendy Elizabeth | last post by:
When I am using Visual Studio.net in the debug mode, I want to be able to increase the size of values that can be displayed. For example when using the "watch" or other debug windows, I know I want to see a field that is 8k. However, the size of the display is truncated somehow. I want to be able to see the entire field so that I can copy and paste the results to notepad. What would I need to do increase the size of the debug windows?
5
1213
by: Charlie | last post by:
I am a student taking a computer class programmning with ms visual C++. The college is using ms visual C++ 6.0 on it's computers. I purchased ms visual studio.net (Academic) (ver 2003) which is more up to date. How can I use my program to write C++ 6.0 the same way I am be instructed in class? Do I need to buy visual C++ 6.0 I already paid for one program I would like to make use of it at home it gives me more time to learn. Thanks...
3
1226
by: Charlie1 | last post by:
I am a student taking c++ programming I purchased a program Visual Studio.net (2003 ver), The college is using visual C++ 6.0. How can I use my porgram to write programs in Ms 6.0. Do I have to buy C++ 6.0 I allready purchased on program.
2
1467
by: patrick lynch | last post by:
Good morning, I'm reading "Programming Microsoft Windows with Microsoft Visual Basic .NET" by Charles Petzold. I have Visual Studio installed but it is now expired (as an aside, I can not remove it, bummer). I seem to be in a "Catch-22" situation...the book states the following: "...if you're running Visual Basic .NET as opposed to Visual Studio. NET, you'll need to add two
0
1004
by: DR | last post by:
How to make CLR stored procedure generate comments in TSQL when it is deployed via visual studio? e.g. when i right click the project and hit deploy, i want some comments to appear in or around the SQL wrapper that calls the CLR function.
0
1185
Maidenz08
by: Maidenz08 | last post by:
Hi, I need to add a textbox in a form in setup and deployment project in visual studio 2005. I also need to read the value of the textbox and write it into a text file in the installed location once the installation is complete. I am using c#. Thanks in advance Alvin
0
9551
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10505
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9085
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7576
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6811
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5471
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5606
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
3764
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2945
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.