How to use paintbox or image to allow user to "write" text with a mouse our stylus in a box.

I am trying to put a paintbox or image box on a screen that will be used on a Tablet pc for a usert to "write" text.

I can get these to draw boxes and circles, but I can't figure out how to get these to let a user write text.

The user will be using a stylus for the writing.

I am using delphi 3.

aharastsAsked:
Who is Participating?

[Webinar] Streamline your web hosting managementRegister Today

x
 
mokuleConnect With a Mentor Commented:
This is how to draw on an image with a mouse

procedure TForm1.FormCreate(Sender: TObject);
var
  bmp: TBitmap;
begin
  bmp := TBitmap.Create;
  bmp.Width := Image1.Width;
  bmp.Height := Image1.Height;
  bmp.PixelFormat := pf24bit;
  Image1.Picture.Bitmap.Assign(bmp);
  bmp.Free;
end;

procedure TForm1.Image1MouseDown(Sender: TObject; Button: TMouseButton;
  Shift: TShiftState; X, Y: Integer);
begin
  xp := X;
  yp := y;
end;

procedure TForm1.Image1MouseMove(Sender: TObject; Shift: TShiftState; X,
  Y: Integer);
begin
  if ssLeft in Shift then
    begin
    Image1.Picture.Bitmap.Canvas.MoveTo(xp,yp);
    Image1.Picture.Bitmap.Canvas.LineTo(X,Y);
    xp := X;
    yp := y;
    end;
end;
0
All Courses

From novice to tech pro — start learning today.