Advertisement

07.16.2008 at 06:28PM PDT, ID: 23571849
[x]
Attachment Details

How to use variable to reference part of a button, Dialogue, or other control name?

Asked by Amadork in Visual Studio .NET 2005, Microsoft Visual Basic.Net, Windows Forms for .Net

Tags: VB.net

In VB.net, how do you use a variable to reference parf of a button, Dialogue or other contro namel?

E.G.
In the example below I want to be able to put the selected text into a function but be able to replace the "VARIABLE" part of the name with something different each time the function is run, without having multiple sets of code.
Start Free Trial
1:
2:
3:
4:
5:
6:
Dim strTemp = txtVARIABLE.Text
        fbdVARIABLE.ShowDialog()
        txtVARIABLE.Text = fbdVARIABLE.SelectedPath
        If Not (txtVARIABLE.Text = strTemp) Then
            bApply.Enabled = True
        End If
[+][-]07.16.2008 at 06:44PM PDT, ID: 22021724

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]07.16.2008 at 07:33PM PDT, ID: 22021963

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zones: Visual Studio .NET 2005, Microsoft Visual Basic.Net, Windows Forms for .Net
Tags: VB.net
Sign Up Now!
Solution Provided By: lakshmidurga
Participating Experts: 1
Solution Grade: A
 
 
[+][-]07.16.2008 at 07:52PM PDT, ID: 22022019

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
 
Loading Advertisement...
20080716-EE-VQP-32 / EE_QW_2_20070628