先声明一个委托:
Public Delegate Function EnumChildProc(hwnd As Integer, iParam As Integer) As Integer
然后才能使用回调函数,回调函数的参数要和委托完全一致.
然后那个 API 函数需要这样声明:
有一个方法可以,就是麻烦些:
①把你的C#项目编译为dll或exe
这样做,肯定是可以的,只是麻烦.
需要用到FileGenerator插件.
如果还有问题,hi我.
=============
补充,实在不行就加我啊,帮你远程做一遍,你就会了啊.
Option Explicit On
Option Strict On
Imports System
Module Program
Sub Main()
Dim y,m,t As Integer
begin:
' 输入数据时一行一个
y=CInt(Console.ReadLine())
m=CInt(Console.ReadLine())
t=CInt(Console.ReadLine())
If y
Console.WriteLine("ERROR")
goto begin
End If
pr(y,m,t)
Console.Write("Press any key to continue . . . ")
Console.ReadKey(True)
End Sub
Function pr(y As Integer,m As Integer,t As Integer) As Integer
Dim ye,[Me],i As Integer
End Function
Function mday(y As Integer,m As Integer) As Integer
Dim ad As I
Dim?file1?As?FileStream
filename?=?"c:\temp\MyTest.txt"
file1?=?System.IO.File.OpenRead(filename)
Dim?CMGs?As?Long
Dim?DPBo?As?Long
Dim?i?As?Integer?=?0,?j?As?Integer
i?=?i?◆?1
s(j)?=?ChrW(GetData(j))
Next
If?s?=?"CMG="""?Then?CMGs?=?i
End?While
主要是vb.net取消了定长字符串, 所以用字节数组读入, 还得转成字符数组来比较.
Private?Sub?wmp_PlayStateChange(sender?As?Object,?e?As?AxWMPLib._WMPOCXEvents_PlayStateChangeEvent)
If?DirectCast(e.newState,?WMPLib.WMPPlayState)?=?WMPLib.WMPPlayState.wmppsReady?Then
wmp.Ctlcontrols.play()
End?If
End?Sub
Private?Sub?axWindowsMediaPlayer1_PlayStateChange(sender?As?Object,?e?As?AxWMPLib._WMPOCXEvents_PlayStateChangeEvent)
If?axWindowsMediaPlayer1.playState?=?WMPLib.WMPPlayState.wmppsMediaEnded?Then
Me.axWindowsMediaPlayer1.currentPlaylist.clear()
Me.axWindowsMediaPlayer1.currentPlaylist.appendItem(Me.axWindowsMediaPlayer1.newMedia("f:\b.wmv"))
axWindowsMediaPlayer1.settings.setMode("loop",?True)
timer1.Enabled?=?True
Private?Sub?timer1_Tick(sender?As?Object,?e?As?EventArgs)
timer1.Enabled?=?False
axWindowsMediaPlayer1.Ctlcontrols.play()
我们做过好几个升级的程序 有的不用改 有的简单修改 有的基本重写!~
以上就是土嘎嘎小编为大家整理的转为vb.net相关主题介绍,如果您觉得小编更新的文章只要能对粉丝们有用,就是我们最大的鼓励和动力,不要忘记讲本站分享给您身边的朋友哦!!