|
-
Jan 27th, 2009, 05:11 PM
#2
Re: HELP me, a silly question. A little problem with my function
It's close. Here are some things you might want to look at
1. Functions return values. If your function does not need to return a value, recommend renaming it to Sub vs Function.
2. Don't pass the Index, it is unnecessary if you are also passing the Textbox control itself. So your call might look like: Filtruj KeyAscii, Text1(0)
:: Your function is asking for a textbox, the MyText is simply a pointer/reference to whichever textbox you pass. It does not need an index within your code. Whether you pass an indexed textbox or one that is not indexed, MyText will correctly reference the passed control.
3. Since you will not need the Index, replace all MyText(Index) with just MyText
Oh, and where do you call it.
Call it from within your KeyPress event, renaming Text1 to whatever your actual textbox control is named... Filtruj KeyAscii, Text1(Index)
Last edited by LaVolpe; Jan 27th, 2009 at 05:16 PM.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|