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

創(chuàng)新互聯(lián)建站始終堅持【策劃先行,效果至上】的經(jīng)營理念,通過多達10年累計超上千家客戶的網(wǎng)站建設總結了一套系統(tǒng)有效的全網(wǎng)營銷推廣解決方案,現(xiàn)已廣泛運用于各行各業(yè)的客戶,其中包括:成都效果圖設計等企業(yè),備受客戶贊譽。
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
授人以耐顫野漁:
這洞清個網(wǎng)站超牛逼
Public?NotInheritable?Class?JSON
Private?Sub?New()
End?Sub
Public?Shared?Function?parse(Of?T)(jsonString?As?String)?As?T
Using?ms?=?New?MemoryStream(Encoding.UTF8.GetBytes(jsonString))
Return?DirectCast(New?DataContractJsonSerializer(GetType(T)).ReadObject(ms),?T)
搏饑裂????End?Using
End?Function
Public?Shared?Function?stringify(jsonObject?肢冊As?Object)?As?String
Using?ms?=?New?MemoryStream()
基閉????New?DataContractJsonSerializer(jsonObject.[GetType]()).WriteObject(ms,?jsonObject)
Return?Encoding.UTF8.GetString(ms.ToArray())
End?Using
End?Function
End?Class
這需要三個步驟:
第一步:創(chuàng)建一個C#項目,在其中添加相應的窗體和引用,將VB2008中相應窗體上的控件復制到C#相應的窗體上;
第二步:使用C#與VB.NET轉換工具軟件或者大和到“”,將VB2008 的代碼轉換成C#代碼。
第三步譽吵:工具軟件或者在線轉換,轉換后的代碼會有一些錯誤或者無法慶仿侍轉換的部分,進行簡單的人工修正。
OK,你成功了!
Option Explicit On
Option Strict On
Imports System
Module Program
Sub Main()
Dim y,m,t As Integer
begin:
' 輸入數(shù)據(jù)時一行一個
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點虐
+轉換 vbnet double轉int
網(wǎng)站鏈接:http://www.chinadenli.net/article46/ddpchhg.html
成都網(wǎng)站建設公司_創(chuàng)新互聯(lián),為您提供用戶體驗、小程序開發(fā)、網(wǎng)站內(nèi)鏈、面包屑導航、網(wǎng)站策劃、動態(tài)網(wǎng)站
聲明:本網(wǎng)站發(fā)布的內(nèi)容(圖片、視頻和文字)以用戶投稿、用戶轉載內(nèi)容為主,如果涉及侵權請盡快告知,我們將會在第一時間刪除。文章觀點不代表本網(wǎng)站立場,如需處理請聯(lián)系客服。電話:028-86922220;郵箱:631063699@qq.com。內(nèi)容未經(jīng)允許不得轉載,或轉載時需注明來源: 創(chuàng)新互聯(lián)