Tag

string

  • Total Source Code 6
  • Total Page : 1
  • You currently on page number : 1

Export a MS Word Table to a TStringGrid

  • 24 December 2013
  • 191
  • export,ms-word,TStringGrid

  uses ComObj; procedure TForm1.Button1Click(Sender: TObject); const AWordDoc = ''C:\pasarkode\testTable.doc''; var MSWord, Table: OLEVariant; iRows, iCols, iGridRows, jGridCols, iNumTables, iTableChosen: Integer; CellText: string; InputString: string; begin try MSWord := CreateOleObject(''Word.Application''); except // Error.... Exit; end; Read more


Crypting with Xor

  • 16 January 2014
  • 202
  • string,text

function TForm1.Cript (Stringa : String; cripting : boolean): String; Var i,k : integer; begin if Cripting then begin for i := 1 to Length(Stringa) do begin result := result + IntToHex((Ord(Stringa[i]) xor i),2); end; end else begin for i := 1 to Length(Stringa) div 2 do begin result := result + Chr(StrToInt('$' + Read more


Encrypt Text using key number

  • 16 January 2014
  • 1081
  • string,text,encrypt

{ This two functions are used to encrypt and decrypt text. Here's how to use it: The four entries Key1, Key2, Key3 and Key4 are numbers that can range from 1 to 120. In order to decrypt a text, you must use the same numbers you used to encrypt the text. No one that doesn't know what values were used on Key1, Key2, Key3 and Key4 will be able to decrypt your text! Note that Key1*Key4 MUST be Read more


Coloring Cells in a StringGrid

  • 22 February 2014
  • 179
  • color,stringgrid,cell

The Source Code procedure TForm1.StringGrid1DrawCell(Sender: TObject; ACol, ARow: Integer; Rect: TRect; State: TGridDrawState); Const //define your color here. Of course you //can use default colors too. clPaleGreen = TColor($CCFFCC); clPaleRed = TColor($CCCCFF); begin //Does the cell have the focus you have to paint it with other colors if (gdFocused in Read more


Coloring Cells in a DBGrid

  • 22 February 2014
  • 181
  • color,stringgrid,cell

It's much easier to give color to DBGrids. Here you have to use the "OnDrawColumnCell"-Event. The following example is coloring the Cells of Column "Status" when the value is not "a". If you want to color the whole line you only have to delete the "If..." statement (see below) procedure TForm1.DBGrid1DrawColumnCell(Sender: TObject; const Rect: TRect; Read more


Javascript Get Only Number and Get Only String

  • 28 April 2014
  • 660
  • string,get number

This the function for get String type from a string var angka=data.replace(/[^0-9]+/g, "");   This for get only Number var huruf = data.replace(/(d+)/g, Read more




Category