07-07-22, 04:04 PM
السلام عليكم
ممكن مساعدة في قراءة ملف .txt اون لاين
https://dl.dropbox.com/s/k0yxsla1ixlvffv/Version.txt?dl=0
بحث Label1.text = version
لايوم تحديث البرنامج
else
يرجى تحديث البرنامج
Imports System.IO
Imports System.Text
Imports System.Net
Public Class Form1
Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
Dim address As String = "https://dl.dropboxusercontent.com/s/k0yxsla1ixlvffv/Version.txt?dl=0"
Dim client As WebClient = New WebClient()
Dim reply As String = client.DownloadString(address)
TextBox1.Text = reply
End Sub
End Class
Imports System.Net
Public Class Form1
Dim WithEvents wc As New WebClient
Private Sub Form1_Load(sender As System.Object, e As System.EventArgs) Handles MyBase.Load
'ServicePointManager.Expect100Continue = True
ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls12
Try
wc.DownloadStringAsync(New Uri("https://dl.dropboxusercontent.com/s/k0yxsla1ixlvffv/Version.txt?dl=0"))
Catch ex As Exception
Label1.Text = ex.Message.ToString
End Try
End Sub
Private Sub wc_DownloadStringCompleted(sender As Object, e As System.Net.DownloadStringCompletedEventArgs) Handles wc.DownloadStringCompleted
Try
Label1.Text = e.Result
Catch ex As Exception
Label1.Text = ex.Message.ToString
End Try
End Sub
End ClassImports System.Net
Public Class Form1
Dim WithEvents wc As New WebClient
Private Sub Form1_Load(sender As System.Object, e As System.EventArgs) Handles MyBase.Load
'ServicePointManager.Expect100Continue = True
ServicePointManager.SecurityProtocol = CType(3072, SecurityProtocolType)
Try
wc.DownloadStringAsync(New Uri("https://dl.dropboxusercontent.com/s/k0yxsla1ixlvffv/Version.txt?dl=0"))
Catch ex As Exception
Label1.Text = ex.Message.ToString
End Try
End Sub
Private Sub wc_DownloadStringCompleted(sender As Object, e As System.Net.DownloadStringCompletedEventArgs) Handles wc.DownloadStringCompleted
Try
Label1.Text = e.Result
Catch ex As Exception
Label1.Text = ex.Message.ToString
End Try
End Sub