Programlama yapalım ve Öğrenelim. - Delphi Eğitim220
  Ana Sayfa
  .NET Eğitim Notları
  Visual C# .NET Örnek Kodları
  VisualBasic.NET Örnek Kodları
  J# Örnekleri
  ASP.NET Örnek Kodları
  Delphi Eğitim
  => Delphi Eğitim1
  => Delphi Eğitim2
  => Delphi Eğitim3
  => Delphi Eğitim4
  => Delphi Eğitim5
  => Delphi Eğitim6
  => Delphi Eğitim7
  => Delphi Eğitim8
  => Delphi Eğitim9
  => Delphi Eğitim10
  => Delphi Eğitim11
  => Delphi Eğitim13
  => Delphi Eğitim14
  => Delphi Eğitim15
  => Delphi Eğitim16
  => Delphi Eğitim17
  => Delphi Eğitim18
  => Delphi Eğitim19
  => Delphi Eğitim20
  => Delphi Eğitim21
  => Delphi Eğitim22
  => Delphi Eğitim23
  => Delphi Eğitim24
  => Delphi Eğitim25
  => Delphi Eğitim26
  => Delphi Eğitim27
  => Delphi Eğitim28
  => Delphi Eğitim29
  => Delphi Eğitim30
  => Delphi Eğtim31
  => Delphi Eğitim32
  => Delphi Eğitim33
  => Delphi Eğitim34
  => Delphi Eğitim35
  => Delphi Eğitim36
  => Delphi Eğitim37
  => Delphi Eğitim38
  => Delphi Eğitim39
  => Delphi Eğitim40
  => Delphi Eğitim41
  => Delphi Eğitim42
  => Delphi Eğitim43
  => Delphi Eğitim44
  => Delphi Eğitim45
  => Delphi Eğitim46
  => Delphi Eğitim47
  => Delphi Eğitim48
  => Delphi Eğitim49
  => Delphi Eğitim50
  => Delphi Eğitim51
  => Delphi Eğitim52
  => Delphi Eğitim53
  => Delphi Eğitim54
  => Delphi Eğitim55
  => Delphi Eğitim56
  => Delphi Eğitim57
  => Delphi Eğitim58
  => Delphi Eğitim59
  => Delphi Eğitim60
  => Delphi Eğitim61
  => Delphi Eğitim62
  => Delphi Eğitim63
  => Delphi Eğitim64
  => Delphi Eğitim65
  => Delphi Eğitim66
  => Delphi Eğitim67
  => Delphi Eğitim68
  => Delphi Eğitim69
  => Delphi Eğitim70
  => Delphi Eğitim71
  => Delphi Eğitim72
  => Delphi Eğitim73
  => Delphi Eğitim74
  => Delphi Eğitim75
  => Delphi Eğitim76
  => Delphi Eğitim77
  => Delphi Eğitim78
  => Delphi Eğitim79
  => Delphi Eğitim80
  => Delphi Eğitim81
  => Delphi Eğitim82
  => Delphi Eğitim83
  => Delphi Eğitim84
  => Delphi Eğitim85
  => Delphi Eğitim86
  => Delphi Eğitim87
  => Delphi Eğitim88
  => Delphi Eğitim89
  => Delphi Eğitim90
  => Delphi Eğitim91
  => Delphi Eğitim92
  => Delphi Eğitim93
  => Delphi Eğitim94
  => Delphi Eğitim95
  => Delphi Eğitim96
  => Delphi Eğitim97
  => Delphi Eğitim98
  => Delphi Eğitim99
  => Delphi Eğitim100
  => Delphi Eğitim101
  => Delphi Eğitim102
  => Delphi Eğitim103
  => Delphi Eğitim104
  => Delphi Eğitim105
  => Delphi Eğitim106
  => Delphi Eğitim107
  => Delphi Eğitim108
  => Delphi Eğitim109
  => Delphi Eğitim110
  => Delphi Eğitim111
  => Delphi Eğitim112
  => Delphi Eğitim113
  => Delphi Eğitim114
  => Delphi Eğitim115
  => Delphi Eğitim116
  => Delphi Eğitim117
  => Delphi Eğitim118
  => Delphi Eğitim119
  => Delphi Eğitim120
  => Delphi Eğitim121
  => Delphi Eğitim122
  => Delphi Eğitim123
  => Delphi Eğitim124
  => Delphi Eğitim125
  => Delphi Eğitim126
  => Delphi Eğitim127
  => Delphi Eğitim128
  => Delphi Eğitim129
  => Delphi Eğitim130
  => Delphi Eğitim131
  => Delphi Eğitim132
  => Delphi Eğitim133
  => Delphi Eğitim134
  => Delphi Eğitim135
  => Delphi Eğitim136
  => Delphi Eğitim137
  => Delphi Eğitim138
  => Delphi Eğitim139
  => Delphi Eğitim140
  => Delphi Eğitim141
  => Delphi Eğitim142
  => Delphi Eğitim143
  => Delphi Eğitim144
  => Delphi Eğitim145
  => Delphi Eğitim146
  => Delphi eğitim147
  => Delphi Eğitim148
  => Delphi Eğitim149
  => Delphi Eğitim150
  => Delphi Eğitim151
  => Delphi Eğitim152
  => Delphi Eğitim153
  => Delphi Eğitim154
  => Delphi Eğitim155
  => Delphi Eğitim156
  => Delphi Eğitim157
  => Delphi Eğitim158
  => Delphi Eğitim159
  => Delphi Eğitim160
  => Delphi Eğitim161
  => Delphi Eğitim162
  => Delphi Eğitim164
  => Delphi Eğitim165
  => Delphi Eğitim166
  => Delphi Eğitim167
  => Delphi Eğitim168
  => Delphi Eğitim169
  => Delphi Eğitim170
  => Delphi Eğitim171
  => Delphi Eğitim172
  => Delphi Eğitim173
  => Delphi Eğitim174
  => Delphi Eğitim175
  => Delphi Eğitim176
  => Delphi Eğitim177
  => Delphi Eğitim178
  => Delphi Eğitim179
  => Delphi Eğitim180
  => Delphi Eğitim181
  => Delphi Eğitim182
  => Delphi Eğitim183
  => Delphi Eğitim184
  => Delphi Eğitim185
  => Delphi Eğitim186
  => Delphi Eğitim187
  => Delphi Eğitim188
  => Delphi Eğitim189
  => Delphi Eğitim190
  => Delphi Eğitim191
  => Delphi Eğitim192
  => Delphi Eğitim193
  => Delphi Eğitim194
  => Delphi Eğitim195
  => Delphi Eğitim196
  => Delphi Eğitim197
  => Delphi Eğitim198
  => Delphi Eğitim199
  => Delphi Eğitim200
  => Delphi Eğitim201
  => Delphi Eğitim202
  => Delphi Eğitim203
  => Delphi Eğitim204
  => Delphi Eğitim205
  => Delphi Eğitim206
  => Delphi Eğitim207
  => Delphi Eğitim208
  => Delphi Eğitim209
  => Delphi Eğitim210
  => Delphi Eğitim211
  => Delphi Eğitim212
  => Delphi Eğitim213
  => Delphi Eğitim214
  => Delphi Eğitim215
  => Delphi Eğitim216
  => Delphi Eğitim217
  => Delphi Eğitim218
  => Delphi Eğitim219
  => Delphi Eğitim220
  => Delphi Eğitim221
  => Delphi Eğitim222
  => Delphi Eğitim223
  => Delphi Eğitim224
  => Delphi Eğitim225
  => Delphi Eğitim226
  => Delphi Eğitim227
  => Delphi Eğitim228
  => Delphi Eğitim229
  => Delphi Eğitim230
  => Delphi Eğitim231
  => Delphi Eğitim232
  => Delphi Eğitim233
  => Delphi Eğitim234
  => Delphi Eğitim235
  => Delphi Eğitim236
  => Delphi Eğitim237
  => Delphi Eğitim238
  => Delphi Eğitim239
  => Delphi Eğitim240
  => Delphi Eğitim241
  => Delphi Eğitim242
  İletişim

Renkli resmi sepia yapmak(siyah-beyaz)

function bmptosepia(const bmp: TBitmap; depth: Integer): Boolean;

var

color,color2:longint;

r,g,b,rr,gg:byte;

h,w:integer;

begin

  for h := 0 to bmp.height do

  begin

    for w := 0 to bmp.width do

    begin

//first convert the bitmap to greyscale

    color:=colortorgb(bmp.Canvas.pixels[w,h]);

    r:=getrvalue(color);

    g:=getgvalue(color);

    b:=getbvalue(color);

    color2:=(r+g+b) div 3;

    bmp.canvas.Pixels[w,h]:=RGB(color2,color2,color2);

//then convert it to sepia

    color:=colortorgb(bmp.Canvas.pixels[w,h]);

    r:=getrvalue(color);

    g:=getgvalue(color);

    b:=getbvalue(color);

    rr:=r+(depth*2);

    gg:=g+depth;

    if rr <= ((depth*2)-1) then

    rr:=255;

    if gg <= (depth-1) then

    gg:=255;

    bmp.canvas.Pixels[w,h]:=RGB(rr,gg,b);

    end;

  end;

end;

 

//Example:

procedure TForm1.Button1Click(Sender: TObject);

begin

  bmptosepia(image1.picture.bitmap, 20);

end;

 

Delphi - .....................................

 

Reknli resmi sepia yapmak(siyah-beyaz)

function bmptosepia(const bmp: TBitmap; depth: Integer): Boolean;

var

color,color2:longint;

r,g,b,rr,gg:byte;

h,w:integer;

begin

  for h := 0 to bmp.height do

  begin

    for w := 0 to bmp.width do

    begin

//first convert the bitmap to greyscale

    color:=colortorgb(bmp.Canvas.pixels[w,h]);

    r:=getrvalue(color);

    g:=getgvalue(color);

    b:=getbvalue(color);

    color2:=(r+g+b) div 3;

    bmp.canvas.Pixels[w,h]:=RGB(color2,color2,color2);

//then convert it to sepia

    color:=colortorgb(bmp.Canvas.pixels[w,h]);

    r:=getrvalue(color);

    g:=getgvalue(color);

    b:=getbvalue(color);

    rr:=r+(depth*2);

    gg:=g+depth;

    if rr <= ((depth*2)-1) then

    rr:=255;

    if gg <= (depth-1) then

    gg:=255;

    bmp.canvas.Pixels[w,h]:=RGB(rr,gg,b);

    end;

  end;

end;

 

//Example:

procedure TForm1.Button1Click(Sender: TObject);

begin

  bmptosepia(image1.picture.bitmap, 20);

end;

 

Delphi - .....................................

 

SecoSoft Kronometre Yardım

Arkadaşım kronometreyi yapmak zor değil ama sayaç olarak timer kullandım.

o da gerçek saniye hızında çalışmıyo.En azından benim makinamda. ama kod olarak

doğru. Eğer daha iyi sonuç istersen diğer componentlerden HighRes timer bul.

Şimdilik sana bukadar yardımcı olabilirim...

 

//----------- FORM1 in text kodları---------------//

object Form1: TForm1

  Left = 221

  Top = 205

  Width = 182

  Height = 143

  Caption = 'Kronometre'

  Color = clBtnFace

  Font.Charset = DEFAULT_CHARSET

  Font.Color = clWindowText

  Font.Height = -11

  Font.Name = 'MS Sans Serif'

  Font.Style = []

  OldCreateOrder = False

  PixelsPerInch = 96

  TextHeight = 13

  object Saat: TLabel

    Left = 22

    Top = 70

    Width = 28

    Height = 32

    Caption = '00'

    Font.Charset = DEFAULT_CHARSET

    Font.Color = clWindowText

    Font.Height = -27

    Font.Name = 'MS Sans Serif'

    Font.Style = []

    ParentFont = False

  end

  object S: TLabel

    Left = 96

    Top = 70

    Width = 28

    Height = 32

    Caption = '00'

    Font.Charset = DEFAULT_CHARSET

    Font.Color = clWindowText

    Font.Height = -27

    Font.Name = 'MS Sans Serif'

    Font.Style = []

    ParentFont = False

  end

  object ms: TLabel

    Left = 134

    Top = 70

    Width = 28

    Height = 32

    Caption = '00'

    Font.Charset = DEFAULT_CHARSET

    Font.Color = clWindowText

    Font.Height = -27

    Font.Name = 'MS Sans Serif'

    Font.Style = []

    ParentFont = False

  end

  object D: TLabel

    Left = 58

    Top = 70

    Width = 28

    Height = 32

    Caption = '00'

    Font.Charset = DEFAULT_CHARSET

    Font.Color = clWindowText

    Font.Height = -27

    Font.Name = 'MS Sans Serif'

    Font.Style = []

    ParentFont = False

  end

  object Label1: TLabel

    Left = 50

    Top = 74

    Width = 7

    Height = 24

    Caption = ':'

    Font.Charset = DEFAULT_CHARSET

    Font.Color = clWindowText

    Font.Height = -21

    Font.Name = 'MS Sans Serif'

    Font.Style = [fsBold]

    ParentFont = False

  end

  object Label2: TLabel

    Left = 88

    Top = 74

    Width = 7

    Height = 24

    Caption = ':'

    Font.Charset = DEFAULT_CHARSET

    Font.Color = clWindowText

    Font.Height = -21

    Font.Name = 'MS Sans Serif'

    Font.Style = [fsBold]

    ParentFont = False

  end

  object Label3: TLabel

    Left = 126

    Top = 74

    Width = 7

    Height = 24

    Caption = ':'

    Font.Charset = DEFAULT_CHARSET

    Font.Color = clWindowText

    Font.Height = -21

    Font.Name = 'MS Sans Serif'

    Font.Style = [fsBold]

    ParentFont = False

  end

  object Button1: TButton

    Left = 20

    Top = 22

    Width = 59

    Height = 25

    Caption = 'Başlat'

    TabOrder = 0

    OnClick = Button1Click

  end

  object Button2: TButton

    Left = 84

    Top = 22

    Width = 59

    Height = 25

    Caption = 'Durdur'

    TabOrder = 1

    OnClick = Button2Click

  end

  object Timer1: TTimer

    Enabled = False

    Interval = 10

    OnTimer = Timer1Timer

    Left = 102

    Top = 4

  end

end

//------------SON----------------//

 

//---------UNIT1-------------------//

unit Unit1;

 

interface

 

uses

  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,

  Dialogs, ExtCtrls, StdCtrls, JvComponent, JvThreadTimer;

 

type

  TForm1 = class(TForm)

    Saat: TLabel;

    S: TLabel;

    ms: TLabel;

    D: TLabel;

    Button1: TButton;

    Button2: TButton;

    Timer1: TTimer;

    Label1: TLabel;

    Label2: TLabel;

    Label3: TLabel;

    procedure Timer1Timer(Sender: TObject);

    procedure Button1Click(Sender: TObject);

    procedure Button2Click(Sender: TObject);

  private

    { Private declarations }

  public

    { Public declarations }

  end;

 

var

  Form1: TForm1;

  Sayac:integer;

implementation

 

{$R *.dfm}

 

procedure TForm1.Timer1Timer(Sender: TObject);

begin

inc(Sayac);

ms.Caption:=FormatFloat('00',Sayac mod 100);

s.Caption:=FormatFloat('00',(Sayac div 100) mod 60);

d.Caption:=FormatFloat('00',(Sayac div 6000) mod 60);

saat.Caption:=FormatFloat('00',Sayac div 360000);

end;

 

procedure TForm1.Button1Click(Sender: TObject);

begin

Sayac:=0;

timer1.Enabled:=true;

end;

 

procedure TForm1.Button2Click(Sender: TObject);

begin

Timer1.Enabled:=false;

end;

 

end.

//-----------------SON-------------------//

 

Delphi - .....................................

 

SecoSoft Kronometre Yardım

Arkadaşım kronometreyi yapmak zor değil ama sayaç olarak timer kullandım.

o da gerçek saniye hızında çalışmıyo.En azından benim makinamda. ama kod olarak

doğru. Eğer daha iyi sonuç istersen diğer componentlerden HighRes timer bul.

Şimdilik sana bukadar yardımcı olabilirim...

 

//----------- FORM1 in text kodları---------------//

object Form1: TForm1

  Left = 221

  Top = 205

  Width = 182

  Height = 143

  Caption = 'Kronometre'

  Color = clBtnFace

  Font.Charset = DEFAULT_CHARSET

  Font.Color = clWindowText

  Font.Height = -11

  Font.Name = 'MS Sans Serif'

  Font.Style = []

  OldCreateOrder = False

  PixelsPerInch = 96

  TextHeight = 13

  object Saat: TLabel

    Left = 22

    Top = 70

    Width = 28

    Height = 32

    Caption = '00'

    Font.Charset = DEFAULT_CHARSET

    Font.Color = clWindowText

    Font.Height = -27

    Font.Name = 'MS Sans Serif'

    Font.Style = []

    ParentFont = False

  end

  object S: TLabel

    Left = 96

    Top = 70

    Width = 28

    Height = 32

    Caption = '00'

    Font.Charset = DEFAULT_CHARSET

    Font.Color = clWindowText

    Font.Height = -27

    Font.Name = 'MS Sans Serif'

    Font.Style = []

    ParentFont = False

  end

  object ms: TLabel

    Left = 134

    Top = 70

    Width = 28

    Height = 32

    Caption = '00'

    Font.Charset = DEFAULT_CHARSET

    Font.Color = clWindowText

    Font.Height = -27

    Font.Name = 'MS Sans Serif'

    Font.Style = []

    ParentFont = False

  end

  object D: TLabel

    Left = 58

    Top = 70

    Width = 28

    Height = 32

    Caption = '00'

    Font.Charset = DEFAULT_CHARSET

    Font.Color = clWindowText

    Font.Height = -27

    Font.Name = 'MS Sans Serif'

    Font.Style = []

    ParentFont = False

  end

  object Label1: TLabel

    Left = 50

    Top = 74

    Width = 7

    Height = 24

    Caption = ':'

    Font.Charset = DEFAULT_CHARSET

    Font.Color = clWindowText

    Font.Height = -21

    Font.Name = 'MS Sans Serif'

    Font.Style = [fsBold]

    ParentFont = False

  end

  object Label2: TLabel

    Left = 88

    Top = 74

    Width = 7

    Height = 24

    Caption = ':'

    Font.Charset = DEFAULT_CHARSET

    Font.Color = clWindowText

    Font.Height = -21

    Font.Name = 'MS Sans Serif'

    Font.Style = [fsBold]

    ParentFont = False

  end

  object Label3: TLabel

    Left = 126

    Top = 74

    Width = 7

    Height = 24

    Caption = ':'

    Font.Charset = DEFAULT_CHARSET

    Font.Color = clWindowText

    Font.Height = -21

    Font.Name = 'MS Sans Serif'

    Font.Style = [fsBold]

    ParentFont = False

  end

  object Button1: TButton

    Left = 20

    Top = 22

    Width = 59

    Height = 25

    Caption = 'Başlat'

    TabOrder = 0

    OnClick = Button1Click

  end

  object Button2: TButton

    Left = 84

    Top = 22

    Width = 59

    Height = 25

    Caption = 'Durdur'

    TabOrder = 1

    OnClick = Button2Click

  end

  object Timer1: TTimer

    Enabled = False

    Interval = 10

    OnTimer = Timer1Timer

    Left = 102

    Top = 4

  end

end

//------------SON----------------//

 

//---------UNIT1-------------------//

unit Unit1;

 

interface

 

uses

  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,

  Dialogs, ExtCtrls, StdCtrls, JvComponent, JvThreadTimer;

 

type

  TForm1 = class(TForm)

    Saat: TLabel;

    S: TLabel;

    ms: TLabel;

    D: TLabel;

    Button1: TButton;

    Button2: TButton;

    Timer1: TTimer;

    Label1: TLabel;

    Label2: TLabel;

    Label3: TLabel;

    procedure Timer1Timer(Sender: TObject);

    procedure Button1Click(Sender: TObject);

    procedure Button2Click(Sender: TObject);

  private

    { Private declarations }

  public

    { Public declarations }

  end;

 

var

  Form1: TForm1;

  Sayac:integer;

implementation

 

{$R *.dfm}

 

procedure TForm1.Timer1Timer(Sender: TObject);

begin

inc(Sayac);

ms.Caption:=FormatFloat('00',Sayac mod 100);

s.Caption:=FormatFloat('00',(Sayac div 100) mod 60);

d.Caption:=FormatFloat('00',(Sayac div 6000) mod 60);

saat.Caption:=FormatFloat('00',Sayac div 360000);

end;

 

procedure TForm1.Button1Click(Sender: TObject);

begin

Sayac:=0;

timer1.Enabled:=true;

end;

 

procedure TForm1.Button2Click(Sender: TObject);

begin

Timer1.Enabled:=false;

end;

 

end.

//-----------------SON-------------------//

 

Delphi - .....................................

 

Yardım

delphi 5 kullanıyorum. Programlarım bayağı bir

gelişti. Harika programlar ortaya çıkarıyorum.

Ama kronometre yapamıyorum. Bana yardım edin. Bana

yardım etmeniz için bir formun içine form1 var

hiç birşey yok halde iken neler ekleyip hangi

kodları yazmalıyım? Bu kodu lütfen bana gönderin.

İstediğiniz ok zor olmamak koşuluyla) bir programı

teşekkür olarak e-mail adresinize yollarım. Bu konuda

yardım edin. Şu anki kodlar işlemiyor. Yapılmış bir

programdan kesilmiş. Onlarla yapması acayip zor

geliyor.Siz de öyle yapmadan gönderin.Program e-mailinize

gelmek üzeredir. Okuduğum anda uygulayacağım ve

çalışırsa istediğiniz programa başlayacağım.

 

Delphi - .....................................

 

Yardım

delphi 5 kullanıyorum. Programlarım bayağı bir

gelişti. Harika programlar ortaya çıkarıyorum.

Ama kronometre yapamıyorum. Bana yardım edin. Bana

yardım etmeniz için bir formun içine form1 var

hiç birşey yok halde iken neler ekleyip hangi

kodları yazmalıyım? Bu kodu lütfen bana gönderin.

İstediğiniz ok zor olmamak koşuluyla) bir programı

teşekkür olarak e-mail adresinize yollarım. Bu konuda

yardım edin. Şu anki kodlar işlemiyor. Yapılmış bir

programdan kesilmiş. Onlarla yapması acayip zor

geliyor.Siz de öyle yapmadan gönderin.Program e-mailinize

gelmek üzeredir. Okuduğum anda uygulayacağım ve

çalışırsa istediğiniz programa başlayacağım.

 

Delphi - .....................................

 

Excel'den dbgrid'e  import

procedure TForm1.Import1Click(Sender: TObject);

Var

    ExcelApplication1 : TExcelApplication;

    ExcelWorkBook1    : TExcelWorkBook;

    ExcelWorkSheet1   : TExcelWorkSheet;

    lcid              : Integer;

    aExcelFile        : OleVariant;

    aFile: String;

    aCurrLine         : integer;

    aCurrColumn       : integer;

begin

    od.Title:= 'Shipmentinfo  ';

    if  od.Execute then

    begin

        aFile:= od.FileName; //Dosya Ismı buraya

        ExcelApplication1:=TExcelApplication.Create( self );

        ExcelWorkBook1:=TExcelWorkBook.Create( self );

        ExcelWorkSheet1:=TExcelWorkSheet.Create( self );

        ExcelApplication1.Connect;

        lcid := 1033;//Sisteminizde yuklu msoffice'in  default LCID ülke kodu.

        ExcelApplication1.Visible[ lcid ] := False;

        aExcelFile:=aFile;

        ExcelWorkBook1.ConnectTo(ExcelApplication1.Workbooks.Add(aExcelFile, lcid));

        ExcelWorkSheet1.ConnectTo(ExcelWorkBook1.Worksheets[1] as _Worksheet);

        if DataModule1.Shipmentinfo.Active then

           DataModule1.Shipmentinfo.Close;

        DataModule1.Shipmentinfo.Open;

 

        aCurrLine:= 2;

        while VarToStr(ExcelWorkSheet1.Cells.Item[ aCurrLine, 1 ].Value) <> '' do

        begin

            DataModule1.Shipmentinfo.insert;

            DataModule1.shipmentinfo.FieldByName('Week').AsString:= ExcelWorkSheet1.Cells.Item[ aCurrLine, 1 ].Value;          //Excel sheet 'deki alanların dbgrid karşılığı

            DataModule1.shipmentinfo.FieldByName('Trailer').AsString:= ExcelWorkSheet1.Cells.Item[ aCurrLine, 2 ].Value;

            DataModule1.shipmentinfo.FieldByName('Shipment').AsString:= ExcelWorkSheet1.Cells.Item[ aCurrLine, 3 ].Value;

            DataModule1.shipmentinfo.FieldByName('Customer').AsString:= ExcelWorkSheet1.Cells.Item[ aCurrLine, 4 ].Value;

            DataModule1.shipmentinfo.FieldByName('Name').AsString:= ExcelWorkSheet1.Cells.Item[ aCurrLine, 5 ].Value;

            DataModule1.shipmentinfo.FieldByName('Zipcode').AsString:= ExcelWorkSheet1.Cells.Item[ aCurrLine, 6 ].Value;

            DataModule1.shipmentinfo.FieldByName('City').AsString:= ExcelWorkSheet1.Cells.Item[ aCurrLine, 7 ].Value;

            DataModule1.shipmentinfo.FieldByName('Colli').AsString:= ExcelWorkSheet1.Cells.Item[ aCurrLine, 9 ].Value;

            DataModule1.shipmentinfo.FieldByName('Country').AsString:= ExcelWorkSheet1.Cells.Item[ aCurrLine, 8 ].Value;

            DataModule1.shipmentinfo.FieldByName('Weight').AsString:= ExcelWorkSheet1.Cells.Item[ aCurrLine, 10 ].Value;

            DataModule1.shipmentinfo.FieldByName('Unit').AsString:= ExcelWorkSheet1.Cells.Item[ aCurrLine, 11 ].Value;

            DataModule1.Shipmentinfo.Post;

            Self.Refresh;

            inc( aCurrLine );

        end;

        ExcelWorkSheet1.Columns.Autofit;

        ExcelApplication1.Visible[lcid]:=true;

        ExcelWorksheet1.disconnect;

        ExcelWorkbook1.disconnect;

        ExcelApplication1.disconnect;

 

    End;

End;

 

Delphi - .....................................

 

Bu web sitesi ücretsiz olarak Bedava-Sitem.com ile oluşturulmuştur. Siz de kendi web sitenizi kurmak ister misiniz?
Ücretsiz kaydol