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

Posted on 2005-04-22
Last Modified: 2010-04-04
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.

Question by:aharasts
    1 Comment
    LVL 17

    Accepted Solution

    This is how to draw on an image with a mouse

    procedure TForm1.FormCreate(Sender: TObject);
      bmp: TBitmap;
      bmp := TBitmap.Create;
      bmp.Width := Image1.Width;
      bmp.Height := Image1.Height;
      bmp.PixelFormat := pf24bit;

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

    procedure TForm1.Image1MouseMove(Sender: TObject; Shift: TShiftState; X,
      Y: Integer);
      if ssLeft in Shift then
        xp := X;
        yp := y;

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    How to improve team productivity

    Quip adds documents, spreadsheets, and tasklists to your Slack experience
    - Elevate ideas to Quip docs
    - Share Quip docs in Slack
    - Get notified of changes to your docs
    - Available on iOS/Android/Desktop/Web
    - Online/Offline

    Introduction The parallel port is a very commonly known port, it was widely used to connect a printer to the PC, if you look at the back of your computer, for those who don't have newer computers, there will be a port with 25 pins and a small print…
    Introduction I have seen many questions in this Delphi topic area where queries in threads are needed or suggested. I know bumped into a similar need. This article will address some of the concepts when dealing with a multithreaded delphi database…
    In this sixth video of the Xpdf series, we discuss and demonstrate the PDFtoPNG utility, which converts a multi-page PDF file to separate color, grayscale, or monochrome PNG files, creating one PNG file for each page in the PDF. It does this via a c…
    Sending a Secure fax is easy with eFax Corporate ( First, Just open a new email message.  In the To field, type your recipient's fax number You can even send a secure international fax — just include t…

    759 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    14 Experts available now in Live!

    Get 1:1 Help Now