Welcome to Dream.In.Code
Getting VB.NET Help is Easy!

Join 86,375 VB.NET Programmers. There are 1,425 online right now! Ask your question and get quick answers from Dream.In.Code experts. Join the #1 programming help community on the internet! Registration is fast and FREE... Join Now!

Chat LIVE With a VB.NET Expert
Powered by LivePerson.com

Register to Make This Box Go Away!

Declaring Points on form

 
Reply to this topicStart new topic

Declaring Points on form

yowutup11
post 7 May, 2008 - 07:33 AM
Post #1


New D.I.C Head

*
Joined: 7 Mar, 2008
Posts: 35



so this is probably the easiest thing ever. I am just having a brain cramp from workin on this thing and I can't think anymore. I am trying to declare 32 different points on a form. A picturebox can be dragged and dropped and it will pop up into the closest of those points. My problem is I can not figure out how to declare those points without there being an error.

Heres my code

CODE

Dim square1 As Point = (288,91)
    Dim square2 As Point = (365,91)
    Dim square3 As Point = (441,91)
    Dim square4 As Point = (517,91)
    Dim square5 As Point = (250,130)
    Dim square6 As Point = (327,130)
    Dim square7 As Point = (403,130)
    Dim square8 As Point = (478,130)
    Dim square9 As Point = (288,168)
    Dim square10 As Point = (365,168)
    Dim square11 As Point = (441,168)
    Dim square12 As Point = (517,168)
    Dim square13 As Point = (250,205)
    Dim square14 As Point = (327,205)
    Dim square15 As Point = (403,205)
    Dim square16 As Point = (478,205)
    Dim square17 As Point = (288,242)
    Dim square18 As Point = (365,242)
    Dim square19 As Point = (441,242)
    Dim square20 As Point = (517,242)
    Dim square21 As Point = (250,282)
    Dim square22 As Point = (327,282)
    Dim square23 As Point = (403,282)
    Dim square24 As Point = (478,282)
    Dim square25 As Point = (288,318)
    Dim square26 As Point = (365,318)
    Dim square27 As Point = (441,318)
    Dim square28 As Point = (517,318)
    Dim square29 As Point = (250,357)
    Dim square30 As Point = (327,357)
    Dim square31 As Point = (403,357)
    Dim square32 As Point = (478,357)


It says i have 32 errors. The error says ") expected". I do not know what I am doing wrong. Please help
User is offlineProfile CardPM
Go to the top of the page
+Quote Post


jayman9
post 7 May, 2008 - 08:19 AM
Post #2


Student of Life

Group Icon
Joined: 26 Dec, 2005
Posts: 5,566

You have to create a New point.

Example:
CODE

Dim square2 As Point = New Point(365,91)
User is offlineProfile CardPM
Go to the top of the page
+Quote Post

yowutup11
post 7 May, 2008 - 08:20 AM
Post #3


New D.I.C Head

*
Joined: 7 Mar, 2008
Posts: 35

Thank you
User is offlineProfile CardPM
Go to the top of the page
+Quote Post

Fast ReplyReply to this topicStart new topic
Time is now: 5/17/08 02:53AM

Live VB.NET Help!

VB.NET Tutorials

Reference Sheets

VB.NET Snippets

Bye Bye Ads

Free DIC T-Shirt

T-Shirt Example

Related Sites

Monthly Drawing

Thumb Drive

Partners

Top Contributors

Top 10 Kudos This Month