?
Solved

VB 2010 Express - Combining strings and objects

Posted on 2013-05-30
1
Medium Priority
?
253 Views
Last Modified: 2013-05-30
I need to build a string using static text and objects holding variable text.  For example:

strCommand = "enc -d -aes-256-cbc -k " & Form1.TextBox2 & " -in ./" & Form1.TextBox1 & " -out ./" & Form1.TextBox3.Text & "Decrypted.txt"

I'm getting the following error:  Operator '&' is not defined for types 'String' and "System.Windows.Forms.Textbox'

I think it's an issue using the data in the text box.  If that is the case, what is the best method for applying the text in a text box to a variable that I can use throughout the Project and in my string?

Thanks.
0
Comment
Question by:Whah
1 Comment
 
LVL 75

Accepted Solution

by:
käµfm³d   👽 earned 2000 total points
ID: 39208999
Change this:

Form1.TextBox2

...to this:

Form1.TextBox2.Text

And this:

Form1.TextBox1

...to this:

Form1.TextBox1.Text
0

Featured Post

Important Lessons on Recovering from Petya

In their most recent webinar, Skyport Systems explores ways to isolate and protect critical databases to keep the core of your company safe from harm.

Question has a verified solution.

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

Article by: Kraeven
Introduction Remote Share is a simple remote sharing tool, enabling you to see, add and remove remote or local shares. The application is written in VB.NET targeting the .NET framework 2.0. The source code and the compiled programs have been in…
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 …
We’ve all felt that sense of false security before—locking down external access to a database or component and feeling like we’ve done all we need to do to secure company data. But that feeling is fleeting. Attacks these days can happen in many w…
Screencast - Getting to Know the Pipeline
Suggested Courses

862 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