十年网站开发经验 + 多家企业客户 + 靠谱的建站团队
量身定制 + 运营维护+专业推广+无忧售后,网站问题一站解决
Public WM_DefineMessage As Long WM_DefineMessage = RegisterWindowMessage("Msg123") '引号里是自定义消息名字 PostMessage HWND_BROADCAST, WM_DefineMessage, 0, 0 '后面两戚搭个参数你可以自己指定数据,对应下面高逗拿函数指毁的wParam和lParam Function NotifyIconWindowProc(ByVal hwnd As Long, ByVal msg As Long, ByVal wParam As Long, ByVal lParam As Long) As Long
创新互联主营承留网站建设的网络公司,主营网站建设方案,成都App制作,承留h5微信小程序搭建,承留网站营销推广欢迎承留等地区企业咨询
'程序代码End Function
Private Declare Function SendMessage Lib "user32" Alias "SendMessageA" (ByVal hwnd As String, ByVal wMsg As Long, ByVal wParam As Long, ByVal lParam As String) As Long
改为姿告旅
Private Declare Function SendMessage Lib "user32"友孙 Alias "SendMessageA" (ByVal hwnd As String, ByVal wMsg As integer, ByVal wParam As integer , ByVal lParam As String) As integer
再试试,
可能你的声明使用vb6。迹凳0 复制过来的,long 全部改成integer
给你个蠢闷裤udp多播例带简子,广播不是很清楚,呵呵
Imports System.Net
Imports System.Net.Sockets
Imports System.Text
Public Class Form1
Inherits System.Windows.Forms.Form
Dim port As String
Dim ipadd As String
Dim ipend As IPEndPoint
Dim sendudp As New UdpClient()
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) _
Handles Button1.Click
Dim ipadress As IPAddress
ipadress = IPAddress.Parse(TextBox1.Text)
'sendport = Int32.Parse(TextBox2.Text)
'ipend = New IPEndPoint(ipadress, sendport)
Try
sendudp.JoinMulticastGroup(ipadress)
MessageBox.Show("启动完成!罩笑")
Catch ex As Exception
MessageBox.Show(ex.Message)
End Try
End Sub