View previous topic :: View next topic |
Author |
Message |
DeletedUser14087 I post too much Reputation: 2
Joined: 21 Jun 2006 Posts: 3069
|
Posted: Sat Sep 20, 2008 2:01 am Post subject: [Delphi !]Stuck Pixel Fixer. |
|
|
was bored, just check it out of you have a stuck pixel on your screen (mostly, on a LCD screen). |
|
Back to top |
|
|
Overload Master Cheater Reputation: 0
Joined: 08 Feb 2008 Posts: 293
|
Posted: Sat Sep 20, 2008 11:53 am Post subject: |
|
|
Stop button doesn't work. And this only flashes from red to black. Will hardly to anything. _________________
Blog
Quote: | Rhys says:
you can be my maid
Rhys says:
ill buy you a french maid outfit
Tyler says:
Sounds good
Rhys says:
ill hold you to that |
|
|
Back to top |
|
|
DeletedUser14087 I post too much Reputation: 2
Joined: 21 Jun 2006 Posts: 3069
|
Posted: Sat Sep 20, 2008 12:02 pm Post subject: |
|
|
Overload wrote: | Stop button doesn't work. And this only flashes from red to black. Will hardly to anything. |
Red, Blue, Green, White and Black and it needs to stay there for like.. 1 hour or even 2.
i would want a moderator to move this to general programming so i can upload the source, i want people to see how it looks like. |
|
Back to top |
|
|
HolyBlah Master Cheater Reputation: 2
Joined: 24 Aug 2007 Posts: 446
|
Posted: Sat Sep 20, 2008 1:51 pm Post subject: |
|
|
Rot1 wrote: | Overload wrote: | Stop button doesn't work. And this only flashes from red to black. Will hardly to anything. |
Red, Blue, Green, White and Black and it needs to stay there for like.. 1 hour or even 2.
i would want a moderator to move this to general programming so i can upload the source, i want people to see how it looks like. | You can upload the source here. |
|
Back to top |
|
|
Heartless I post too much Reputation: 0
Joined: 03 Dec 2006 Posts: 2436
|
Posted: Sat Sep 20, 2008 2:11 pm Post subject: |
|
|
I don't see how this will unstuck a pixel. Can someone explain it to me? _________________
What dosen't kill you, usually does the second time. |
|
Back to top |
|
|
Noz3001 I'm a spammer Reputation: 26
Joined: 29 May 2006 Posts: 6220 Location: /dev/null
|
Posted: Sat Sep 20, 2008 3:46 pm Post subject: |
|
|
I usually just hit the screen and it gets rid of any dead pixels. |
|
Back to top |
|
|
DeletedUser14087 I post too much Reputation: 2
Joined: 21 Jun 2006 Posts: 3069
|
Posted: Sun Sep 21, 2008 2:47 am Post subject: |
|
|
noz3001 wrote: | I usually just hit the screen and it gets rid of any dead pixels. |
This will cause more dead pixels, and look up difference between dead and stuck pixel(s).
dead are black, while stuck pixels are white, red, green or other colors.
@AZNHorny: It will flash it to try restoring it to life, the way a pixel works is:
there's 3 transistors with 3 colors only, RGB (Red, Green and Blue) and it flashes them so quickly and it mixes up these colors to get the one it needs to.
source:
Code: | unit MainUnit;
interface
uses
Windows,
Messages,
SysUtils,
Classes,
Controls,
StdCtrls,
Forms,
ExtCtrls;
type
TForm1 = class(TForm)
memoInstruction: TMemo;
Flash: TPanel;
Button1: TButton;
Button2: TButton;
Edit1: TEdit;
procedure Button1Click(Sender: TObject);
procedure Button2Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
type
TColor = -$7FFFFFFF-1..$7FFFFFFF;
{$NODEFINE TColor}
(*$HPPEMIT 'namespace Graphics'*)
(*$HPPEMIT '{'*)
(*$HPPEMIT ' enum TColor {clMin=-0x7fffffff-1, clMax=0x7fffffff};'*)
(*$HPPEMIT '}'*)
type
TMainThread = class(TThread)
protected
procedure execute; override;
end;
var
Form1: TForm1;
MainThread: TMainThread;
implementation
{$R *.dfm}
procedure TMainThread.Execute;
const clRed = TColor($0000FF);
clGreen = TColor($008000);
clBlue = TColor($FF0000);
clBlack = TColor($000000);
clWhite = TColor($FFFFFF);
var nInc, nDelay: Integer;
begin
if Form1.Edit1.Text = 'Delay' then
Exit;
while not terminated do
with Form1 do
try
nInc:=0;
nDelay:=StrToInt(Edit1.Text);
Inc(nInc);
Flash.Color:=clRed shl nInc;
nDelay:=StrToInt(Edit1.Text);
Sleep(nDelay);
Inc(nInc);
Flash.Color:=clGreen shl nInc;
nDelay:=StrToInt(Edit1.Text);
Sleep(nDelay);
Inc(nInc);
Flash.Color:=clBlue shl nInc;
nDelay:=StrToInt(Edit1.Text);
Sleep(nDelay);
Inc(nInc);
Flash.Color:=clBlack shl nInc;
nDelay:=StrToInt(Edit1.Text);
Sleep(nDelay);
Inc(nInc);
Flash.Color:=clWhite shl nInc;
nDelay:=StrToInt(Edit1.Text);
Sleep(nDelay);
finally
Application.ProcessMessages;
end;
end;
procedure TForm1.Button1Click(Sender: TObject);
begin
MainThread:=TMainThread.Create(False);
end;
procedure TForm1.Button2Click(Sender: TObject);
begin
MainThread.Terminate;
end;
end. |
look how i avoided adding external units to the uses list to avoid useless imports and reduce exe size, i just took the colors hex value and tagged them with no need of Graphics.pas. |
|
Back to top |
|
|
Dark Byte Site Admin Reputation: 457
Joined: 09 May 2003 Posts: 25262 Location: The netherlands
|
Posted: Mon Sep 22, 2008 6:13 am Post subject: |
|
|
Rot1 wrote: | Application.ProcessMessages; |
Inside a thread... _________________
Do not ask me about online cheats. I don't know any and wont help finding them.
Like my help? Join me on Patreon so i can keep helping |
|
Back to top |
|
|
DeletedUser14087 I post too much Reputation: 2
Joined: 21 Jun 2006 Posts: 3069
|
Posted: Thu Sep 25, 2008 12:54 am Post subject: |
|
|
Dark Byte wrote: | Rot1 wrote: | Application.ProcessMessages; |
Inside a thread... |
Sorry if i'm using it wrong, i will appreciate if you could tell me when to use .ProcessMessages cause all i know it avoids application freeze, maybe using it on procedures only ? |
|
Back to top |
|
|
nwongfeiying Grandmaster Cheater Reputation: 2
Joined: 25 Jun 2007 Posts: 695
|
Posted: Fri Sep 26, 2008 10:33 pm Post subject: |
|
|
noz3001 wrote: | I usually just hit the screen and it gets rid of any dead pixels. |
LOL
I would never do that to my laptop or desktop. It's kind of like slapping my dad in the face and flushing the $1000+ down the toilet, but whatever works |
|
Back to top |
|
|
|