开发者

If (picturebox1.location = [closed]

开发者 https://www.devze.com 2023-02-28 15:59 出处:网络
It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical andcannot be reasonably answered in its current form. For help clari
It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center. Closed 11 years ago.

I'm just learning C# and have a question.

i need something like this.

if (pictureBox1.Location 开发者_运维技巧= 177, 523)
{
....
}

how can i do this?


The Location property is of type Point. You'll need

if (pictureBox1.Location == new Point(177, 523)) { ... }

or

if (pictureBox1.Left == 177 && pictureBox1.Top == 523) { ... }


Try using the picturebox1.Left and picturebox1.Top properties rather than the .Location.

0

精彩评论

暂无评论...
验证码 换一张
取 消