Programming Forums
User Name Password Register
 

RSS Feed
FORUM INDEX | TODAY'S POSTS | UNANSWERED THREADS | ADVANCED SEARCH

Reply
 
Thread Tools Display Modes
Old Feb 8th, 2010, 1:05 AM   #21
Raudhah
Newbie
 
Join Date: Jan 2010
Location: Singapore
Posts: 21
Rep Power: 0 Raudhah is on a distinguished road
Exclamation Re: Pop-up screen

Can I use this code instead of the code u suggested? It making me confused.

procedure TForm1.ComPortRxChar(Sender: TObject; Count: Integer);
var
  Str,temp, ZW_WAR: String;
  DateTime : TDateTime;
  b,Nodeadresse:byte;
  dbm, D751, HeatSink, HeatFlux,thot,tcold,DT,TEGV,Ubat,Pout,rssi,energybalance :double;
  a:byte;
  dummy:integer;
  letzte:longint;
  SMsg: String;
  begin
   Timer1.Enabled := False;
   Timer1.Interval := 300000;
    SMsg := 'Please get up and relax your eyes';
    showMessage(SMsg);
   Timer1.Enabled := True;
  //get actual data and store it in "str"
  ComPort.ReadStr(Str, Count);
  //store every char from str in "rawdata" until cr + lf
  for a := 1 to length(str) do begin
    inc(laenge);
    rawdata[laenge]:=ord(str[a]);
    if (rawdata[laenge]=10) and (rawdata[laenge-1]= 13)then begin
      // if received protocol have the defined length of 11 then it is the right one
      if laenge=11 then begin
         //give rawdate from "rawdata" to "rawdata2" and clear rawdata
         for dummy:=1 to 11 do begin rawdata2[dummy]:=rawdata[dummy];rawdata[dummy]:=0;end;
         edit6.Text:='';
         for dummy:= 1 to 11 do edit6.Text:=edit6.Text+inttostr(rawdata2[dummy])+' ';
         nodeadresse:=ord(rawdata2[1]);
         //check if the address of the actual TE-Power-NODE already exists or not
         if nodeadressen[1]=0 then begin nodeadressen[1]:=nodeadresse;pagecontrol1.Pages[0].Caption:='NODE '+inttostr(nodeadresse);end;
         node:=99;
         for dummy:=1 to nodeanzahl do
             if nodeadressen[dummy]=nodeadresse then node:=dummy;
             if node = 99 then if nodeanzahl<5 then begin
                inc(nodeanzahl);nodeadressen[nodeanzahl]:=nodeadresse;node:=nodeanzahl;
                pagecontrol1.Pages[nodeanzahl-1].Caption:='NODE '+inttostr(nodeadresse);pagecontrol1.Pages[nodeanzahl-1].TabVisible:=true;
             end;
Raudhah is offline   Reply With Quote
Old Feb 8th, 2010, 10:24 AM   #22
abdul.gafur
Trying to be a Real Coder
 
abdul.gafur's Avatar
 
Join Date: Feb 2010
Location: Salo, Riau, Indonesia
Posts: 111
Rep Power: 1 abdul.gafur is on a distinguished road
Send a message via Yahoo to abdul.gafur
Re: Pop-up screen

try this :

delphi Syntax (Toggle Plain Text)
  1. ...
  2.  
  3. letzte:longint;
  4. begin
  5. Timer1.Interval := 300000;
  6. i:=1;
  7. Timer1.Enabled := True; //=call TForm1.Timer1Timer
  8. //get actual data and store it in "str"
  9.  
  10. ...

but, you must have this code
delphi Syntax (Toggle Plain Text)
  1. procedure TForm1.Timer1Timer(Sender: TObject);
  2. begin
  3. if (i=10) then
  4. begin
  5. Timer1.Enabled:=false;
  6. i:=0;
  7. ShowMessage('Please get up and relax your eyes');
  8. end;
  9. Inc(i);
  10. end;
__________________
just a drop of dew in the morning

if we facilitate other people's business in the world,
then our business will be facilitated in the world and the hereafter
abdul.gafur is offline   Reply With Quote
Old Feb 8th, 2010, 8:05 PM   #23
Raudhah
Newbie
 
Join Date: Jan 2010
Location: Singapore
Posts: 21
Rep Power: 0 Raudhah is on a distinguished road
Re: Pop-up screen

Quote:
Originally Posted by abdul.gafur View Post
try this :

delphi Syntax (Toggle Plain Text)
  1. ...
  2.  
  3. letzte:longint;
  4. begin
  5. Timer1.Interval := 300000;
  6. i:=1;
  7. Timer1.Enabled := True; //=call TForm1.Timer1Timer
  8. //get actual data and store it in "str"
  9.  
  10. ...

but, you must have this code
delphi Syntax (Toggle Plain Text)
  1. procedure TForm1.Timer1Timer(Sender: TObject);
  2. begin
  3. if (i=10) then
  4. begin
  5. Timer1.Enabled:=false;
  6. i:=0;
  7. ShowMessage('Please get up and relax your eyes');
  8. end;
  9. Inc(i);
  10. end;
Thank you for the code but hopefully it will work. I try and if there's an error, I will ask you again.
Raudhah is offline   Reply With Quote
Old Feb 8th, 2010, 8:24 PM   #24
abdul.gafur
Trying to be a Real Coder
 
abdul.gafur's Avatar
 
Join Date: Feb 2010
Location: Salo, Riau, Indonesia
Posts: 111
Rep Power: 1 abdul.gafur is on a distinguished road
Send a message via Yahoo to abdul.gafur
Re: Pop-up screen

You're welcome.

I'd like to help you, insyaAllah.
__________________
just a drop of dew in the morning

if we facilitate other people's business in the world,
then our business will be facilitated in the world and the hereafter
abdul.gafur is offline   Reply With Quote
Old Feb 8th, 2010, 8:34 PM   #25
Raudhah
Newbie
 
Join Date: Jan 2010
Location: Singapore
Posts: 21
Rep Power: 0 Raudhah is on a distinguished road
Re: Pop-up screen

Quote:
Originally Posted by abdul.gafur View Post
You're welcome.

I'd like to help you, insyaAllah.
THank you for your help once again. Btw are you in IT course in university?
Raudhah is offline   Reply With Quote
Old Feb 8th, 2010, 8:45 PM   #26
abdul.gafur
Trying to be a Real Coder
 
abdul.gafur's Avatar
 
Join Date: Feb 2010
Location: Salo, Riau, Indonesia
Posts: 111
Rep Power: 1 abdul.gafur is on a distinguished road
Send a message via Yahoo to abdul.gafur
Re: Pop-up screen

ya, I am a student at ITB (Institut Teknologi Bandung - Indonesia) majoring in informatics.

Are you from singapore?

I once went to singapore while still in high school, we visited NUS, NTU, SMU, polytechnic.
__________________
just a drop of dew in the morning

if we facilitate other people's business in the world,
then our business will be facilitated in the world and the hereafter
abdul.gafur is offline   Reply With Quote
Old Feb 8th, 2010, 9:04 PM   #27
Raudhah
Newbie
 
Join Date: Jan 2010
Location: Singapore
Posts: 21
Rep Power: 0 Raudhah is on a distinguished road
Re: Pop-up screen

Ya. I'm from Sinagapore. I'm a 3rd year student from Nanyang Polytechnic majoring in Electronics, Computer and Communication Engineering.

So u learn all the programming languages?
Raudhah is offline   Reply With Quote
Old Feb 8th, 2010, 9:14 PM   #28
abdul.gafur
Trying to be a Real Coder
 
abdul.gafur's Avatar
 
Join Date: Feb 2010
Location: Salo, Riau, Indonesia
Posts: 111
Rep Power: 1 abdul.gafur is on a distinguished road
Send a message via Yahoo to abdul.gafur
Re: Pop-up screen

Programming just one of sub major so that we study algorithm only, for programming language just self study.

are you malay, ?
__________________
just a drop of dew in the morning

if we facilitate other people's business in the world,
then our business will be facilitated in the world and the hereafter
abdul.gafur is offline   Reply With Quote
Old Feb 8th, 2010, 9:21 PM   #29
Raudhah
Newbie
 
Join Date: Jan 2010
Location: Singapore
Posts: 21
Rep Power: 0 Raudhah is on a distinguished road
Re: Pop-up screen

Yup, I'm a malay/muslim. So how old are you?
Raudhah is offline   Reply With Quote
Old Feb 8th, 2010, 9:33 PM   #30
abdul.gafur
Trying to be a Real Coder
 
abdul.gafur's Avatar
 
Join Date: Feb 2010
Location: Salo, Riau, Indonesia
Posts: 111
Rep Power: 1 abdul.gafur is on a distinguished road
Send a message via Yahoo to abdul.gafur
Re: Pop-up screen

Hee, it seem's like we're talking here like chatting on messenger, i have yahoo id, mind us chatting over there? y! : stone_gafur

i'm 23, you?
__________________
just a drop of dew in the morning

if we facilitate other people's business in the world,
then our business will be facilitated in the world and the hereafter
abdul.gafur is offline   Reply With Quote
Reply

Bookmarks

« Previous Thread in Forum | Next Thread in Forum »

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
full screen help, html css privateD.lister HTML / XHTML / CSS 2 Apr 28th, 2008 4:32 PM
Clear screen with Java Eric the Red Java 9 Feb 22nd, 2006 11:28 PM
Getting size of user's screen elford Java 1 Jan 1st, 2006 5:09 AM
Senior Capstone-Spying Screen Saver Hounder Project Ideas 23 Dec 16th, 2005 8:00 PM
Print Screen? Sane C++ 5 Jul 27th, 2005 2:44 AM




DaniWeb IT Discussion Community
All times are GMT -5. The time now is 8:26 PM.

Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC