hello guy,

i need to random up the whole Sentences with detection on spacing.

then each word will be place into a label.


example; " i`m loving it"

"i`m" will be in labelA 1
"loving" will be in labelA 2
"it" will be in labelA 3


then the 3 labelA will random up. like; 123, 213, 312,......


reply me asap!!
please help me..
thanks alot.

Hi bang2711,

What is it you really need help with? The splitting of a string on spaces? The randomizing of the labels?

If you need help to split the string I can give you a function that will split a string into an array, which I think will work perfectly for randomizing later.

Help me to help you.

Thanks

Yomet

now i can do the split and random the label.
but i can`t put the normal orginal sentences to do compare

i hav a attach file in it.

lblwords is the random up sentences,

label2 is where i want to drag lblwords down and put to form back the same sentences as be4 it random.

If I understand correctly the poject should let someone try yo reconstruct the randomized sentence and then click a button to tell the program to compare the recontructed sentence with the original one and tell the user is it is correct or not. Have I understood correctly?

If so, you still have the original sentence in the Words() array and would have to create a new control array, say lblWords2(), then you can easily do a compare between the captions of the lblWords2() array and the Words() array.

If, however, you need to compare each word as it is added to label2 then you would need some global counter that would track where in the sentence you are, i.e. which word to compare against, and then compare the word just dropped to the corresponding word in the Words() array.

Hope this makes sense and if it doesn't just tell me where I made a bad assumption and I'll take another look with the correct assumptions.

Have fun

Yomet

hi Yomet,

thank alot for ur help. ;)
i have slove the problem..!! :lol:
and i have attach a completed program..
hope it will help others or maybe there need some improvement..

do take care.. :cheesy:

best regards
bang

Hi bang2711,

Happy to hear that it put you on the right track.

Good luck with the rest of the project.

Yomet

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.