Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

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

Posted on 2004-04-04
4
Medium Priority
?
319 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
4 Comments
 
LVL 17

Accepted Solution

by:
mokule earned 200 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

Tech or Treat! - Giveaway

Submit an article about your scariest tech experience—and the solution—and you’ll be automatically entered to win one of 4 fantastic tech gadgets.

Question has a verified solution.

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

Objective: - This article will help user in how to convert their numeric value become words. How to use 1. You can copy this code in your Unit as function 2. than you can perform your function by type this code The Code   (CODE) The Im…
Have you ever had your Delphi form/application just hanging while waiting for data to load? This is the article to read if you want to learn some things about adding threads for data loading in the background. First, I'll setup a general applica…
In this video, Percona Director of Solution Engineering Jon Tobin discusses the function and features of Percona Server for MongoDB. How Percona can help Percona can help you determine if Percona Server for MongoDB is the right solution for …
In response to a need for security and privacy, and to continue fostering an environment members can turn to for support, solutions, and education, Experts Exchange has created anonymous question capabilities. This new feature is available to our Pr…
Suggested Courses

596 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