?
Solved

VB 2010 Express - Combining strings and objects

Posted on 2013-05-30
1
Medium Priority
?
251 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 tutorial demonstrates one way to create an application that runs without any Forms but still has a GUI presence via an Icon in the System Tray. The magic lies in Inheriting from the ApplicationContext Class and passing that to Application.Ru…
Well, all of us have seen the multiple EXCEL.EXE's in task manager that won't die even if you call the .close, .dispose methods. Try this method to kill any excels in memory. You can copy the kill function to create a check function and replace the …
In this video, Percona Director of Solution Engineering Jon Tobin discusses the function and features of Percona Server for MongoDB. How Percona can help Percona can help you determine if Percona Server for MongoDB is the right solution for …
In response to a need for security and privacy, and to continue fostering an environment members can turn to for support, solutions, and education, Experts Exchange has created anonymous question capabilities. This new feature is available to our Pr…
Suggested Courses

649 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