c转vb.net c转vbnet

C语言转换为VB.NET

Option Explicit On

巴中网站建设公司成都创新互联公司,巴中网站设计制作,有大型网站制作公司丰富经验。已为巴中1000多家提供企业网站建设服务。企业网站搭建\成都外贸网站建设公司要多少钱,请找那个售后服务好的巴中做网站的公司定做!

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# to vb.net 代码转换

System.Runtime.InteropServices.DllImport("user32.dll") _

Public Shared Function SetWindowLong(hWnd As IntPtr, nIndex As Integer, wndproc As Integer) As Integer

End Function

System.Runtime.InteropServices.DllImport("user32.dll") _

Public Shared Function GetWindowLong(hWnd As IntPtr, nIndex As Integer) As Integer

End Function

Public Const GWL_STYLE As Integer = -16

Public Const WS_DISABLED As Integer = H8000000

Public Shared Sub SetControlEnabled(c As Control, enabled As Boolean)

If enabled Then

SetWindowLong(c.Handle, GWL_STYLE, (Not WS_DISABLED) And GetWindowLong(c.Handle, GWL_STYLE))

Else

SetWindowLong(c.Handle, GWL_STYLE, WS_DISABLED + GetWindowLong(c.Handle, GWL_STYLE))

End If

End Sub

授人以渔:

这个网站超牛逼

C#转VB.NET高手帮忙!

Private Sub AddTab(sender As Object, ea As EventArgs)

Dim dh As IDesignerHost = DirectCast(GetService(GetType(IDesignerHost)), IDesignerHost)

If dh IsNot Nothing Then

Dim i As Integer = ytc.SelectedIndex

Dim name As String = GetNewTabName()

Dim ytp As YaTabPage = TryCast(dh.CreateComponent(GetType(YaTabPage), name), YaTabPage)

ytp.Text = name

ytc.Controls.Add(ytp)

ytc.SelectedTab = ytp

RaiseComponentChanging(TypeDescriptor.GetProperties(Control)("SelectedIndex"))

RaiseComponentChanged(TypeDescriptor.GetProperties(Control)("SelectedIndex"), i, ytc.SelectedIndex)

End If

End Sub

分享文章:c转vb.net c转vbnet
转载注明:https://www.cdcxhl.com/article30/dopspso.html

成都网站建设公司_创新互联,为您提供外贸网站建设面包屑导航网站导航企业建站Google

广告

声明:本网站发布的内容(图片、视频和文字)以用户投稿、用户转载内容为主,如果涉及侵权请尽快告知,我们将会在第一时间删除。文章观点不代表本网站立场,如需处理请联系客服。电话:028-86922220;邮箱:631063699@qq.com。内容未经允许不得转载,或转载时需注明来源: 创新互联

网站托管运营