Author | Message |
---|
NeiSep Ametuar Posts: 93
| Hi all I have just started with Delphi 7 and i want to use Indy Server components but first i need to learn about Delphi 7 so i would be glad if someone got some information or any url to where i could learn Delphi 7 programing and Indy Server Socket programing Have a nice day
|
Meka][Meka Unstopable Posts: 700
| well because u have jus started with delphi, u best off starting with a small project, without socket use, then move on up, make like a simple calculator, or a text editor like notepad, and add features and such, ther is sample code supplied with d7, have look in demos folder ;)
|
NeiSep Ametuar Posts: 93
| yea i think i gone do soo becuse i think i need to learn much other things first hehe. But thanks i have found a swedish site so i could learn abit about this Delphi 7 hehe
|
NeiSep Ametuar Posts: 93
| Now i have been reading awhile but i got a problem how do i get this to work i got a code looks like this:
Code: | procedure TForm1.Button1Click(Sender: TObject); begin IdTCPServer1.Active := true; IdTCPServer1.DefaultPort := Edit2.Text; StaticText1.Caption := 'Hublist Server is Online...'; StaticText1.Color := clGreen; end; | Well i got the eror on the line with DefaultPort and = Edit2.Text anyway this too seems to be in different types Edit2.Text seems to be in String and IdTCPServer1.DefaultPort seems to be integer. What i want to do is to use digits in a text box thats all but i dont get it working..[/code]
|
Meka][Meka Unstopable Posts: 700
| StrToInt( ); // converts string to int IntToStr( ); / converts int to string ;)
Code: | IdTCPServer1.DefaultPort := StrToInt( Edit2.Text ); |
|
NeiSep Ametuar Posts: 93
| Do you know where i could read about those Text boxes i have search but not find anything about it hmm think its weird
|
Meka][Meka Unstopable Posts: 700
| what do u want to know about them? ;) memo is for multilined text edit box is for single lines only ;)
|
NeiSep Ametuar Posts: 93
| at the moment i want to change the port but it doesnt work i dont know why lol the code looks like this
Code: | unit main; interface uses Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs, ExtCtrls, StdCtrls, IdBaseComponent, IdComponent, IdTCPServer, CheckLst, XPMan, ToolWin, ComCtrls, Grids, IdCustomHTTPServer, IdHTTPServer, IdIntercept, IdLogBase, IdLogEvent, IdLogStream, Mask, Menus; type TForm1 = class(TForm) Panel1: TPanel; GroupBox2: TGroupBox; Edit1: TEdit; dsd: TLabel; Edit2: TEdit; Label1: TLabel; IdTCPServer1: TIdTCPServer; Button1: TButton; Button2: TButton; ScrollBox1: TScrollBox; StaticText1: TStaticText; StaticText2: TStaticText; MainMenu1: TMainMenu; Menu1: TMenuItem; Exit1: TMenuItem; About1: TMenuItem; HubListServer1: TMenuItem; StaticText3: TStaticText; StaticText4: TStaticText; procedure AboutClick(Sender: TObject); procedure Button1Click(Sender: TObject); procedure Button2Click(Sender: TObject); procedure Exit1Click(Sender: TObject); procedure NeiSep1Click(Sender: TObject); procedure HubListServer1Click(Sender: TObject); private { Private declarations } public { Public declarations } end; var Form1: TForm1; implementation {$R *.dfm} procedure TForm1.AboutClick(Sender: TObject); begin showmessage('This Software was made by [TF]Ñèî§èÞ'); end; procedure TForm1.Button1Click(Sender: TObject); begin IdTCPServer1.DefaultPort := StrToInt( Edit2.Text ); IdTCPServer1.Active := true; StaticText1.Caption := 'Hublist Server is online...'; StaticText3.Caption := IntToStr (IdTCPServer1.DefaultPort); StaticText1.Color := clGreen; end; procedure TForm1.Button2Click(Sender: TObject); begin IdTCPServer1.Active := false; StaticText1.Caption := 'Hublist Server is offline...'; StaticText1.Color := clRed; end; procedure TForm1.Exit1Click(Sender: TObject); begin close; end; procedure TForm1.NeiSep1Click(Sender: TObject); begin showmessage('Hi'); end; procedure TForm1.HubListServer1Click(Sender: TObject); begin showmessage('This software was made to Maximum Speed Network'); end; end. |
|
NeiSep Ametuar Posts: 93
| i did start a littlebit to try some things out in the software and i still learing hehe anyway i did do a WebBrowser today not so hard but still i did it and im happy hehe. Much much todo tomorow
|