Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

location property on textbox control

Posted on 2011-02-10
9
Medium Priority
?
271 Views
Last Modified: 2012-06-27
I would like to use this sentence

for example:
                    "IF TEXTBOX1.LOCATION = (2,2) THEN"

I know that the sintaxis is not right,

I would like to know how to use the location property in a IF STATEMENT



0
Comment
Question by:altariamx2003
[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
  • 5
  • 2
  • 2
9 Comments
 

Author Comment

by:altariamx2003
ID: 34868117
hi himanshut

This is what I need to know to do.

"IF TEXTBOX1.LOCATION = POINT(X,Y) THEN"

I cannot use "IF TEXTBOX1.LOCATION.X=x AND TEXTBOX1.LOCATION.Y=y THEN"

0
 

Accepted Solution

by:
altariamx2003 earned 0 total points
ID: 34868148
this is the solution
---------------------------------------------------------------------
DIM NEW_POINT AS NEW SYSTEM.DRAWING.POINT(x,y)

IF TEXTBOX1.LOCATION = NEW_POINT THEN
 something....................
---------------------------------------------------------------------
0
Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

 
LVL 10

Expert Comment

by:himanshut
ID: 34868175
If( TextBox1.Location = System.Drawing.Point(X,Y))
{
 //code
}
else
{
 //code
}

Cheers!
0
 
LVL 86

Expert Comment

by:Mike Tomlinson
ID: 34868282
You could also write it this way:
If TextBox1.Location.Equals(New Point(2, 2)) Then

Open in new window

0
 

Author Comment

by:altariamx2003
ID: 34868505
himanshut that doesnt work, show the following error: "Point is a drawing type, and it cannot use as an expression

0
 

Author Comment

by:altariamx2003
ID: 34868507
Idle_Mind

I cannot use your solution in my code

thanks any way
0
 
LVL 86

Expert Comment

by:Mike Tomlinson
ID: 34868536
No problem...just FYI, you can use Equals() in your example too:

    Dim NEW_POINT As New System.Drawing.Point(x, y)
    If TextBox1.Location.Equals(NEW_POINT) Then
   
0
 

Author Closing Comment

by:altariamx2003
ID: 34895130
this works for my code
0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

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

Introduction As chip makers focus on adding processor cores over increasing clock speed, developers need to utilize the features of modern CPUs.  One of the ways we can do this is by implementing parallel algorithms in our software.   One recent…
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
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…
Want to learn how to record your desktop screen without having to use an outside camera. Click on this video and learn how to use the cool google extension called "Screencastify"! Step 1: Open a new google tab Step 2: Go to the left hand upper corn…
Suggested Courses

604 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