Professional Documents
Culture Documents
خا s y p h o n f i l t e r ./0 /10 خا و
خا s y p h o n f i l t e r ./0 /10 خا و
m
Dim blank As String
blank = ""
:
.co
If Len(txt) = 0 Then ...
If txt = vbNullString Then ...
If txt = "" Then ... es
If txt = blank Then …
iti
,/YZ ,[ \ ,@]6^ .٢
pc
MsgBox y
Next
e ki
winPath = Environ$("windir")
١
,8/+ *ة7 اد/78^ i/\j^ .٤
Public Sub Delay(HowLong As Date)
TempTime = DateAdd("s", HowLong, Now)
While TempTime > Now
DoEvents
Wend
End Sub
kZاl
kZاl m T
m T +-
+- ,;*ا
,;*وق ا8ﺹ
وق8*ض ﺹ
*ضA`
A` ;ف
;ف
m
Private Sub Form_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
.co
SendKeys "{TAB}"
KeyAscii = 0
End If
End Sub
es
iti
رم7 ا,` زاوk5
ااx ل زر+7 لt- إ.٦
pc
Cancel = True
End Sub
1.
ng
Kill "c:\windows\desktop\vb\*.*"
e
th
٢
}يk- ا~ي,=`*t- وز8` اi/ د4[ لY:[ .٩
Public Declare Function GetWindowsDirectory _
Lib "kernel32" Alias "GetWindowsDirectoryA" _
(ByVal lpBuffer As String, ByVal nSize As Long) As Long
m
Public Function Clean(sString As String) As String
Dim nLength As Integer
.co
Dim nStart As Integer
Dim sOne As String
Dim sNoWay As String '
sNoWay = " ',-.()!_$*<>/\?;:=+" ' ا
وف ا
اد
If Not IsNull(sString) Then
es
nLength = Len(sString)
nStart = 1
iti
Do While nStart <= nLength
sOne = Mid(sString, nStart, 1)
If InStr(1, sNoWay, sOne, vbTextCompare) = 0 Then
pc
Loop
End If
1.
End Function
ng
٣
`د: /
و/- *ق7 ا,5*+ .١٢
m
Private Sub Form_Load()
MsgBox Str$(SHFileExists("c:\autoexec.bat"))
.co
End Sub
,;* ر5 ً ` \داA أ إذا١ A
* ا/5 ب,;إذا آن \داً ^* ر
٠ A
* ا/5 بes
ا*دي4ر إY أان اi`: آد.١٥
iti
Picture1.ScaleMode = vbPixels
pc
x = Picture1.ScaleWidth
y = Picture1.ScaleHeight
For i = 0 To y - 1
to
For j = 0 To x - 1
pixel = Picture1.Point(j, i)
red = pixel Mod 256
1.
Next
Picture1.ScaleMode = vbTwips
e
٤
mآ- 91 اk5 ` إدارج ار.١٧
Text1.text = Date
Text1.text = Time
m
.co
ديi- رةY ا.[= .٢٠
Picture2.PaintPicture Picture1.Picture, 0, 0, _
Picture1.Width, Picture1.Height, 0, Picture1.Height, _
Picture1.Width, -Picture1.Height, vbSrcCopy
es
iti
mآ- 91 اk5 ﺹ ا \د8 ا,t .٢١
pc
Printer.Print Text1.Text
to
Call DisableCtrlAltDelete(True)
\ر
Call DisableCtrlAltDelete(False)
٥
Form2 /رم و5 i/ :^ ¡ء.٢٣
Unload Form2
,; ر ر/ وEnter ح7 4[ ا¡ﻁ8 /+ ث0 i/¡ .٢٤
m
.co
TextBox اـk5 د: ﺹ ا8ف ا: .٢٦
Text1.Seltext = Clear es
6Z* ;*يA
رi + .٢٧
iti
a = InputBox("
ي# ا$%
"ا،"
ي# ا$%
)"اد'& ا
If a = "*+#" Then '
pc
MsgBox ",-,.
# ا/"آ
Else
MsgBox "12'
# ا/"آ
to
End If
/t1[5 k* ه1 ا, [آ
1.
ng
IF Button = 2 then
ki
IF Button = 1 then
MsgBox "
#5رة ا8ر ا9 :;<"?>ع ا
End if
MouseMove ث0 k5 اد
٦
,/
ر,; i + .٣٠
Label1.Caption = Time
.رم7 ا4 إTimer {أ-١
ون- [ﻩ+\ أي اCaption ,/ﺹT k5 ا \دة,- ا1رم وا7 ا4 إLabel {أ-٢
. A;أ
.١٠٠ , /=- * `[ Enterval ,/ﺹT i+\إ-٣
. * `[ -1أ{ اد ا-٤
Text1.FontBold = True
m
Text1.FontItalic = True
.co
mآ- 91 ا[ ت ا9:^ ﻁT i+6 .٣٣
Text1.FontUnderline = True
es
mآ- 91 اk5 * ن اﻁ//¡ .٣٤
iti
Text1.ForeColor = Color
pc
Text1.FontName = Andalus
`*^ اﻁ ايA; إ4 إAndalus *//¡^
ng
Picture1 = LoadPicture("C:\Picture.bmp")
e
¨ ﺹرة7:و
th
٧
kTرم ر5 i + .٣٧
GradientFill
رم7[ Resize ث0 k5 وها اد
m
Esc ح7 4[ ا¡ﻁ,t;ا- «Z* [*وج ا.٣٨
.co
Form1.KeyPreview = True
رم7[ Load i/ :ث ا0 k5 -1اد ا
If KeyAscii = 27 Then
End
es
End If
رم7[ KeyPress ث0 45 وها
iti
pc
With Text1
Text1.SelStart = 0
Text1.SelLength = Len(Text1)
Text1.SetFocus
End With
٨
ﻩ5 *ور ا وس8 Bold 4 إCommand Botton ﻁ اـT *//¡ .٤٢
End Sub
m
Private Declare Function FindExecutable Lib "shell32.dll" Alias
"FindExecutableA" (ByVal lpFile As String, ByVal lpDirectory As
String, ByVal lpResult As String) As Long
.co
Private Declare Function ShellExecute Lib "shell32.dll" Alias
"ShellExecuteA" (ByVal hwnd As Long, ByVal lpOperation As String,
ByVal lpFile As String, ByVal lpParameters As String, ByVal
lpDirectory As String, ByVal nShowCmd As Long) As Long
es
Private Const SW_SHOWNORMAL = 1
iti
$Dim sPath$, sFilename
pc
be on disk
ng
Close iFileNum
Kill App.Path & "\" & sRandFileName ' get rid of it now that we are
...done testing
Case 1 To 30
(.error (you could have some generic error message here as well '
MsgBox "Error Number: " & retFind
Exit Sub
٩
Case 31
".MsgBox "Unable to find Web Browser
Exit Sub
Case Is > 31
m
:errorhandler
If Dir(App.Path & sRandFileName) <> "" Then Kill App.Path & "\" &
.co
sRandFileName
MsgBox "An error has occured, please report this to you lowly
programmer" & vbCrLf & "Error Number: " & Err.Number & vbCrLf &
"Error description: " & Err.Description es
End Sub
Private Sub Form_Load() ' make the label look like a link
iti
Label2.ForeColor = &HFF0000
Label2.FontUnderline = True
End Sub
pc
&Label2.ForeColor = &HFFFF
End Sub
1.
&Label2.ForeColor = &HFF
End Sub
ki
Do
(where = InStr(cString, char
If where = 0 Then Exit Do
((cString = Mid$(cString, where + 1, Len(cString
Loop
ParseChar = cString
End Function
١٠
رم7 اiTط داtT A;* .٤٤
m
(ByVal bShow As Long) As Long
Generalت:`*Y اA1
k5 -1 اد ا
.co
*¬ ء ا7T
x = ShowCursor(False)
es
-1ﻩ اد ا- وCommand أ{ زر
*¬ ر ا
iti
x = ShowCursor(True)
pc
١١
ت ا ¬
ﻩ7[ [ ا6 ن,5*+ .٤٨
m
exe {[ أي7 .٥٠
.co
Shell ""
End Sub
ﺹ/Y8 ا4° /- {[ ر ا1
es
Form2 ا; ﻩ/رم و5 ر.٥١
iti
Form2.Show
pc
Form2.Hide
1.
KeyAscii = 0
End If
e
End Sub
th
ح اي7 ا, /
4 إ٣٢ , /=* ا//¡- وذ/^7 ا,0 *T} ح7 8 /t1^
ﻩ+8 `*^
١٢