?
Solved

VB 2010 Express - Combining strings and objects

Posted on 2013-05-30
1
Medium Priority
?
250 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
[X]
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
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

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

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

This article explains how to create and use a custom WaterMark textbox class.  The custom WaterMark textbox class allows you to set the WaterMark Background Color and WaterMark text at design time.   IMAGE OF WATERMARKS STEPS Create VB …
Creating an analog clock UserControl seems fairly straight forward.  It is, after all, essentially just a circle with several lines in it!  Two common approaches for rendering an analog clock typically involve either manually calculating points with…
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…
How to fix incompatible JVM issue while installing Eclipse While installing Eclipse in windows, got one error like above and unable to proceed with the installation. This video describes how to successfully install Eclipse. How to solve incompa…
Suggested Courses

741 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