资讯

精准传达 • 有效沟通

从品牌网站建设到网络营销策划,从策略到执行的一站式服务

c转vb.net c转vbnet 在线

C#代码转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

End If

End Sub

Private Sub timer1_Tick(sender As Object, e As EventArgs)

timer1.Enabled = False

axWindowsMediaPlayer1.Ctlcontrols.play()

End Sub

求把这句C语言翻译成VB.net

Public Overrides Sub VerifyRenderingInServerForm(control As Control)

'MyBase.VerifyRenderingInServerForm(control)

End Sub

请帮忙将以下C语言代码转换为VB.NET代码,谢谢!

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 y100 Then

y=y+2000

End If

If y1916 OrElse m200 Then

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

ye=CInt((m+t-2)/12+y)

[Me]=(m+t-2) Mod 12+1

Console.WriteLine(" {0}-{1} ~ {2}-{3}",y,m,ye,[Me])

ye=y

[Me]=m

For i=0 To t-1

prmonth(ye,[me])

[Me]=[Me]+1

If [Me]12 Then

ye=ye+1

[me]=1

End If

Next

Return 0

End Function

Function yam(y As Integer,m As Integer) As Integer

Dim st As String()={"未定义","一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月"}

Console.WriteLine(" {0} {1}",y,st(m))

Console.WriteLine("----------------------------")

Return 0

End Function

Function ryear(y As Integer) As Integer

If 0=y Mod 400 OrElse (0y Mod 100 AndAlso 0=y Mod 4) Then

Return 1

Else

Return 0

End If

End Function

Function mday(y As Integer,m As Integer) As Integer

Dim day As Integer()={0,31,28,31,30,31,30,31,31,30,31,30,31}

Dim ad As Integer=0

If 2=m Then

ad=ryear(y)

End If

Return day(m)+ad

End Function

Function monday(y As Integer,m As Integer) As Integer

Dim md As Integer=6

Dim i,daynum As Integer

For i=1916 To y-1

daynum=365+ryear(i)

md=(md+daynum) Mod 7

Next

For i=1 To m-1

md=(md+mday(y,i)) Mod 7

Next

Return md

End Function

Function prmonth(y As Integer,m As Integer) As Integer

Dim md As Integer=monday(y,m)

Dim daysnum As Integer=mday(y,m)

Dim days As Integer=daysnum+md

Dim i As Integer

yam(y,m)

Console.Write(" 日 一 二 三 四 五 六")

For i=0 To days-1

If 0=i Mod 7 Then

Console.WriteLine()

Console.WriteLine()

Console.Write(" ")

End If

If i-md=0 Then

Console.Write(" {0,2}",i-md+1)

Else

Console.Write(" ")

End If

Next

Console.WriteLine()

Console.WriteLine()

Return 0

End Function

End Module

C#代码能不能转换成VB.NET?

没有这样的软件

首先,语言代码需要编译器把它们转化为机器语言才能够让计算机识别

代码转换只有两种思路

1.C#编译器编译后(成为机器或汇编语言)再运用反编译技术转化为BASIC语言

2.程序员看懂了C#代码后再重新使用BASIC语言写出

如果把转换工作交给软件完成是非常危险的,因为不同语言之间理念不同,语句结构不同

BASIC语言不是结构化语言

而C语言是结构化语言

它们二者的差别其实非常大

应用上只能说各有所长

目前没有这样的软件可以实现这些转换,可能以后也不会有

C语言转换为VB.NET

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

200 Then

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

ye=CInt((m+t-2)/12+y)

[Me]=(m+t-2) Mod 12+1

End If

End Function

Function mday(y As Integer,m As Integer) As Integer

Dim day As Integer()={0,31,28,31,30,31,30,31,31,30,31,30,31}

Dim ad As I


本文题目:c转vb.net c转vbnet 在线
链接URL:http://cdkjz.cn/article/hepjhc.html
多年建站经验

多一份参考,总有益处

联系快上网,免费获得专属《策划方案》及报价

咨询相关问题或预约面谈,可以通过以下方式与我们联系

大客户专线   成都:13518219792   座机:028-86922220