Minggu, 28 Juni 2009

self confidence or bluff ?

hisyam after read .In daily file, we frequently find one who very trusts diriserta arrogant people. Self confidence One who usually easy associate with with others. Whereas smart aleck usually lazy come near by whoever. Its section many people that confuse actually its position there is where.
Bluff or self confidence Kita?
Following difference between smart aleck and self confidence people:

1. Smart aleck pretend it higher than others. Whereas self confidence people believe that he/she haves uniqueness and talent as the same manner as that bestowed differ to everyone.

2. Smart aleck likely always knew what best for others. Whereas self confidence one who are always opened about its opinion to others.

3. Smart aleck usually sharp to his/her one who see as [the] rival. Self confidence People have borned ably to compete.

4. Difficult Smart aleck and even never confess their mistake. Self confidence People not afraid to confess that he conduct mistake.

5. Smart aleck usually like if others conducts mistake Sedang those in self confidence likes help people face mistake that they make.

6. Smart aleck usually very care with others opinion to he/she. Whereas self confidence people not too cared with others opinion to he/she.

7. Smart aleck usually like plume it, whereas those in self confidence tends to to keep quiet.

Last how become self confidence without turn into bluff?


it-self introspection....../


from :: http://www.rascalbrick.blogspot.com/

Minggu, 21 Juni 2009

Visual Basic with Listbox

This is a basic from Visual basic chung_chin make to Prof. Reza bekasi children who always chat with chung_chin with the id rezaprof26. that is actually easy to only require 1 form, 1 ListBox and 3command button. then you can type the code below:

----------------------------------------------------------------------------------------

Private Sub cmdKeluar_Click()
End
End Sub

Private Sub cmdTampil_Click()
Dim i As Integer
lstNama.Clear 'ini untuk membersihkan lstnama
For i = 1 To 3
lstNama.AddItem txtInputNama.Text
Next i
End Sub

Private Sub cmdWarna_Click()
lstNama.ForeColor = vbRed
End Sub

-----------------------------------------------------------------------------------

If you want to download this file click there

Learn Visual Basic

For you who want to learn visual basic and want to learn the making of anti-virus and virus with visual basic you can download the source code click here

But do not use any because this is an activity only. I hope the programming can be developed in Indonesia.

Jumat, 19 Juni 2009

long time not post a source code with the application codejob, after so long a successful ngoprek finally the view that in accordance with the desire.
I include below will all see the looks though. and the source code to follow

Senin, 08 Juni 2009

Printed Struk with Star tipe cutter printer sesi 2

Earlier that there is source code I made, I will now be provided with source code in a vb by a support team from the printer maker (star). Please follow me .... (continue)

source code in this method combine with rawprinter that I study in the earlier post. Now this is source code ..

-------------------------------------------------------------------------------------
Call StartPagePrinter(lhPrinter)
' Sending raw data to the printer
sWrittenData = Chr(&H1B) + Chr(&H1D) + Chr(&H61) + Chr(&H1) 'Center Alignment - Refer to Pg. 3-29
sWrittenData = sWrittenData + Chr(&H5B) + "If loaded.. Logo1 goes here" + Chr(&H5D) + vbCrLf
sWrittenData = sWrittenData + Chr(&H1B) + Chr(&H1C) + Chr(&H70) + Chr(&H1) + Chr(&H0) + vbCrLf 'Stored Logo Printing - Refer to Pg. 3-38
sWrittenData = sWrittenData + "Star Clothing Boutique" + vbCrLf
sWrittenData = sWrittenData + "1150 King Georges Post Rd." + vbCrLf
sWrittenData = sWrittenData + "Edison, NJ 08837" + vbCrLf
sWrittenData = sWrittenData + vbCrLf
sWrittenData = sWrittenData + Chr(&H1B) + Chr(&H1D) + Chr(&H61) + Chr(&H0) 'Left Alignment - Refer to Pg. 3-29
sWrittenData = sWrittenData + Chr(&H1B) + Chr(&H44) + Chr(&H2) + Chr(&H10) + Chr(&H22) + Chr(&H0) 'Setting Horizontal Tab - Pg. 3-27
sWrittenData = sWrittenData + "Date: 12/31/2008 " + Chr(&H9) + " Time: 9:10 PM" 'Moving Horizontal Tab - Pg. 3-26
sWrittenData = sWrittenData + "------------------------------------------------" + vbCrLf + vbCrLf
sWrittenData = sWrittenData + Chr(&H1B) + Chr(&H45) 'Select Emphasized Printing - Pg. 3-14
sWrittenData = sWrittenData + "SALE" + vbCrLf
sWrittenData = sWrittenData + Chr(&H1B) + Chr(&H46) 'Cencel Emphasized Printing - Pg. 3-14
sWrittenData = sWrittenData + "SKU " + Chr(&H9) + " Description " + Chr(&H9) + " Total" + vbCrLf
sWrittenData = sWrittenData + "300678566 " + Chr(&H9) + " PLAN T-SHIRT" + Chr(&H9) + " 10.99" + vbCrLf
sWrittenData = sWrittenData + "300692003 " + Chr(&H9) + " BLACK DENIM" + Chr(&H9) + " 29.99" + vbCrLf
sWrittenData = sWrittenData + "300651148 " + Chr(&H9) + " BLUE DENIM" + Chr(&H9) + " 29.99" + vbCrLf
sWrittenData = sWrittenData + "300642980 " + Chr(&H9) + " STRIPE DRESS" + Chr(&H9) + " 49.99" + vbCrLf
sWrittenData = sWrittenData + "300638471 " + Chr(&H9) + " BLACK BOOT" + Chr(&H9) + " 35.99" + vbCrLf
sWrittenData = sWrittenData + vbCrLf
sWrittenData = sWrittenData + "Subtotal " + Chr(&H9) + "" + Chr(&H9) + " 156.95" + vbCrLf
sWrittenData = sWrittenData + "Tax " + Chr(&H9) + "" + Chr(&H9) + " 00.00" + vbCrLf
sWrittenData = sWrittenData + "------------------------------------------------" + vbCrLf
sWrittenData = sWrittenData + "Total" + Chr(&H6) + "" + Chr(&H9) + Chr(&H1B) + Chr(&H69) + Chr(&H1) + Chr(&H1) + " $156.95" + vbCrLf 'Character Expansion - Pg. 3-10
sWrittenData = sWrittenData + Chr(&H1B) + Chr(&H69) + Chr(&H0) + Chr(&H0) 'Cancel Character Expansion - Pg. 3-10
sWrittenData = sWrittenData + "------------------------------------------------" + vbCrLf + vbCrLf
sWrittenData = sWrittenData + "Charge" + vbCrLf + "$159.95" + vbCrLf
sWrittenData = sWrittenData + "Visa XXXX-XXXX-XXXX-0123" + vbCrLf + vbCrLf
sWrittenData = sWrittenData + Chr(&H1B) + Chr(&H34) + "Refunds and Exchanges" + Chr(&H1B) + Chr(&H35) + vbNewLine 'Specify/Cencel White/Black Invert - Pg. 3-16
sWrittenData = sWrittenData + "Within " + Chr(&H1B) + Chr(&H2D) + Chr(&H1) + "30 days" + Chr(&H1B) + Chr(&H2D) + Chr(&H0) + " with receipt" + vbCrLf 'Specify/Cancel Underline Printing - Pg. 3-15
sWrittenData = sWrittenData + "And tags attached" + vbCrLf + vbCrLf
sWrittenData = sWrittenData + Chr(&H1B) + Chr(&H1D) + Chr(&H61) + Chr(&H1)
sWrittenData = sWrittenData + Chr(&H1B) + Chr(&H62) + Chr(&H6) + Chr(&H2) + Chr(&H2) + " 12ab34cd56" + Chr(&H1E) + vbCrLf 'Barcode - Pg. 3-39 - 3-40
sWrittenData = sWrittenData + Chr(&H1B) + Chr(&H64) + Chr(&O2) 'Cut - Pg. 3-41
sWrittenData = sWrittenData + Chr(&H7)

-------------------------------------------------------------------------------------
confused to the source code this would be used for what,
buanyak code for the dot matrix printer
for the comment love ya can, make the knowledge sharing ya. stay informed newbie copas blink...

Senin, 01 Juni 2009

printed strukwith star tipe cutter printer sesi 1

Hisyam Wahid Luthfi...hear more news abaut printer..
Yesterday I try to create a program using the printer serial star, but I forgot similar in market type that can have direct cutternya and breadth only about 6-8 cm. use paper scroll. Previously I had prosting how to stop that paper does not curl up and hold. but I was not able to set the size of the letters. after browsing here and there, stop in to the site www.vb-bego.net in regards forum in the study but eventually also have to use ocx in seller and were forced to do a search search-reference the other. after a while I finally found how to make a bold writings. and I join with the source does not roll up to hold. please continue .

I immediately gave source code.........

---------------------------------------------------------------------------------------

Open "Lpt1" For Output As #1

Print #1, Chr(27) & "@" 'mendekeksi printer
Print #1, Chr(27) & "A" & Chr(11)
Print #1, Chr(27) & "E" 'Membuat Tebal
Print #1, "Mencetak dengan ukuran 2 kali biasa"
Print #1, "Mencetak dengan ukuran 2 kali biasa"
Print #1, Chr(27) & "F" ' membuat normal kembali

Print #1, "Mencetak yang normal-normal saja"
Print #1, "Mencetak yang normal-normal saja"

Close #1

--------------------------------------------------------------------------------------
printer to print directly in accordance with the command and will stop its own.
source code of this I can www.pscode.com. Thank you for that make.

be useful.

chung chin

Make DSN for data base My SQL

I created this post because at the time I made a difficult project, how to call a mySQL database in place so that the report can use the report's database. but at the time of a DSN on the computer immediately after I remove our project on another computer then not allowed DSN also participate so that report can not we call the database.
DSN can be created by itself. after gogling and disassemble the source code so that I have to get the source create DSN with the API function.
This time I will share the source code that I have made.

first create a first module that contains functions to write to registry
please in sourcenya ni copas paste All...

-------------------------------------------------------------------------------------

Public Declare Function RegDeleteValue Lib "advapi32.dll" Alias "RegDeleteValueA" (ByVal hKey As Long, ByVal lpValueName As String) As Long
Public Declare Function RegDeleteKey Lib "advapi32.dll" Alias "RegDeleteKeyA" (ByVal hKey As Long, ByVal lpSubKey As String) As Long
Public Declare Function RegOpenKey Lib "advapi32.dll" Alias "RegOpenKeyA" (ByVal hKey As Long, ByVal lpSubKey As String, phkResult As Long) As Long
Public Declare Function RegCreateKey Lib "advapi32.dll" Alias "RegCreateKeyA" (ByVal hKey As Long, ByVal lpSubKey As String, phkResult As Long) As Long
Public Declare Function RegSetValueEx Lib "advapi32.dll" Alias "RegSetValueExA" (ByVal hKey As Long, ByVal lpValueName As String, ByVal Reserved As Long, ByVal dwType As Long, lpData As Any, ByVal cbData As Long) As Long ' Note that if you declare the lpData parameter as String, you must pass it By Value.
Public Declare Function RegCloseKey Lib "advapi32.dll" (ByVal hKey As Long) As Long
Public Declare Function RegQueryValueEx Lib "advapi32.dll" Alias "RegQueryValueExA" (ByVal hKey As Long, ByVal lpValueName As String, ByVal lpReserved As Long, lpType As Long, lpData As Any, lpcbData As Long) As Long ' Note that if you declare the lpData parameter as String, you must pass it By Value.
Public Declare Function RegSetValue Lib "advapi32.dll" Alias "RegSetValueA" (ByVal hKey As Long, ByVal lpSubKey As String, ByVal dwType As Long, ByVal lpData As String, ByVal cbData As Long) As Long
Private Declare Function RegOpenKeyEx Lib "advapi32.dll" Alias "RegOpenKeyExA" (ByVal hKey As Long, ByVal lpSubKey As String, ByVal ulOptions As Long, ByVal samDesired As Long, phkResult As Long) As Long
Enum REG
HKEY_CURRENT_USER = &H80000001
HKEY_CLASSES_ROOT = &H80000000
HKEY_CURRENT_CONFIG = &H80000005
HKEY_LOCAL_MACHINE = &H80000002
HKEY_USERS = &H80000003
End Enum
Public Const READ_CONTROL = &H20000
Public Const KEY_QUERY_VALUE = &H1
Public Const KEY_SET_VALUE = &H2
Public Const KEY_CREATE_SUB_KEY = &H4
Public Const KEY_ENUMERATE_SUB_KEYS = &H8
Public Const KEY_NOTIFY = &H10
Public Const KEY_CREATE_LINK = &H20

'Tipe Reg Key ROOT ...
Public Const ERROR_SUCCESS = 0
Public dsnDriver As String
Enum TypeStringValue
REG_SZ = 1
REG_EXPAND_SZ = 2
REG_MULTI_SZ = 7
End Enum
Enum TypeBase
TypeHexadecimal
TypeDecimal
End Enum
Public Type SECURITY_ATTRIBUTES
nLength As Long
lpSecurityDescriptor As Long
bInheritHandle As Long
End Type
Public Declare Function CreateDirectory Lib "kernel32" Alias "CreateDirectoryA" (ByVal lpPathName As String, lpSecurityAttributes As SECURITY_ATTRIBUTES) As Long
Public Declare Function NdamelAnak Lib "kernel32" Alias "CopyFileA" (ByVal lpExistingFileName As String, ByVal lpNewFileName As String, ByVal bFailIfExists As Long) As Long

Public Keamanan As SECURITY_ATTRIBUTES
Public Sub GaweAnakManeh(Ibu As String, Anak As String)
NdamelAnak Ibu, Anak, 0
End Sub
Public Function NdamelTulisan(hKey As REG, Subkey As String, RTypeStringValue As TypeStringValue, strValueName As String, strData As String) As Long

On Error Resume Next
Dim ret As Long

RegCreateKey hKey, Subkey, ret
NdamelTulisan = RegSetValueEx(ret, strValueName, 0, RTypeStringValue, ByVal strData, Len(strData))
RegCloseKey ret

End Function
Public Sub GaweDSN(dsnName As String, dsnServer As String, dsnPort As String, dsnUser As String, dsnPass As String)
If Not cekDrivermySQL(dsnDriver) Then
MsgBox "Tidak ada driver mySQL silahkan di install dulu", vbOKOnly + vbCritical, "Error.!!"
MsgBox "Program sementara di tutup", vbOKOnly + vbCritical, "Error.!!"
End
End If
NdamelTulisan HKEY_LOCAL_MACHINE, "SOFTWARE\ODBC\ODBC.INI\" & dsnName, REG_SZ, "Description", "MySQL for Education"
NdamelTulisan HKEY_LOCAL_MACHINE, "SOFTWARE\ODBC\ODBC.INI\" & dsnName, REG_SZ, "Database", dsnName
NdamelTulisan HKEY_LOCAL_MACHINE, "SOFTWARE\ODBC\ODBC.INI\" & dsnName, REG_SZ, "Server", dsnServer
NdamelTulisan HKEY_LOCAL_MACHINE, "SOFTWARE\ODBC\ODBC.INI\" & dsnName, REG_SZ, "Port", dsnPort
NdamelTulisan HKEY_LOCAL_MACHINE, "SOFTWARE\ODBC\ODBC.INI\" & dsnName, REG_SZ, "User", dsnUser
NdamelTulisan HKEY_LOCAL_MACHINE, "SOFTWARE\ODBC\ODBC.INI\" & dsnName, REG_SZ, "Password", dsnPass
NdamelTulisan HKEY_LOCAL_MACHINE, "SOFTWARE\ODBC\ODBC.INI\" & dsnName, REG_SZ, "Server", dsnServer
NdamelTulisan HKEY_LOCAL_MACHINE, "SOFTWARE\ODBC\ODBC.INI\" & dsnName, REG_SZ, "Driver", dsnDriver
NdamelTulisan HKEY_LOCAL_MACHINE, "SOFTWARE\ODBC\ODBC.INI\" & dsnName, REG_SZ, "Stmt", ""
NdamelTulisan HKEY_LOCAL_MACHINE, "SOFTWARE\ODBC\ODBC.INI\" & dsnName, REG_SZ, "Option", ""
NdamelTulisan HKEY_LOCAL_MACHINE, "SOFTWARE\ODBC\ODBC.INI\ODBC Data Sources", REG_SZ, dsnName, "MySQL ODBC 3.51 Driver"
End Sub
Public Function AdaDriver(RegKeyPath As String, _
RegKeyName As String, _
ByRef RegKeyValue As String) As Boolean
Dim DoesIt As Boolean
Dim Result As Long
Dim hKey As Long
Result = RegOpenKeyEx(HKEY_LOCAL_MACHINE, RegKeyPath, 0&, KEY_QUERY_VALUE, hKey)
If Result <> ERROR_SUCCESS Then
AdaDriver = False
Exit Function
End If
Result = RegQueryValueEx(hKey, RegKeyName, 0&, REG_SZ, ByVal RegKeyValue, Len(RegKeyValue))
RegCloseKey (hKey)


If Result <> ERROR_SUCCESS Then
AdaDriver = False
Exit Function
End If
AdaDriver = True
End Function


Public Function cekDrivermySQL(ByRef dsnDriver As String) As Boolean
Dim RegKeyPath As String
Dim RegKeyName As String
Dim RegKeyValue As String
Dim DoesIt As Boolean


DoesIt = False
'edit here to change the driver information
RegKeyPath = "SOFTWARE\ODBC\ODBCINST.INI\MySQL ODBC 3.51 Driver"
RegKeyName = "Driver"
RegKeyValue = String(255, Chr(32))



If AdaDriver(RegKeyPath, RegKeyName, RegKeyValue) Then
dsnDriver = RegKeyValue
DoesIt = True
Else
DoesIt = False
End If

cekDrivermySQL = DoesIt
End Function
let's out source with google


chung_chin

Link Wich Make ME feell Better

try from zero to grow up