My Video Problem ... Resolved. 
Author Message
 My Video Problem ... Resolved.

hi all,

Yeah been busting my brains alot on this one, for a couple months, because
it was qutie a weird one.  but now it's solved.  I'm saying this so that
people that might be busting their brains trying to solve my problems can
sleep on both ears tonight :-)....

An example using the video unit wouldn't work on my system.  Got a new
system and still nothing would show, I got version 1.0.10 of FreePascal (not
sure if that solved it) did a few changes and things work fine now.  even
modified the function to show things in the foreground and background color
of my choice.

Thanks to everyone who gave it thei best shot.  :-).  and now I can go to
the next step of my project.

--
Stphane Richard
Senior Software and Technology Supervisor
http://www.*-*-*.com/
For all your hosting and related needs



Mon, 02 Jan 2006 19:01:42 GMT  
 My Video Problem ... Resolved.

Quote:

> hi all,

> Yeah been busting my brains alot on this one, for a couple months, because
> it was qutie a weird one.  but now it's solved.  I'm saying this so that
> people that might be busting their brains trying to solve my problems can
> sleep on both ears tonight :-)....

> An example using the video unit wouldn't work on my system.  Got a new
> system and still nothing would show, I got version 1.0.10 of FreePascal (not
> sure if that solved it) did a few changes and things work fine now.  even
> modified the function to show things in the foreground and background color
> of my choice.

> Thanks to everyone who gave it thei best shot.  :-).  and now I can go to
> the next step of my project.

If you have a working example with modifications, or could give some idea
what went wrong, I'd appreciate it, and will mail the documentation
maintainer about it.


Mon, 02 Jan 2006 20:56:27 GMT  
 My Video Problem ... Resolved.
Here's the example...

after closely studying it...when making it work...turns out the code now ex
examply like the original....think my PDF viewer wasn't zoomed in enough to
show a difference in some subtle characters and I read some characters
wrong...here's the example, I changed variable names to more descriptive
names.  This sample also draws it in the text color and background you
specify to it.

PROCEDURE TextOut(X, Y: Word; CONST TextString: String; ForeColor,
BackColor: Word);
VAR
    Position:     Word;
    Counter:      Word;
    StringLength: Word;
BEGIN
    Position     := ((X-1) + (Y-1) * ScreenWidth);
    StringLength := Length(TextString);
    IF Position + StringLength > ScreenWidth*ScreenHeight THEN
       StringLength := ScreenWidth*ScreenHeight-Position;
    FOR Counter := 1 TO StringLength DO
        VideoBuf^[Position + Counter-1] := Ord(TextString[Counter]) +
((ForeColor + (BackColor SHL 4)) SHL 8);
END;

VAR
     I:         LongInt;
     K:         TKeyEvent;
     VideoMode: TVideoMode;
     Result:    Boolean;
     Attr:      Word;

BEGIN
     InitVideo;
     InitKeyBoard;
     ClearScreen;
     For I := 1 TO 7 DO
     BEGIN
         TextOut(I, I, 'Press Any Key to clear screen.', Yellow, Blue);
     END;
     UpdateScreen(False);
     K := GetKeyEvent;
     ClearScreen;
     TextOut(1, 1, 'Cleared Screen Press any key to end.', Cyan, Black);
     UpdateScreen(True);
     K := GetKeyEvent;
     DoneKeyboard;
     DoneVideo;
END.

--
Stphane Richard
Senior Software and Technology Supervisor
http://www.totalweb-inc.com
For all your hosting and related needs


Quote:


> > hi all,

> > Yeah been busting my brains alot on this one, for a couple months,
because
> > it was qutie a weird one.  but now it's solved.  I'm saying this so that
> > people that might be busting their brains trying to solve my problems
can
> > sleep on both ears tonight :-)....

> > An example using the video unit wouldn't work on my system.  Got a new
> > system and still nothing would show, I got version 1.0.10 of FreePascal
(not
> > sure if that solved it) did a few changes and things work fine now.
even
> > modified the function to show things in the foreground and background
color
> > of my choice.

> > Thanks to everyone who gave it thei best shot.  :-).  and now I can go
to
> > the next step of my project.

> If you have a working example with modifications, or could give some idea
> what went wrong, I'd appreciate it, and will mail the documentation
> maintainer about it.



Tue, 03 Jan 2006 01:14:46 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. Resolving Performance Problems

2. Access Violation with TQuery as both Master/Detail: problem resolved

3. DNS problem at JUMBO will be resolved ASAP

4. JUMBO resolves DNS problem

5. TDBGrid Display Problems/P200 PCI Video

6. Problem with video memory in Win32

7. Delphi 3.0 and SQL Anywhere grd resolved

8. RESOLVE YOU PROBLEM NOW !!! MAKE A NEW PASCAL-FRIENDS!!

9. S3 chipset video drivers : work with Trio64V2 based video cards ?

10. Video

11. Screen Size Changes with the change of video adapter resolution

 

 
Powered by phpBB® Forum Software