Delphi Pages Forums  

Go Back   Delphi Pages Forums > Delphi Forum > General

Lost Password?

Thread Tools Display Modes
Old 11-14-2010, 06:33 AM
Chesso Chesso is offline
Senior Member
Join Date: May 2004
Location: Sydney, Australia
Posts: 1,199
Default Strange issues with VK codes.

For normal characters like A and B, my function works fine, but for VK_SPACE etc it fails strangely....

For example if I were to send Ord(VK_SPACE) or MyByte = Ord(VK_SPACE), perfect.

But I create a function that the result is of Byte, and do:

MyByte := MyFunction('sometext'),

which within it does

if (text = 'sometext') then result := Ord(VK_SPACE)

Now if it is of type byte which it obviously is, why does it not retain going from result byte to variable byte? (its only going from byte to byte, so whats going on?) (it turns out as like sending nothing or lowercase 'p' and things like that).
Reply With Quote
Old 12-07-2010, 03:01 AM
MrBaseball34 MrBaseball34 is offline
Senior Member
Join Date: Jan 2001
Posts: 7,260

Space is a special character, like Tab and to send them you must do soemthing different.
What are you using to send them?

Hook 'em Horns
2005 College Football National Champions
2005 College Baseball National Champions
Reply With Quote

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is On

Forum Jump

All times are GMT. The time now is 03:27 AM.

Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2019, vBulletin Solutions, Inc.