請問一下
我要把下面程式改成在智慧裝置上可以使用
但我查到在智慧裝置開發上Unicode是不能使用的
那我要如何改
請線上的大大指教
謝謝
-------------------------------------------------------------------------------------
Imports System.Net
Imports System.Net.Sockets
Imports System.Threading
Imports System.Text
Imports System.Object
'Imports System.Text.Encoding
'Imports System.Text.UnicodeEncoding
'Imports System.Timers
Imports System.Configuration
Imports System.Configuration.Assemblies
Imports System.Collections.Specialized
Public Class Form1
Private uc As UdpClient
Private LocalPort As Integer
Private RemotePort As Integer
Private GroupAddress As IPAddress
Private remotEndPt As IPEndPoint
Private rT As Threading.Thread
Private bKeepRunning As Boolean = True
Private cKeepRunning As Boolean = True
Private stri_dus As String
Private str_dus As String
Private class_rb() As String
Private class_st() As String
Private ttl As Integer
Public encoding As UnicodeEncoding = New UnicodeEncoding
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Try
Dim namevalueCollection As NamevalueCollection
namevalueCollection = ConfigurationSettings.AppSettings
GroupAddress = IPAddress.Parse(namevalueCollection("GroupAddress"))
LocalPort = Int32.Parse(namevalueCollection("LocalPort"))
RemotePort = Int32.Parse(namevalueCollection("RemotePort"))
ttl = Int32.Parse(namevalueCollection("TTL"))
uc = New UdpClient(LocalPort)
remotEndPt = New IPEndPoint(GroupAddress, RemotePort)
rT = New Thread(AddressOf Receving)
rT.Start()
Catch
End Try
End Sub
Public Sub Receving()
Try
While bKeepRunning
Thread.Sleep(2000)
Dim data() As Byte = uc.Receive(remotEndPt)
Dim strData As String = encoding.Unicode.GetString(data, 0, data.Length)
TextBox1.Text = "接收電子折價券..."
ListBox1.Items.Add(strData)
End If
End While
Catch ex As Exception
End Try
End Sub




























































































