Rolf-Werner Eilert ha scritto: > No, don't worry :-) > > So, this is my code now: > > PUBLIC SUB Suche_KeyPress() > DIM t$ AS String > > IF Key.Code = Key.Return OR Key.Code = Key.Enter THEN > t$ = Trim$(Suche.Text) > IF t$<> "" THEN > SucheStarten(t$) > END IF > END IF > > END > > I introduced t$ (old BASIC manners, I know :-) ) to avoid calling trim > for several times, and I feel it's shorter and reads easier. Then I set > Key.Return first as it would be pressed more probably, and this routine > is called for each key. > > Later I realized that this is nonsense as it will check for Key.Enter > with every key typed other than Return ;-) anyway... > No... it will check for Key.Enter every key you press, be it Return or not!
Just kidding, but it's true... :-) Regards, Doriano ------------------------------------------------------------------------------ Download Intel® Parallel Studio Eval Try the new software tools for yourself. Speed compiling, find bugs proactively, and fine-tune applications for parallel performance. See why Intel Parallel Studio got high marks during beta. http://p.sf.net/sfu/intel-sw-dev _______________________________________________ Gambas-user mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/gambas-user
