Steve
What exactly value are comming to lnBitLength from this expression:
lnBitLength=Thisform.spnmy2.getvalue()
I believe if you increase a little (as far is possible) this value will give you more speed..
BTW, I had almost the same experience. When I created a interface between my application and a data coletor.. The timer object was the best deal for me.. For a long data transfer.. The FORs and WHILEs Seems to steal the 100% of processor.. And no processor time remaining to others Windows applications..
The timer object give to that interface some harmony to work together.. And, my application that took more than 20 minutes to capture the data, started to take less than 3 minutes..
Claudio
"Now to him who is able to do immeasurably more than all we ask or imagine, according to his power that is at work within us, Ephesians 3:20