Mengenai fungsi VB6 untuk mengcompress CSS secara normal - Artikel di bawah ini kami beri judul fungsi css compress opsi normal. Apa yang dimaksud dengan css compress ini, bisa Anda lihat pada link disamping ini [css compress]. Nah, sekarang Anda faham mengenai apa tujuan, kegunaan dan mengapa kode css dikompres. Bagaimana implementasi kode css compress ini pada pemrograman Visual Basic 6.0? bisa Anda lihat kodenya di bawah.
Kode fungsi css compress opsi normal
READ MORE - VB6 Code - Fungsi CSS Compress Opsi Normal
Kode fungsi css compress opsi normal
Option ExplicitContoh penggunaan css compress opsi normal
Function CSSCompressNormal(sText As String) As String
Dim sTextCSS As String
Dim arrCSS() As String
Dim i As Integer
sTextCSS = sText
sTextCSS = Replace(sTextCSS, " ", "")
sTextCSS = Replace(sTextCSS, vbCrLf, "")
sTextCSS = Replace(sTextCSS, "}", "}" & vbCrLf)
sTextCSS = Replace(sTextCSS, "*/", "*/" & vbCrLf)
arrCSS = Split(sTextCSS, vbCrLf)
sTextCSS = ""
For i = LBound(arrCSS) To UBound(arrCSS)
If arrCSS(i) <> "" Then
sTextCSS = sTextCSS & arrCSS(i) & vbCrLf
End If
Next
CSSCompressNormal = sTextCSS
End Function
Private Sub Command1_Click()
Text1.Text = CSSCompressNormal(Text1.Text)
End Sub
Posted by Mesin Posting 1.0 Created by http://khoiriyyah.blogspot.com