Special character on html type :
Replace the left char with the right one
" "
' '
< <
> >
& &
Friday, July 30, 2010
Escape Characters
To get File Contents / read file on VB 6
When i develop some application, i need to read file contents. And this code will help you to create it.
Public Function GetFileContents(ByVal FullPath As String) As StringDim strContents As StringDim fso As FileSystemObjectDim ts As TextStreamSet fso = CreateObject("Scripting.FileSystemObject")strContents = ""If fso.FileExists(FullPath) ThenSet ts = fso.OpenTextFile(FullPath)Do Until ts.AtEndOfStreamstrContents = strContents + ts.ReadLine + vbCrLfLoopts.CloseEnd IfGetFileContents = strContentsEnd Function
Have a nice days.
Wednesday, July 28, 2010
Read XML file on Visual Basic 6
After that we must add some code on vb form, example :
Private Sub CheckConfigurationFiles()Dim strFileConf As StringDim fso As FileSystemObjectDim strFolSC As StringDim strFolDS As StringDim strAtoClose As StringDim strApp As StringstrFileConf = "SYNDER_BASIC_Con.xml"Set fso = CreateObject("Scripting.FileSystemObject")If fso.FileExists(App.Path & "\" & strFileConf) ThenDim objDOM As MSXML2.DOMDocument40 'Using reference microsoft XMLSet objDOM = New MSXML2.DOMDocument40objDOM.Load App.Path & "\" & strFileConf
'get data parameter, urutan dalam file xml berpengaruhstrFolSC = objDOM.childNodes(1).childNodes(0).nodeTypedValuestrFolDS = objDOM.childNodes(1).childNodes(1).nodeTypedValuestrAtoClose = objDOM.childNodes(1).childNodes(2).nodeTypedValuestrAppToRun = objDOM.childNodes(1).childNodes(3).nodeTypedValueEnd Sub
Have a nice code :D
To set Form Opacity on VB6 code
Setting transparan form dengan VB6.
It’s different from VB.Net that have form property “Opacity” from value 0 – 100 %.
For Visual basic 6 we must set from code behind like this :
1. Set new module (file .bas)
Private Declare Function GetWindowLongA Lib "user32" (ByVal hwnd As Long, ByVal nIndex As Long) As LongPrivate Declare Function SetWindowLongA Lib "user32" (ByVal hwnd As Long, ByVal nIndex As Long, ByVal dwNewLong As Long) As LongPrivate Declare Function SetLayeredWindowAttributes Lib "user32" (ByVal hwnd As Long, ByVal crey As Byte, ByVal bAlpha As Byte, ByVal dwFlags As Long) As LongPrivate Const GWL_EXSTYLE = (-20)Private Const WS_EX_LAYERED = &H80000Private Const LWA_ALPHA = &H2&Public Function Opacity(Value As Byte, Frm As Form)On Error GoTo ErrorHandlerDim MaxVal As Byte, MinVal As ByteMinVal = 20: MaxVal = 255If Value > MaxVal Then Value = MaxValIf Value < MinVal Then Value = MinValSetWindowLongA Frm.hwnd, GWL_EXSTYLE, GetWindowLongA(Frm.hwnd, GWL_EXSTYLE) Or WS_EX_LAYEREDSetLayeredWindowAttributes Frm.hwnd, 0, Value, LWA_ALPHAErrorHandler: Exit FunctionEnd Function
2. Set on form code when load (file .frm)
Private Sub Form_Load()Opacity 150, MeEnd Sub
Tuesday, July 27, 2010
Pengembangan kota Bekasi - Summarecon
Semoga dengan dibangunnya perumahan Summarecon di Bekasi, membuat Bekasi menjadi kota yang maju, baik iman dan fasilitasnya.
Transportasi yang membutuhkan penangganan - Metromini
Monday, July 26, 2010
Friday, July 23, 2010
20100723 Logs
Medical checkup on Paramita (Employee check)
Indonesia membutuhkan peraturan yang tegas, jelas dan konsisten dalam pengimplementasiannya.
Thursday, July 22, 2010
Hukum Tabur Tuai
Ingatlah hukum dasar ini, dalam kehidupanmu Barang siapa yang menanam, dia pula yang akan menuai
-
Today i learn about service problem, i had problem when my application access to the server, i got this information : ...
-
Didalam proses pengiriman barang / produk kita mengenal istilah “Franco”, seperti dijual jam tangan produk Singapore. Dan produk tersebut d...