PARTNER

This is default featured slide 1 title

Go to Blogger edit html and find these sentences.Now replace these sentences with your own descriptions.

This is default featured slide 2 title

Go to Blogger edit html and find these sentences.Now replace these sentences with your own descriptions.

This is default featured slide 3 title

Go to Blogger edit html and find these sentences.Now replace these sentences with your own descriptions.

This is default featured slide 4 title

Go to Blogger edit html and find these sentences.Now replace these sentences with your own descriptions.

This is default featured slide 5 title

Go to Blogger edit html and find these sentences.Now replace these sentences with your own descriptions.

Tampilkan postingan dengan label CODING. Tampilkan semua postingan
Tampilkan postingan dengan label CODING. Tampilkan semua postingan

Minggu, 28 November 2010

Constant Ascii Description

The 0 key through 9 key are the same as their ASCII equivalents 0 – 9:

Constant Ascii Description
vbKey - 0 - 48 - 0 key
vbKey - 1 - 49 - 1 key
vbKey - 2 - 50 - 2 key
vbKey - 3 - 51 - 3 key
vbKey - 4 - 52 - 4 key
vbKey - 5 - 53 - 5 key
vbKey - 6 - 54 - 6 key
vbKey - 7 - 55 - 7 key
vbKey - 8 - 56 - 8 key
vbKey - 9 - 57 - 9 key

The following constants represent keys on the numeric keypad:

Constant Description
vbKeyNumpad0 - 0 key
vbKeyNumpad1 - 1 key
vbKeyNumpad2 - 2 key
vbKeyNumpad3 - 3 key
vbKeyNumpad4 - 4 key
vbKeyNumpad5 - 5 key
vbKeyNumpad6 - 6 key
vbKeyNumpad7 - 7 key
vbKeyNumpad8 - 8 key
vbKeyNumpad9 - 9 key


Share:

Rabu, 10 November 2010

Print Menggunakan Continues Form

Pernahkan anda mengalami kesulitan untuk mencetak text/faktur pada continues form. nah jangan khawatir berikut ini adalah salah satu contoh untuk mencetak text pada continues form.

Pada Module1 paste code berikut:
Option Explicit
Private Type DOCINFO
pDocName As String
pOutputFile As String
pDatatype As String
End Type

Private Declare Function ClosePrinter Lib "winspool.drv" (ByVal _
hPrinter As Long) As Long
Private Declare Function EndDocPrinter Lib "winspool.drv" (ByVal _
hPrinter As Long) As Long
Private Declare Function EndPagePrinter Lib "winspool.drv" (ByVal _
hPrinter As Long) As Long
Private Declare Function OpenPrinter Lib "winspool.drv" Alias _
"OpenPrinterA" (ByVal pPrinterName As String, phPrinter As Long, _
ByVal pDefault As Long) As Long
Private Declare Function StartDocPrinter Lib "winspool.drv" Alias _
"StartDocPrinterA" (ByVal hPrinter As Long, ByVal Level As Long, _
pDocInfo As DOCINFO) As Long
Private Declare Function StartPagePrinter Lib "winspool.drv" (ByVal _
hPrinter As Long) As Long
Declare Function WritePrinter Lib "winspool.drv" (ByVal _
hPrinter As Long, pBuf As Any, ByVal cdBuf As Long, _
pcWritten As Long) As Long
Share:

Senin, 20 September 2010

HOW TO: Upgrade a version 3.x database file to SQL Server Compact 4.0

public static class SqlCeUpgrade{
    public static void EnsureVersion40(this System.Data.SqlServerCe.SqlCeEngine engine, string filename)
    {
        SQLCEVersion fileversion = DetermineVersion(filename);
        if (fileversion == SQLCEVersion.SQLCE20)
            throw new ApplicationException("Unable to upgrade from 2.0 to 4.0");

        if (SQLCEVersion.SQLCE40 > fileversion)
        {
            engine.Upgrade();
        }
    }
    private enum SQLCEVersion
    {
        SQLCE20 = 0,
        SQLCE30 = 1,
        SQLCE35 = 2,
        SQLCE40 = 3
    }
    private static SQLCEVersion DetermineVersion(string filename)
    {
        var versionDictionary = new Dictionary<int, SQLCEVersion> 
        { 
            { 0x73616261, SQLCEVersion.SQLCE20 }, 
            { 0x002dd714, SQLCEVersion.SQLCE30},
            { 0x00357b9d, SQLCEVersion.SQLCE35},
            { 0x003d0900, SQLCEVersion.SQLCE40}
        };
        int versionLONGWORD = 0;
        try
Share:

Upgrade SQL CE Database from 3.1 to 3.5

var engine = new System.Data.SqlServerCe.SqlCeEngine("Data Source=" + filename);
engine.EnsureVersion35(filename);

--HELPER CLASS---
    public static class SqlCeUpgrade
    {
        public static void EnsureVersion35(this SqlCeEngine engine, string filename)
        {
            try
            {
                SQLCEVersion fileversion = DetermineVersion(filename);
                if (fileversion == SQLCEVersion.SQLCE20)
                    throw new ApplicationException("Unable to upgrade from 2.0 to 3.5");
                if (SQLCEVersion.SQLCE35 > fileversion)
                {
                    engine.Upgrade();
                }
            }
Share:

Rabu, 08 September 2010

Mencari sql server yang ada di LAN

Compiler : Delphi
unit Unit1;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs, StdCtrls, ExtCtrls, DB, ADODB, Grids, DBGrids;
type
TFKoneksiMSSever = class(TForm)
adoList: TADOQuery;
edUser: TEdit;
Label1: TLabel;
Label2: TLabel;
cboDatabase: TComboBox;
optSecurity: TRadioGroup;
Label3: TLabel;
Label4: TLabel;
cboServer: TComboBox;
edPass: TEdit;
procedure FormCreate(Sender: TObject);
procedure cboServerChange(Sender: TObject);
procedure optSecurityClick(Sender: TObject);
private
{ Private declarations }
function GetConn : WideString;
procedure ListServer(vServer: TStrings);
public
{ Public declarations }
end;
Share:

Blogger templates