Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Search a Grid for a Word..

Status
Not open for further replies.

Trob70

Programmer
Sep 25, 2012
89
AU
I have a grid loaded into a datagridview eg
'GRID............
T A S S A Y A E S
A N O N L U T R K
O V E R T O E S T
T R A S T K U Y N
O S L A A A K R E
S K L S L E V A N
E L A S S M I T I
Y E V A D Y T U M
A N A T T E R Y E

I have a list of 10 words and need to loop
through each word and see if its anywhere in the grid..
horizontally, vertically and (fully diagonally in all directions,even backwards)

??is there and vb.code that can do this easily ..

Inititially i thought this would be easy BUT !! beyond me.

Really appreciate any help

trob70

 
What have you tried so far? Show some code, even if it did not work.

Have fun.

---- Andy

There is a great need for a sarcasm font.
 
Have worked out a simple method of solving the problem
I have loaded the grid indented 10 columns.

I was having a problem with the diagonal search as i did
not have the same length line ie started with 1x1 ended with 1x10
by moving the grid over i had the diagonal the same length
as horizontal

Thanks for the offer of help

Regards Trob70

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top