السلام عليكم
- بالنسبة للسؤال الأول :
كود :
If IsNumeric(Trim$(Text1.Text)) = True Then
MsgBox "المحتوى رقما"
Else
MsgBox "المحتوى ليس رقما"
End If
- بالنسبة للسؤال الثاني . جرب هذا الكود . مع أني لم أستخدم هذه الأداة :
كود :
Private Sub command1_Click()
With Inet1
.URL = "http://ftp.kwikphp.com"
.Protocol = icFTP
.UserName = "My FTP username is here"
.Password = "My FTP password is here"
.RemoteHost = "ftp.kwikphp.com"
.RemotePort = 21
.Execute "ftp.kwikphp.com", "/htdocs/remmacs78/myfile.txt", "PUT", "C:\myfile.txt"
End With
End Sub
Private Sub Inet1_StateChanged(ByVal State As Integer)
Select Case State
Case icNone
LblStatus.Caption = "Connect Failed.... Error"
Case icResponseReceived
LblStatus.Caption = "Response Received"
Case ichostresolvinghost
LblStatus.Caption = "Looking for IP Address"
Case icHostResolved
LblStatus.Caption = "Found IP Address"
Case icConnecting
LblStatus.Caption = "Connecting"
Case icConnected
LblStatus.Caption = "Connected"
Case icRequesting
LblStatus.Caption = "Sending a Request"
Case icRequestSent
LblStatus.Caption = "Request Send Successfully"
Case icReceivingResponse
LblStatus.Caption = "Receiving Response"
Case icResponseReceived
LblStatus.Caption = "Response Received"
Case icDisconnecting
LblStatus.Caption = "Disconnecting"
Case icDisconnected
LblStatus.Caption = "Disconnected"
Case icError
MsgBox Inet1.ResponseCode & ":" & Inet1.ResponseInfo
LblStatus.Caption = "Error....!"
Case icResponseCompleted
LblStatus.Caption = "Response Completed"
End Select
If Inet1.StillExecuting = True Then
LblStillExecuting.Caption = "Still Executing"
Else
LblStillExecuting.Caption = "Execution Completed"
End If
End Sub
- تحياتي .
السلام عليكم
- أخي الكود الخاص بالأداة يعمل جيدا . هذا مثال بكيفية إستخدامه .
- تحياتي .
بارك الله فيك يا طيب وجزاك الله خير ان شاء الله في ميزان حسانتك
المثال يعمل جيدآ بارك الله فيك
VB_Coder كتب :السلام عليكم
- بالنسبة للسؤال الأول :
كود :
If IsNumeric(Trim$(Text1.Text)) = True Then
MsgBox "المحتوى رقما"
Else
MsgBox "المحتوى ليس رقما"
End If
- بالنسبة للسؤال الثاني . جرب هذا الكود . مع أني لم أستخدم هذه الأداة :
كود :
Private Sub command1_Click()
With Inet1
.URL = "http://ftp.kwikphp.com"
.Protocol = icFTP
.UserName = "My FTP username is here"
.Password = "My FTP password is here"
.RemoteHost = "ftp.kwikphp.com"
.RemotePort = 21
.Execute "ftp.kwikphp.com", "/htdocs/remmacs78/myfile.txt", "PUT", "C:\myfile.txt"
End With
End Sub
Private Sub Inet1_StateChanged(ByVal State As Integer)
Select Case State
Case icNone
LblStatus.Caption = "Connect Failed.... Error"
Case icResponseReceived
LblStatus.Caption = "Response Received"
Case ichostresolvinghost
LblStatus.Caption = "Looking for IP Address"
Case icHostResolved
LblStatus.Caption = "Found IP Address"
Case icConnecting
LblStatus.Caption = "Connecting"
Case icConnected
LblStatus.Caption = "Connected"
Case icRequesting
LblStatus.Caption = "Sending a Request"
Case icRequestSent
LblStatus.Caption = "Request Send Successfully"
Case icReceivingResponse
LblStatus.Caption = "Receiving Response"
Case icResponseReceived
LblStatus.Caption = "Response Received"
Case icDisconnecting
LblStatus.Caption = "Disconnecting"
Case icDisconnected
LblStatus.Caption = "Disconnected"
Case icError
MsgBox Inet1.ResponseCode & ":" & Inet1.ResponseInfo
LblStatus.Caption = "Error....!"
Case icResponseCompleted
LblStatus.Caption = "Response Completed"
End Select
If Inet1.StillExecuting = True Then
LblStillExecuting.Caption = "Still Executing"
Else
LblStillExecuting.Caption = "Execution Completed"
End If
End Sub
- تحياتي .
--------------------------------------------------------------------------
استاذي العزيز :VB_Coder
السلام عليكم ورحمة وبركاتة
كيف اشترط على المستخدم إدخال في text نص وليس رقماً ؟؟
نامل من اله ثم منكم الاجابة
والله يحفظكم ويرعاكم
لكم مني الف شكر وتقدير استاذي العزيز
على ما تقدمة لنا من دعم فني والله يحفظكم ويرعاكم