View previous topic :: View next topic |
Author |
Message |
ups2000ups I post too much
Reputation: 0
Joined: 31 Jul 2006 Posts: 2471
|
Posted: Sun Nov 25, 2007 4:41 am Post subject: Fast help delphi |
|
|
i think i going to cry nearly lolz i cant get it to work!
this code take the first string out from listbox1,2,3 and put it into a editbox
then add +1 to label 15 thats choose the string it should take
Code: |
// T = label15 caption (this chosse the numbers for z)
procedure TForm1.Button2Click(Sender: TObject);
var
z,T:integer;
begin
if count.caption > Label15.caption then begin
T:=strtoint(Label15.caption); // T:=label15 in integer
// add edit8 text
z:=T;
Edit8.Text:=listbox1.Items[z]; //set position "P" P=T caption
ListBox1.ItemIndex:=z;
// add edit4 text
edit4.Text:=listbox3.Items[z];
ListBox3.ItemIndex:=z;
// add edit3 text
edit3.Text:=listbox2.Items[z];
ListBox2.ItemIndex:=z;
// Add +1 to label15
Label15.caption:=inttostr (T+1); // add +1 into T
end;
end;
|
this is the last timer thats click button2 and then the next item should be taked!
Code: |
procedure TForm1.LastTimer(Sender: TObject);
begin
// next string and timers
Button2.Click; // click button2 to get +2 to make the edits get a new string and put +1 to T
Last.enabled:=false;
Start.enabled:=true;
end;
|
this only go to line 2 and then it stop and repeat line 2 instead of go to 3 ....
why to the value freez at button2 click when it should add +1? and i fixed that 1 time but then it still just readed line2
_________________
dont complain about my english...
1*1 = 2?
Last edited by ups2000ups on Sun Nov 25, 2007 4:49 am; edited 2 times in total |
|
Back to top |
|
 |
appalsap Moderator
Reputation: 0
Joined: 27 Apr 2006 Posts: 6753 Location: Pakistan
|
Posted: Sun Nov 25, 2007 4:44 am Post subject: |
|
|
Learn2NameVariables
You are also using incorrect casing for the Windows API, which will not matter in delphi, but will matter when you switch to a language that is case sensitive (of which the vast majority are)
Make it readable, then we will read it.
_________________
|
|
Back to top |
|
 |
ups2000ups I post too much
Reputation: 0
Joined: 31 Jul 2006 Posts: 2471
|
|
Back to top |
|
 |
appalsap Moderator
Reputation: 0
Joined: 27 Apr 2006 Posts: 6753 Location: Pakistan
|
Posted: Sun Nov 25, 2007 4:49 am Post subject: |
|
|
ups2000ups wrote: | i can just delete the part you dosent inderstand and x,y should be readable in a mouse position smartass  |
You are both illiterate and offensive.
_________________
|
|
Back to top |
|
 |
ups2000ups I post too much
Reputation: 0
Joined: 31 Jul 2006 Posts: 2471
|
|
Back to top |
|
 |
appalsap Moderator
Reputation: 0
Joined: 27 Apr 2006 Posts: 6753 Location: Pakistan
|
Posted: Sun Nov 25, 2007 4:53 am Post subject: |
|
|
ups2000ups wrote: | appalsap wrote: | You are both illiterate and offensive. |
and you think i care when you cant read a basic script ... |
benlue, ARREST THIS MAN!
_________________
|
|
Back to top |
|
 |
ups2000ups I post too much
Reputation: 0
Joined: 31 Jul 2006 Posts: 2471
|
|
Back to top |
|
 |
appalsap Moderator
Reputation: 0
Joined: 27 Apr 2006 Posts: 6753 Location: Pakistan
|
Posted: Sun Nov 25, 2007 4:54 am Post subject: |
|
|
ups2000ups wrote: | for  |
crimes against computers
_________________
|
|
Back to top |
|
 |
ups2000ups I post too much
Reputation: 0
Joined: 31 Jul 2006 Posts: 2471
|
|
Back to top |
|
 |
HolyBlah Master Cheater
Reputation: 2
Joined: 24 Aug 2007 Posts: 446
|
Posted: Sun Nov 25, 2007 5:07 am Post subject: Re: Fast help delphi |
|
|
answer this questions and i will help you. ups2000ups wrote: |
Code: |
procedure TForm1.Button2Click(Sender: TObject);
var
z,T:integer;
begin
if count.caption > Label15.caption then begin {What are you comparing?(length or value?)}
T:=strtoint(Label15.caption); {What does Label15?}
// add edit8 text
z:=T;
Edit8.Text:=listbox1.Items[z]; {What does Edit8 do?}
ListBox1.ItemIndex:=z; {Why do you get the itemindex after you add the text and not before?}
// add edit4 text
edit4.Text:=listbox3.Items[z]; {What does edit4 do?}
ListBox3.ItemIndex:=z; {Why do you get the itemindex after you add the text and not before?}
// add edit3 text
edit3.Text:=listbox2.Items[z]; {What does edit3 do?}
ListBox2.ItemIndex:=z; {Why do you get the itemindex after you add the text and not before?}
// Add +1 to label15
Label15.caption:=inttostr (T+1); // add +1 into T
end;
end;
|
|
appalsap wrote: |
crimes against computers |
and what about Kaspersky?
|
|
Back to top |
|
 |
samuri25404 Grandmaster Cheater
Reputation: 7
Joined: 04 May 2007 Posts: 955 Location: Why do you care?
|
Posted: Sun Nov 25, 2007 9:54 am Post subject: |
|
|
appalsap wrote: | ups2000ups wrote: | i can just delete the part you dosent inderstand and x,y should be readable in a mouse position smartass :shock: |
You are both illiterate and offensive. |
appalsap wrote: | benlue, ARREST THIS MAN! |
appalsap wrote: |
crimes against computers |
Ahahahahahaha
So funny.
~~
Dude, seriously learn to name your variables--not only does it help us, but it helps YOU when you're debugging.
_________________
|
|
Back to top |
|
 |
|