Solved

general help needed with using freeware components (text scorller in particular)

Posted on 2004-04-04
4
273 Views
Last Modified: 2010-04-04
I am pretty new to using freeware components in delphi and I am really struggling to get a single one working.  The biggest problem is that the documentation is so sparse and assumes you have all the essential knowledge in the first place, but it's starting to bug me know.

I've been trying to use some freeware text scrollers for my about screen, because I figured it would be faster doing that then writing my own, and so far i've wasted about 3 hours getting numerous ones to work with no success.

so the one i am trying to get working now is

TbspRunningText = class(TCustomlabel)
  private
       { Private-Deklarationen }
       FBitmap: TBitmap;
       FTimer: TTimer;
       FCurCycle: Integer;
       FActive: Boolean;
       FDirection: TbspRunDirection;
       FStyleLabel: TbspRunFontStyle;
       FLayout: TbspRunTextLayout;
       FSpeed: Integer;
       FNumRepeat: Word;                   //number of repeat cycles
       FContinuous: Boolean;            // same that FNumRepeat = infinity
       FSteps: Integer;           // number of steps
       CurrentStep: Integer;      // current step when running
       FRunCaption: string;            // text to show running
       procedure SetActive(Value: Boolean);
       procedure SetDirection(Value: TbspRunDirection);
       procedure SetStyle(Value: TbspRunFontStyle);
       procedure SetSteps(Value: Integer);
       procedure SetSpeed(Value: Integer);
       procedure SetLayout(Value: TbspRunTextLayout);
  protected
       { Protected-Deklarationen }
       procedure TimerExpired(Sender: TObject);
       procedure DrawRunText;
       // hide following properties
       property Autosize;
       property WordWrap;
       property Caption;
  public
       { Public-Deklarationen }
       constructor Create(AOwner: TComponent); override;
       destructor Destroy; override;
       procedure Paint; override;


it all seems so simple yet i am missing something fatal.

var
            scroll : TbspRunningText;
begin

 scroll.create(label1);

 With Scroll do
 begin
  active := true;
  Continuous := true;
  Runningcaption := '    hello there   ';
 end;

here's pretty much what i've done.  I figure i have to create the scroll on the label i want to use and this compiles fine, accept i get an access violation message the minute i get past the create(label1) line.

This seems to be my biggest problem with all the components i try is i get an access violation.

Have i got the right idea???  can someone provide an answer?

thanks in advnace
0
Comment
Question by:maidenbeast666
  • 2
  • 2
4 Comments
 
LVL 17

Accepted Solution

by:
mokule earned 50 total points
ID: 10751727
Try
Scroll := TbspRunningText.Create(label1);

in place of

 scroll.create(label1);

0
 

Author Comment

by:maidenbeast666
ID: 10752393
yeah that stopped the error but now i get

COntrol bspRunningText has no parent window
0
 
LVL 17

Expert Comment

by:mokule
ID: 10752636
set parent window
Scroll.Parent := Form1;     //  Your Form or Panel or something like that
0
 

Author Comment

by:maidenbeast666
ID: 10753339
its not scrolling :P  but thast not your fault.  my errors are gone.  thanks.
0

Featured Post

Migrating Your Company's PCs

To keep pace with competitors, businesses must keep employees productive, and that means providing them with the latest technology. This document provides the tips and tricks you need to help you migrate an outdated PC fleet to new desktops, laptops, and tablets.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Magic Software info 18 132
Convert GUI app into console app for Win32 Env 5 100
How to renew a Delphi rad-studio licence? 5 65
How to debug For loops? 3 50
This article explains how to create forms/units independent of other forms/units object names in a delphi project. Have you ever created a form for user input in a Delphi project and then had the need to have that same form in a other Delphi proj…
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…
This Micro Tutorial will give you a basic overview how to record your screen with Microsoft Expression Encoder. This program is still free and open for the public to download. This will be demonstrated using Microsoft Expression Encoder 4.
In a recent question (https://www.experts-exchange.com/questions/28997919/Pagination-in-Adobe-Acrobat.html) here at Experts Exchange, a member asked how to add page numbers to a PDF file using Adobe Acrobat XI Pro. This short video Micro Tutorial sh…

823 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