How to make a Label display random text from a selection?
I'm trying to make a Japanese practice software, so basically i have a Label, a Text Box and a Commandbutton. When the form is shown, the Label will display a random English word, and i have to type the Japanese word into the Text Box and press the Commandbutton. If i get it correct, the text box will be emptied and the caption of the Label will change into another English word.
My question is, how do i make the caption of the Label change whenever i answer a question correctly?
Thanks in advance :)
Re: How to make a Label display random text from a selection?
The Logic may go something like this (pseudo code)
Code:
Set up the list of Words
Put the first word into the Label's Caption Property
When the user clicks the Command Button:
If the answer in the textbox is correct then
If there are more words in the list then
Put the next word into the label
Clear the textBox
Else
Close the program
Endif
Else
Clear the textbox so the user can try again
End if
Re: How to make a Label display random text from a selection?
another technique is to use radio buttons or tick boxes
but you need to think about the learners needs too
the flash card technique ( like above) is good and easy to impliment but doesnot reinforce the other kanji that the user is also trying to learn
good practice (scholastically - was teacher) would be to ensure the wrong words shown are from the set of words the learner whould know , this increases the understanding as they can argue internally abou tall of the words presented - reinforcing all of the words on display.
using capitals for kanji
question (1)
what is A
(1) fish
(2) kettle
(3) fire engine
(4) boy friend
everything on the page is or could be valid for the kanji the contestant knows... ( technique used for the knowledge in Glasgow <taxi's> i wrote it)
the other way is to develop a game where the contestant has a score to beat
the "panic" induced will actually help them memorise the answers ( tried and tested technique works extremely well )
you could try matching characters in simple card matching type game
2 decks of cards 1 home language i foreign
shuffle place on table
pick 1 mother tongue 1 foreign
lusck of the draw to begin with and then comes understanding
add a clock for best time
and the adrenal gland kicks in and your memmory system jumps up a notch
for a real kicker try
the foreign foriegn card set
thats 1 set french 1 set kanji
if you become a millionaire dont forget me!
here to help you make it a reality
if that helps we can write some pseudo code for you
here to help
Re: How to make a Label display random text from a selection?
LOL my friend you take it too seriously, i am just a beginner programmer and also a beginner in japanese, i am just trying to make the program for myself and share it with some of my friends.
but your idea is brilliant! could use it if i have the time to learn more of visual basic and do it! thanks a lot!
Re: How to make a Label display random text from a selection?
not hard to do
honestly
a few very simple challenges that result in reuseable code
my first program was on a machine that did not have enough memory for the task and so i had to redefine the character map over and over to get the result required
it was on comodore vic 20 for a primary shool to learn about the capitals of the world
that was complex
this is not
really
go on have a go
here to help
Re: How to make a Label display random text from a selection?
generate a 2 element array
i.e.
dim c(50,1)
and work c(x,0) and c(x,1) where x is random number
c(x,0) is the english
c(x,1) is the japanese
put c(x,o) into caption of label
when testing textbox
if c(x,1)=textbox.text then
pick new random number start again
x=randomnumber
change_label(c(x,0))
clear_text(textbox)
now the scene is set for the next button press
random must generate fro 0 to 49 in this example - because we dimed c(50,1)
can you manage this?
here to help
label.caption=text
textbox waits
textbox is filled
test button pressed
Re: How to make a Label display random text from a selection?
another variation would be
dim c(50) as cards
type card
english as string
japanese as string
end type
now c(x) where x is random number
c(x).english is the english string
and c(x).japanese the japanese string
test is
if textbox.text=c(x).japanese then
or even
if textbox.text=c(x).english then
allowing you to put either the english or japanese text in the label
but this method really needs a flag to show what language is being displayed
to stop you matching the english with the english
I hioe you are following this
here to talk