|
well this is my code: -
Private Sub Radiobutton1_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Radiobutton1.CheckedChanged
If Radiobutton1.Checked = True Then
TextBox6.Enabled = True
Else
TextBox6.Enabled = False
End If
End Sub
but it is not working. no errors but not working.
|
|
|
|
|
well this is my code: -
Private Sub Radiobutton1_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Radiobutton1.CheckedChanged
If Radiobutton1.Checked = True Then
TextBox6.Enabled = True
Else
TextBox6.Enabled = False
End If
End Sub
but it is not working. no errors but not working.
|
|
|
|
|
set a breakpoint into the function and watch if the function is called...
and watch also if it is going into the right case (maybe Radiobutton1.Checked is not set to what you think...)
TOXCCT >>> GEII power [toxcct][VisualCalc]
|
|
|
|
|
i'm still not able to figure out what exactly is the fault. or where things are goin wrong. is there any other way to make a textbox active other than using radiobuttons and buttons.
|
|
|
|
|
hum, no, there no other way.
but i thought to something : isn't your textbox into a groupbox that is itself disabled (Enabled = false) ??
TOXCCT >>> GEII power [toxcct][VisualCalc]
|
|
|
|
|
no it's directly on the webform.
|
|
|
|
|
try this.
Private Sub RadioButton1_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles RadioButton14.CheckedChanged
Dim rdoTemp As RadioButton = CType(sender, RadioButton)
TextBox1.Enabled = rdoTemp.Checked
End Sub
|
|
|
|
|
|
What exactly are you trying to achieve - all the code submitted in this thread works, so I suspect that you may be doing something out of the ordinary. Is a radio button the right control for you remembering that they are grouped.
Perhaps a little more explanation of the task at hand may help in providing a solution that works for you.
|
|
|
|
|
ok i'll tell you what exactly i'm trying to do. i have a dropdownlist which has a collection of various items. the user has to select anyone from it. in case the user does not find his category of items in the dropdown list then he has to click on the radiobutton which has its text as 'NOT AVAILABLE' which in turn enables the textbox and the user can type in his special category of item. and all these controls are directly on the webform.
|
|
|
|
|
Ok. Firstly, apologies,' I didn't realize that this was web based. I am not a web person myself, but the following should work. I am sure some 'true' web people out there will come up with a more elegant solution for you.
Firstly, radiobuttons do NOT cause a post back to the server by default, so you must enable this (AutoPostBack property to true)
Then, you can key this code into your page_load event.
Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load<br />
<br />
If Not IsPostBack Then<br />
'<br />
' normal code to initialise the form<br />
'<br />
Else<br />
TextBox1.Enabled = RadioButton1.Checked<br />
End If<br />
<br />
End Sub
I am sure that you should be able to achieve the same results via some form of client side script, but as I said - I am not a web person, and the above code worked for me when I tested it !!
|
|
|
|
|
no need for apologies raph. it happens after all we are there to help each other. anyways thanx for urs time for my problem and ur involvement. i also found another way of doin it just some logical if else loops helped remove the loop holes.
|
|
|
|
|
If RadioButton1.Checked=true Then
me.TextBox1.Enabled=true
Else
me.TextBox1.Enabled=false
EndIf
I hope this helps to you
|
|
|
|
|
Can i set a template collumn in (Windows Form) DataGrid as in (Web Form) DataGrid.
Thanks in advance
|
|
|
|
|
Not exactly. First you need to create a class based on the DataGridColumnStyle if you want to implement custom appearance or functionality for your columns. You would then create a new DataGridTableStyle and add your new class to its GridColumnStyles collection. Then you add your DataGridTableStyle to the TableStyles collection of the DataGrid.
There are plenty of articles on doing just that. Search for "DataGridColumnStyle" here on The Code Project and you will find plenty of help.
VS.NET 2005 brings a lot of new features to the DataGrid that should make life a lot easier than this.
|
|
|
|
|
I have a .exe file developed using windows aplication in vb.net. i want to run it in web application developed in vb.net. The .exe must run once i click on link on the page developed in using web application in vb.net
|
|
|
|
|
Well, you can hyperlink to the file, then people will get prompted to download and/or run it. They need to download it before it can be run, and a web app can't run an exe on the client. Your web app code runs on the server, all the client gets is HTML and jscript.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
How to develop openfiledialog box in web application, so that we can select a file from the system on which the application is running
|
|
|
|
|
HTML includes one, and that's basically your own option. I forget what it's called, but it is a text box with a ... button next to it, for browsing and selecting a file path.
I believe it's an input, type = file. As in:
<input type="file" (etc/etc/etc)
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
Can someone please tell me how I can get VS.net to recognise Crystal Reports 8 ?
Thank you very much
|
|
|
|
|
Hi,
Not sure if this is the right board for VB6 questions, if not sorry.
I'm trying to use the Hyperlinks collection class Add method to add a hyperlink to a Word document. I can get the Add method to work for 1 hyperlink fine. As soon as I call the Add method a second time, the first hyperlink turns into text and only the second hyperlink is indeed a hyperlink. I checked by Debug.Print the value of ActiveDocument.Hyperlinks.Count which stays at 1.
Is there a known problem with the Hyperlinks collection class in VB6.0.
BTW, I am using Office 10.1.6 and Word 10.1.6 and VB6.0 on a Mac OSX 10.2.8
The snippit of VB6 code adding the hyperlink is:
<br />
...<br />
Dim R1 As Range, TheURL As String<br />
...<br />
<br />
LinkLabel = "Link" & BMi<br />
T.Cell(3, 1).Range.Text = LinkLabel<br />
T.Cell(3, 1).Range.Select<br />
Set R1 = Selection.Range<br />
ActiveDocument.Hyperlinks.Add Anchor:=R1, Address:=TheURL, _<br />
ScreenTip:="Link: " & TheURL<br />
TextToDisplay:="Link" & BMi
where BMi is an Integer and defined earlier in the code. T is a Table.
Any ideas would be greatly appreciated.
Ed
|
|
|
|
|
Answer to my own query:
First, to add a hyperlink to a cell in an existing table, make sure to omit the end-of-cell marker in defining the range for the Anchor.
The following works in a stable, predicitable manner:
<br />
Set R1 = ActiveDocument.Range(Start:=T.Cell(3,1).Range.Start, _<br />
End:=T.Cell(3,1).Range.End - 1)<br />
R1.Select<br />
ActiveDocument.Hyperlinks.Add Anchor:=Selection.Range, Address:=TheURL, _<br />
ScreenTip:="Link: " & TheURL, TextToDisplay:="Link" & BMi<br />
where R1 is a Range and TheURL is a string containing the URL to be made a hyperlink in a Word document.
The example is to add a hyperlink to row #3, col. #1 of an existing table. This is easily generalized to any i,j cell in a table.
Ed
|
|
|
|
|
Hi
Does anyone have a solution or maybe someone could point me in to the
right direction.
I would like to code a game config editor so I dont have to
edit configuration files manually.
The problem to solve is how my code makes my app find
a string like 'Playername' and then let me edit the playername.
It would be easy to code this if string Playername always would be
on the same row. But it will not always be on the same row.
Example
Playername = MyName
I want my app to find 'Playername' and then edit MyName.
BTW! My applicaiton lets me edit MyName in a textbox.
Should I use string Compare or Equals?
Please help me before my head goes Boom!
I have never coded a text editor before and I have'nt found
any help elsewhere about this kind of problem.
I am quite new to VB.Net.
|
|
|
|
|
You can use regular expressions, or there's a function called 'findfirstindex' or something that will search an entire string for a known substring.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
Hi everybody, I got a short question regarding the WM_PRINT message in VB. It seems to me that the windows that Visual Basic 6 builds are not acting correclty when they receive this message. I got a big problem with this because I need to save in a memory DC the contents of a Window even IF IT IS NOT CURRENTLY DISPLAYED on the screen.
This is very frustrating, since even though I send a WM_PRINT message to the VB application, it does not print the client area. WM_PRINTCLIENT messages are also not working.
So the bottom line is: does ANYBODY know how I can override the OnPaint function of the window that the VB creates? I can subclass the window and get the WM_PRINT message, but I can't do anything upon receiving it, unless I can somehow determine the window to print itself in the specified DC. I can do this only by having access to the OnPaint function.
Thank you in advance for helping : D.
-= E C H Y S T T A S =-
The Greater Mind Balance
|
|
|
|