Lowyat.NET Forums

Welcome Guest ( Log In | Register )

 
RSS feedBump TopicReply to this topicStart new topicStart Poll

Outline · [ Standard ] · Linear+

> borland delphi

-lize_zz-
post Jun 9 2006, 03:35 PM
Show posts by this member only |This post's rating (0+, 0-) | Post #1


Newbie
*

Group: Junior Member
Posts: 7
Ratings earned: 0+, 0-
Ratings given: 0+, 0-

Joined: May 2006
From: kl





hi...
any1 know writing program using borland delphi?
i'm totally blur/0% knowledge about borland delphi...
now...self learning to write a simple program.
i want to write a simple program where by user can do setting on which day and time to send out a msg.
i need "sifu"!! cry.gif

User is offlineProfile CardPM
Go to the top of the page
+Quote Post
anthony_yio
post Jun 10 2006, 01:48 PM
Show posts by this member only |This post's rating (0+, 0-) | Post #2


........
Group Icon
Codemasters

Group: Elite
Posts: 1,794
Ratings earned: 0+, 0-
Ratings given: 0+, 0-

Joined: Jan 2003





QUOTE(-lize_zz- @ Jun 9 2006, 03:35 PM)
hi...
any1 know writing program using borland delphi?
i'm totally blur/0% knowledge about borland delphi...
now...self learning to write a simple program.
i want to write a simple program where by user can do setting on which day and time to send out a msg.
i need "sifu"!!  cry.gif
*


I am not a real sifu on delphi but what do u mean send out a msg?
SMS?
User is offlineProfile CardPM
Go to the top of the page
+Quote Post
-lize_zz-
post Jun 12 2006, 04:23 PM
Show posts by this member only |This post's rating (0+, 0-) | Post #3


Newbie
*

Group: Junior Member
Posts: 7
Ratings earned: 0+, 0-
Ratings given: 0+, 0-

Joined: May 2006
From: kl





QUOTE(anthony_yio @ Jun 10 2006, 01:48 PM)
I am not a real sifu on delphi but what do u mean send out a msg?
SMS?
*



erm...ignore the send msg part 1st.the basic things i also don't knw how to do it..
i created a interface with radiobutton.how to make it work?example wana select a
Day
o monday
o tuesday
o wednesday
o thursday.........

and set a time so that every week of the selected day and time can auto send a msg.
?? unsure.gif
User is offlineProfile CardPM
Go to the top of the page
+Quote Post
anthony_yio
post Jun 12 2006, 06:59 PM
Show posts by this member only |This post's rating (0+, 0-) | Post #4


........
Group Icon
Codemasters

Group: Elite
Posts: 1,794
Ratings earned: 0+, 0-
Ratings given: 0+, 0-

Joined: Jan 2003





QUOTE(-lize_zz- @ Jun 12 2006, 04:23 PM)
erm...ignore the send msg part 1st.the basic things i also don't knw how to do it..
i created a interface with radiobutton.how to make it work?example wana select a
Day 
  o monday
  o tuesday
  o wednesday
  o thursday.........

and set a time so that every week of the selected day and time can auto send a msg.
?? unsure.gif
*


Use TRadioGroup. ItemIndex is the selected item index. (start from 0)

procedure TForm1.ButtonCalcClick(Sender: TObject);
begin
// ...
if RadioGroupRL.ItemIndex = 0 then begin // Right
// ...
end
else begin // Left
// ...
end;
// ...
end;
User is offlineProfile CardPM
Go to the top of the page
+Quote Post
-lize_zz-
post Jun 14 2006, 02:24 PM
Show posts by this member only |This post's rating (0+, 0-) | Post #5


Newbie
*

Group: Junior Member
Posts: 7
Ratings earned: 0+, 0-
Ratings given: 0+, 0-

Joined: May 2006
From: kl





QUOTE(anthony_yio @ Jun 12 2006, 06:59 PM)
Use TRadioGroup. ItemIndex is the selected item index. (start from 0)

procedure TForm1.ButtonCalcClick(Sender: TObject);
begin
  // ...
  if RadioGroupRL.ItemIndex = 0 then begin // Right
    // ...
  end
  else begin // Left
    // ...
  end;
  // ...
end;
*



sorry..i can't really understand wat u mean.i really don't know anything bout delphi.sorry...i'm learning coz i'm having industrial training.no seniors to ask...i'm doin a task similiar to these.hope you don't mind to teach me...

i created the interface.
Attached Image
type
TForm1 = class(TForm)
lbltime: TLabel;
digit: TListBox;
Button1: TButton;
lblnoti: TLabel;
Memo1: TMemo;
TimerSCHETimer: TTimer;
alarm2smsdb: TADOConnection;
q1: TADOQuery;
q2: TADOQuery;
q3: TADOQuery;
alarmtosmsCMS: TADOConnection;
QryRem1: TADOQuery;
RadioGroup1: TRadioGroup;
mon: TRadioButton;
tues: TRadioButton;
wed: TRadioButton;
thurs: TRadioButton;
fri: TRadioButton;
sat: TRadioButton;
sun: TRadioButton;
RadioGroup2: TRadioGroup;
am: TRadioButton;
pm: TRadioButton;

As you can see, there's day and time for user to select. after selecting then click set(save the day and time),so that msg will be sending out based on the setting.let's say set to monday and 1pm...so every monday 1pm will send msg and show under notification.after few months/weeks..i wanna change setting....mayb change to friday 5pm...the msg will send out on every friday 5pm.how to write the codes whether the radiobutton is checked...how save the checked day and time by clicking "set"..do i need timer??unsure.gif
i dunno to write... i need guide...

thank you in advance...


User is offlineProfile CardPM
Go to the top of the page
+Quote Post
anthony_yio
post Jun 14 2006, 03:00 PM
Show posts by this member only |This post's rating (0+, 0-) | Post #6


........
Group Icon
Codemasters

Group: Elite
Posts: 1,794
Ratings earned: 0+, 0-
Ratings given: 0+, 0-

Joined: Jan 2003





QUOTE(-lize_zz- @ Jun 14 2006, 02:24 PM)
sorry..i can't really understand wat u mean.i really don't know anything bout delphi.sorry...i'm learning coz i'm having industrial training.no seniors to ask...i'm doin a task similiar to these.hope you don't mind to teach me...

i created the interface.
Attached Image
type
  TForm1 = class(TForm)
    lbltime: TLabel;
    digit: TListBox;
    Button1: TButton;
    lblnoti: TLabel;
    Memo1: TMemo;
    TimerSCHETimer: TTimer;
    alarm2smsdb: TADOConnection;
    q1: TADOQuery;
    q2: TADOQuery;
    q3: TADOQuery;
    alarmtosmsCMS: TADOConnection;
    QryRem1: TADOQuery;
    RadioGroup1: TRadioGroup;
    mon: TRadioButton;
    tues: TRadioButton;
    wed: TRadioButton;
    thurs: TRadioButton;
    fri: TRadioButton;
    sat: TRadioButton;
    sun: TRadioButton;
    RadioGroup2: TRadioGroup;
    am: TRadioButton;
    pm: TRadioButton;

As you can see, there's day and time for user to select. after selecting then click set(save the day and time),so that msg will be sending out based on the setting.let's say set to monday and 1pm...so every monday 1pm will send msg and show under notification.after few months/weeks..i wanna change setting....mayb change to friday 5pm...the msg will send out on every friday 5pm.how to write the codes whether the radiobutton is checked...how save the checked day and time by clicking "set"..do i need timer??unsure.gif
i dunno to write... i need guide...

thank you in advance...
*





In your Set button click event, just put in the codes to check what day was selected.

(how to get the event handler? just double click on the button at the designer)


if RadioGroup1.ItemIndex = 0 then
begin
//moday was selected...
end
else if RadioGroup1.ItemIndex = 1 then
begin
//tues was selected
end

...

or use case statement
like

case RadioGroup1.ItemIndex of
0: begin
//monday
end;
1: begin
//tue
end;
else
begin
//prompt for invalid selection....
end;
end;


If you can't understand the codes above what it doing.

Get a Delphi book, try and compile the sample codes. Although the syntax of delphi is different slightly, the concept and the control stament same as other language, it works the same way. If you can't understand control statement and etc. It is time to re-learn.

This post has been edited by anthony_yio: Jun 14 2006, 03:01 PM
User is offlineProfile CardPM
Go to the top of the page
+Quote Post
-lize_zz-
post Jun 15 2006, 03:50 PM
Show posts by this member only |This post's rating (0+, 0-) | Post #7


Newbie
*

Group: Junior Member
Posts: 7
Ratings earned: 0+, 0-
Ratings given: 0+, 0-

Joined: May 2006
From: kl





QUOTE(anthony_yio @ Jun 14 2006, 03:00 PM)
In your Set button click event, just put in the codes to check what day was selected.

(how to get the event handler? just double click on the button at the designer)
if RadioGroup1.ItemIndex = 0 then 
begin
//moday was selected...
end
else if RadioGroup1.ItemIndex = 1 then
begin
//tues was selected
end

...

or use case statement
like

case RadioGroup1.ItemIndex of
0: begin
        //monday
    end;
1: begin
      //tue
    end;
else
    begin
  //prompt for invalid selection....
    end;
end;
If you can't understand the codes above what it doing.

Get a Delphi book, try and compile the sample codes. Although the syntax of delphi is different slightly, the concept and the control stament same as other language, it works the same way. If you can't understand control statement and etc. It is time to re-learn.
*



radiogroup that i did can run dee...
now working on time...
thankz... smile.gif
User is offlineProfile CardPM
Go to the top of the page
+Quote Post

Bump TopicReply to this topicTopic OptionsStart new topic
 



----debug section please ignore----
Lo-Fi Version Time is now: 25th November 2009 - 12:41 PM
All Rights Reserved 2003-2009 Vijandren Ramadass (~living on a prayer~)