我想在VB.Net项目中使用C#代码文件哪个是基于Windows的应用程序.但是那个C#类没有在VB.NET应用程序中使用.我该如何执行此任务.
谢谢
我想通过Windows应用程序发送短信.我运行了代码但是我收到了一个错误.这是
AT
OK AT+CMGF=1
OK AT+CSCA="+9460921985"
OK AT+CMGS="+9660775564"
this is new message
+CMS ERROR: 500
Run Code Online (Sandbox Code Playgroud)
我正在使用此代码.
Public Class Form2
Dim number As String = "+9660775564"
''# Dim message As String = TextBox1.Text
Dim serialport As New IO.Ports.SerialPort
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Try With serialport
.PortName = "COM5" ''# "COM24"
.BaudRate = "9600"
.Parity = IO.Ports.Parity.None
.DataBits = 8
.StopBits = IO.Ports.StopBits.One
.Handshake = IO.Ports.Handshake.RequestToSend
.DtrEnable = True .RtsEnable = True
End With …Run Code Online (Sandbox Code Playgroud)