主题:有没有人学delphi啊
dreamdelphi
[专家分:110] 发布于 2004-03-22 21:30:00
学了几个月了,但是好多大四的学长回来告诉我们,delphi程序员的工资普遍都不高,还是java和c++的工资高。
大家想都想得到啦,这对于一个初学者来说,如同泼一盆多大的冷水啊!
有没有人在学delphi呢,大家一起探论一下好吗?
回复列表 (共318个回复)
81 楼
lfz527 [专家分:0] 发布于 2004-06-13 18:10:00
我的qq:38496130
我学了快一年了!
82 楼
yi1205 [专家分:0] 发布于 2004-06-16 11:44:00
我也是什么都知道一点点的人,但就是深入不下去过不了多久就想学另外一种语言了。真想在上面认识几个朋友共同把Delphi学好我们不管工资怎么样,关键是我们对它有兴趣才学让我们一起坚持下去OK?
83 楼
guguwangwang [专家分:0] 发布于 2004-06-16 13:24:00
delphi作为可视化编程,易上手,速度快,是不错的编程工具。c和java也有独到之处。[em10]本人也曾迷糊,学啥好。[em6]其实与其博而不精,不如专工一门。
84 楼
chenlinyunyi [专家分:10] 发布于 2004-06-16 14:26:00
大家算我一个行不行啊,我也是一个菜鸟,一个刚刚接触delphi的菜鸟,我 的QQ是:39965401!
我有好多问题不懂!
85 楼
闲人一个 [专家分:120] 发布于 2004-06-17 08:27:00
新来的,算我一份如何: QQ:4582328
86 楼
hanzaihua [专家分:10] 发布于 2004-06-17 22:20:00
是啊,我也是一只菜菜鸟,大家拉一把吧~~
我的qq:297084160
87 楼
bumblebeelyh [专家分:30] 发布于 2004-06-18 20:59:00
一个偶然的机会来到这里,发现这边是另外一个天堂。这里有你,有他(她),还有我呀!让我们大家一起携手共同努力吧!学好java/vc虽然是工资高,但是delphi也并不比它差多少,只要我们学习好了这门基础的东西,以后转那些就不是件难事!努力吧,朋友!
88 楼
LJH [专家分:0] 发布于 2004-06-19 09:10:00
各位仁兄老友记:本人也想学delphi,不知在广东佛山地区哪里有办班?
[em18]能否指引一二?
89 楼
ze0141187 [专家分:40] 发布于 2004-06-21 19:20:00
大家好:
我是计算机系的,最近正在用delphi做数据库,很想有一些朋友来探讨,我的QQ是329069101,大家加我呀
90 楼
孤情剑 [专家分:30] 发布于 2004-06-22 11:21:00
唉你们都是大学生,我只是一个高中生,不知道自己的水平可不可以学,不过我学了一个星做一个分割器,我的老板说对我有信心!
unit Main;
{****************************************************************************************
项目:文件分割程序
模块:主窗口
描述:
版本:
日期:
作者:
更新:
TODO:
*****************************************************************************************}
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls, Buttons,FileCtrl, ActnList, ExtCtrls, ComCtrls, Menus;
{const}
type
TMain_Form = class(TForm)
Label1: TLabel;
SpdButn_selectsource: TSpeedButton;
SpdButn_selectecausefile: TSpeedButton;
Label2: TLabel;
Label3: TLabel;
Butn_Ok: TButton;
Butn_Exit: TButton;
Edit_SourceFileName: TEdit;
Edit_TargetDircetory: TEdit;
ActionList1: TActionList;
ExitAction: TAction;
Label6: TLabel;
Edit_PartitionFileSize: TEdit;
Label7: TLabel;
GroupBox_Size: TGroupBox;
RadBtn_Mb: TRadioButton;
RadBtn_Kb: TRadioButton;
PopupMenu1: TPopupMenu;
N1: TMenuItem;
procedure SpdButn_selectsourceClick(Sender: TObject);
procedure Butn_ExitClick(Sender: TObject);
procedure SpdButn_selectecausefileClick(Sender: TObject);
procedure Edit_TargetDircetoryMouseMove(Sender: TObject; Shift: TShiftState; X,
Y: Integer);
procedure ExitActionExecute(Sender: TObject);
procedure Butn_OkClick(Sender: TObject);
procedure Edit_SourceFileNameMouseMove(Sender: TObject; Shift: TShiftState; X,
Y: Integer);
procedure RadBtn_KbClick(Sender: TObject);
procedure RadBtn_MbClick(Sender: TObject);
procedure N1Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
sourceF,TargetF : file;
TargetFileDircetory,SourceFileDircetory,TargetFileC,SourceDircetory,SourceDircetorFind: string;
Buf : array[1..1048576] of Char;
WriteResult,ReadResult,TargetDirectorySize,SecondWriteResult,ReadBufSize : Integer;
FileSe,FilesSize,HadWriteSize,SmailSe,CanReadSize : longint;{文件长度}
A,B : Boolean;
SearchResult:TSearchRec;
end;
var
Main_Form: TMain_Form;
implementation
uses FileCopying, About;
{$R *.dfm}
procedure TMain_Form.SpdButn_selectsourceClick(Sender: TObject); //选择源目录
begin
if SelectDirectory ('请选择要复制的目录','',SourceDircetory) then
Edit_SourceFileName.Text:=SourceDircetory;
end;
procedure TMain_Form.Butn_ExitClick(Sender: TObject);
begin
close; // 退出程序
end;
procedure TMain_Form.SpdButn_selectecausefileClick(Sender: TObject);
var //选择目标目录
aPath: string;
begin
aPath := '';
if SelectDirectory('选择保存目录:','E:\testfile',aPath) then
Edit_TargetDircetory.Text := aPath;
end;
procedure TMain_Form.Edit_SourceFileNameMouseMove(Sender: TObject; Shift: TShiftState; X,
Y: Integer);
begin
Edit_SourceFileName.Hint:=Edit_SourceFileName.Text;
end;
procedure TMain_Form.Edit_TargetDircetoryMouseMove(Sender: TObject; Shift: TShiftState; X,
Y: Integer);
begin
Edit_TargetDircetory.Hint := Edit_TargetDircetory.Text; //Edit2的Hint事件
end;
procedure TMain_Form.ExitActionExecute(Sender: TObject);
begin
close; //退出程序
end;
procedure TMain_Form.Butn_OkClick(Sender: TObject); //开始拷贝按钮
var
FileAttrs,I,L,O,OneFileWrited:integer;
begin
A:=True;
b:=A;
L:=0;
HadWriteSize:=0;
O:=1;
I:=(-1);
if DirectoryExists(Edit_SourceFileName.text)=false then
begin
ShowMessage ('指定的文件夹不存在请正确的选择文件夹');
Edit_SourceFileName.text:='';
A:=false;
Edit_SourceFileName.SetFocus;
end;//end if
if DirectoryExists (Edit_TargetDircetory.text)=false then
begin
ShowMessage ('所选的文件夹不存在,请重新选择');
Edit_TargetDircetory.text:='';
B:=false;
Edit_TargetDircetory.SetFocus;
end;{end if}
if (Edit_SourceFileName.Text=Edit_TargetDircetory.Text) and (Edit_SourceFileName.Text<>'') then
begin
ShowMessage ('不能在同一个文件夹内处理文件!');
A:=false;
end;{end if}
if RadBtn_Mb.Checked then //确定一下要分割多大的文件
ReadBufSize:=(StrToInt (Edit_PartitionFileSize.Text))*1048576
else
ReadBufSize:=(StrToInt (Edit_PartitionFileSize.Text))*1024;
try
StrToInt (Edit_PartitionFileSize.Text);
except
showmessage('你输入的数字不正确,请正确输入!');
B:=false;
end;
FileAttrs:=faReadOnly +faHidden +faSysFile +faArchive;//确定要复制文件类型
FilesSize:=0; //初始化总文件的大小
if (A=True)and (B=True) then
begin
SourceDircetory:=Edit_SourceFileName.Text;
if Length (SourceDircetory)=3 then
SourceDircetorFind :=(SourceDircetory+'*.*')
else
SourceDircetorFind:=(SourceDircetory+'\*.*');
if FindFirst (SourceDircetorFind,FileAttrs,SearchResult)=0 then
begin
repeat
O:=O+1;
FilesSize:=SearchResult.Size+FilesSize;
until FindNext (SearchResult) <>0
end;
FindClose (SearchResult);
if O>1 then
begin
ShowMessage (SearchResult.Name);
ShowMessage (IntToStr(FilesSize)); //得到总的文件的大小
Application.CreateForm(TForm_Filecopying, Form_Filecopying);
FileCopying.Form_Filecopying.lbl_FilesSize1.Caption:='总文件为:'+(IntToStr(FilesSize));
TargetDirectorySize := Length (Edit_TargetDircetory.Text);
TargetFileDircetory := Edit_TargetDircetory.Text;{确认下目标路径名}
Delete (TargetFileDircetory,TargetDirectorySize,1);
if (TargetFileDircetory+'\')=Edit_TargetDircetory.Text then
begin{begin if}
TargetFileDircetory := (Edit_TargetDircetory.Text);
end{end if}
else
begin
TargetFileDircetory := (Edit_TargetDircetory.Text+'\');
end;{end else}
if FindFirst (SourceDircetorFind,FileAttrs,SearchResult)=0 then //找寻文件
begin
Main_form.Enabled:=false;
repeat
begin
SourceFileDircetory:=SourceDircetory+'\'+SearchResult.Name;
{打个找到的文件,确定要不要分割,先做不要分割的,不要分割的拿来复制}
try
AssignFile (SourceF,SourceFileDircetory); {打开源文件}
Reset (SourceF,1);
FileSe := fileSize (SourceF);
if FileSe<=ReadBufSize then {如果文件小于指定的大小拿来复制}
begin
TargetFileC:=TargetFileDircetory+SearchResult.Name;
AssignFile (TargetF,TargetFileC);
Rewrite (TargetF,1);
repeat
BlockRead (SourceF,Buf,SizeOf (Buf),ReadResult);
BlockWrite (TargetF,Buf,ReadResult,WriteResult);
HadWriteSize:=WriteResult+HadWriteSize;
FileCopying.Form_Filecopying.lbl_HadWriteSize.Caption:='已复制了:'+IntToStr(HadWriteSize);
FileCopying.Form_Filecopying.ROProgressBar1.Position:=Trunc ((HadWriteSize/FilesSize)*FileCopying.Form_Filecopying.ROProgressBar1.Max);
Application.ProcessMessages;
until
ReadResult=0;
CloseFile (TargetF);
// CloseFile (SourceF);
FileCopying.Form_Filecopying.ROProgressBar1.Position:=Trunc ((HadWriteSize/FilesSize)*FileCopying.Form_Filecopying.ROProgressBar1.Max);
Application.ProcessMessages;
end {end Begin}
{下边写的是要分割的并且分割的第一个文件名是000的,以此类推 }
else
if ReadBufSize<=SizeOf(Buf) then
begin
repeat
BlockRead (SourceF,Buf,ReadBufSize,ReadResult);
if ReadResult>0 then
begin
I:=I+1;
TargetFileC:=TargetFileDircetory+SearchResult.Name+Format ('%.3d',[I]);
AssignFile (TargetF,TargetFileC);
Rewrite (TargetF,1);
BlockWrite (TargetF,Buf,ReadResult,WriteResult);
CloseFile (TargetF);
HadWriteSize:=WriteResult+HadWriteSize;
FileCopying.Form_Filecopying.lbl_HadWriteSize.Caption:='已复制了:'+IntToStr(HadWriteSize);
FileCopying.Form_Filecopying.ROProgressBar1.Position:=Trunc ((HadWriteSize/FilesSize)*FileCopying.Form_Filecopying.ROProgressBar1.Max);
Application.ProcessMessages;
end;
until
(ReadResult=0) or (WriteResult<ReadResult);
end {end begin}
else {要分割,但是规定大小大于缓冲区的大小}
begin
SmailSe:=0;
I:=I+1;
TargetFileC:=TargetFileDircetory+SearchResult.Name+Format ('%.3d',[I]);
AssignFile (TargetF,TargetFileC);
Rewrite (TargetF,1);
CanReadSize:=SizeOf (Buf);
FileSize (SourceF);
repeat
BlockRead (SourceF,Buf,CanReadSize,ReadResult);
if (ReadResult<>0) then
begin
BlockWrite (TargetF,Buf,ReadResult,WriteResult);
HadWriteSize:=WriteResult+HadWriteSize;
OneFileWrited:=OneFileWrited+WriteResult;
SmailSe:=WriteResult+SmailSe;
FileCopying.Form_Filecopying.lbl_HadWriteSize.Caption:='已复制了:'+IntToStr(HadWriteSize);
FileCopying.Form_Filecopying.ROProgressBar1.Position:=Trunc ((HadWriteSize/FilesSize)*FileCopying.Form_Filecopying.ROProgressBar1.Max);
Application.ProcessMessages;
L:=L-1;
if (L=2) then
begin
I:=I+1;
CloseFile (TargetF);
if OneFileWrited<>(FileSize (SourceF)) then
begin
TargetFileC:=TargetFileDircetory+SearchResult.Name+Format ('%.3d',[I]);
AssignFile (TargetF,TargetFileC);
Rewrite (TargetF,1);
SmailSe:=0 ;
CanReadSize:=1048576;
end;
end;
if (SmailSe+SizeOf (Buf)>=ReadBufSize) then
begin
CanReadSize:=ReadBufSize-SmailSe;
L:=3;
end;
end;
until
(ReadResult=0) ;
CloseFile (TargetF);
end;
finally
CloseFile (SourceF);
I:=(-1);
end;{end try....finally....}
end;{repeat}
until
FindNext (SearchResult)<>0;
FindClose (SearchResult);
FileCopying.Form_Filecopying.Free;
ShowMessage ('复制分割完成');
Main_form.Enabled:=True;
Edit_SourceFileName.Text:='';
Edit_TargetDircetory.Text:='';
end;
end{end ifO>1}
else
begin
Edit_SourceFileName.Text:='';
ShowMessage ('这个文件夹里没有文件!');
end;
end;{end if A=b=true}
end;
procedure TMain_Form.RadBtn_KbClick(Sender: TObject);
begin
try
StrToInt (Edit_PartitionFileSize.Text);
Edit_PartitionFileSize.Text:=IntToStr(1024*(StrToInt (Edit_PartitionFileSize.Text)));
except
ShowMessage('你输入的数字不正确,请正确输入!');
end;
end;
procedure TMain_Form.RadBtn_MbClick(Sender: TObject);
begin
try
StrToInt (Edit_PartitionFileSize.Text);
Edit_PartitionFileSize.Text:=IntToStr((StrToInt (Edit_PartitionFileSize.Text) div 1024));
except
ShowMessage('你输入的数字不正确,请正确输入!');
end;
end;
procedure TMain_Form.N1Click(Sender: TObject);
begin
AboutBox := TAboutBox.Create(nil);
AboutBox.ShowModal;
AboutBox.Free;
end;
end.
我来回复