Page 1 of 1

split 1 string into 2

Posted: Thu Feb 24, 2011 5:06 pm
by froza
hi, I have a string here which is suppose to be a mouse location coordinat:
225/118
I wanted to split it into x and y as the function only supports the following format :
Code: Select all
Windows.Forms.Cursor.Position = New System.Drawing.Point(x, y)
I'm using the "225/118" in a listbox to record the user's mouse position for every 10 seconds and I've made the listbox to scroll down automatically so when the listbox hits "225/118", it must point the cursor to it.

Re: split 1 string into 2

Posted: Thu Feb 24, 2011 5:16 pm
by bisnes_niko
Hi
Code: Select all
Windows.Forms.Cursor.Position = New System.Drawing.Point(listbox1.selecteditem.split("/")(0), Listbox1.selecteditem.split("/")(1))