john230873
Programmer
I have this issue that I think I need to use pointer for but unsure how. I have a database that uses can enter in key stokes that they want to trigger. For this to work I need to be able to pass a string to the keydb_event.
Here is an example of what I am thing to do
procedure TForm1.Button1Click(Sender: TObject);
var
MySTRKey : String;
begin
MySTRKey := 'VK_MENU';
keybd_event( MySTRKey,0,0,0);
end;
Of cause the MySTRKey is dynamic in the real program. When I run this I get incompatibly type Bytes and String.
This would work.
procedure TForm1.Button1Click(Sender: TObject);
var
MySTRKey : String;
begin
keybd_event( VK_MENU,0,0,0);
end;
How can I pass this pram dynamically
Here is an example of what I am thing to do
procedure TForm1.Button1Click(Sender: TObject);
var
MySTRKey : String;
begin
MySTRKey := 'VK_MENU';
keybd_event( MySTRKey,0,0,0);
end;
Of cause the MySTRKey is dynamic in the real program. When I run this I get incompatibly type Bytes and String.
This would work.
procedure TForm1.Button1Click(Sender: TObject);
var
MySTRKey : String;
begin
keybd_event( VK_MENU,0,0,0);
end;
How can I pass this pram dynamically