?
Solved

location property on textbox control

Posted on 2011-02-10
9
Medium Priority
?
267 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
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.

 
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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

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 …
1.0 - Introduction Converting Visual Basic 6.0 (VB6) to Visual Basic 2008+ (VB.NET). If ever there was a subject full of murkiness and bad decisions, it is this one!   The first problem seems to be that people considering this task of converting…
Visualize your data even better in Access queries. Given a date and a value, this lesson shows how to compare that value with the previous value, calculate the difference, and display a circle if the value is the same, an up triangle if it increased…
In this video, Percona Solution Engineer Rick Golba discuss how (and why) you implement high availability in a database environment. To discuss how Percona Consulting can help with your design and architecture needs for your database and infrastr…
Suggested Courses

762 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