DoEvents
System.windows.Forms.Application.DoEvents()
Command1.Backcolor = vbRed
Command1.Backcolor = System.Drawing.color.Red
Command1.Backcolor = System.Drawing.color.FromARGB(&H80C0FF)
ComboBox1.AddItem "one"
ComboBox1.Items.Add("one")
Command1.Backcolor = &H80C0FF
Command1.Backcolor = System.Drawing.colorTranslator.Fromole(&H80C0FF&)
Form1.Caption = "Sample"
Form1.DefInstance.Text = "Sample"
Form1.top
Form1.DefInstance.top
MsgBox "message",vbinformation,"Title"
MsgBox("message",MsgBoxStyle.information,"Title")
Form1.Height = 3500
Form1.DefInstance.Height = VB6.TwipstopixelsY(3500)
Set MyObject = Command1
MyObject = Command1
Text1.SetFocus
Text1.Focus()
Command1.tooltipText = "click me"
tooltip1.Settooltip(Command1,"click me")
Dim objAbout As AboutForm
Dim objAbout As Pharfruminsain_AboutForm_v1r0.AboutForm
sPath = App.Path
sPath = Application.StartupPath
Private Sub Form_Unload(Cancel As Integer)
Private Sub Form1_Closed(....) Handles MyBase.Closed
List1.RemoveItem (0)
ListBox1.Items.Remove(0)
Dim arOne(10) As String
Dim arOne As New ArrayList(10)
Print #1,"sample text"
Printline(1,"sample text")
Open "c:\myfile.txt" For input As #1
fileOpen(1,"c:\myfile.txt",OpenMode.input)
line input #1,stemp
stemp = lineinput(1)
VB6:
s=App.Comments
VB.Net:
imports System.Diagnostics
imports System.Reflection
s=FiLeversionInfo.GetVersionInfo([Assembly].GetExecutingAssembly.Location).Comments
VB6:
s=App.Companyname
VB.Net:
imports System.Diagnostics
imports System.Reflection
s=FiLeversionInfo.GetVersionInfo([Assembly].GetExecutingAssembly.Location).Companyname)
VB6:
s=App.EXEname
VB.Net:
imports System.Reflection
With New System.IO.fileInfo([Assembly].GetExecutingAssembly.Location)
s=.name.Substring(0,.name.Length - .Extension.Length)
End With
or
s=System.AppDomain.CurrentDomain.FrIEndlyname
Note: this includes the extension which would need to be parsed.
VB6:
s=App.fileDescription
VB.Net:
imports System.Diagnostics
imports System.Reflection
s=FiLeversionInfo.GetVersionInfo([Assembly].GetExecutingAssembly.Location).fileDescription)
VB6:
App.Helpfile
VB.Net:
No direct replacement
VB6:
i=App.hInstance
VB.Net:
imports System.Runtime.InteropServices
i=Marshal.GetHINSTANCE([Assembly].GetExecutingAssembly.GetModules()(0)).ToInt32
VB6:
s=App.Legalcopyright
VB.Net:
imports System.Diagnostics
imports System.Reflection
s=FiLeversionInfo.GetVersionInfo([Assembly].GetExecutingAssembly.Location).Legalcopyright)
VB6:
s=App.LegalTrademarks
VB.Net:
imports System.Diagnostics
imports System.Reflection
s=FiLeversionInfo.GetVersionInfo([Assembly].GetExecutingAssembly.Location).LegalTrademarks)
VB6:
App.LogMode
App.LogPath
VB.Net:
No direct replacement; see the EventLog object
VB6:
i=App.Major
VB.Net:
imports System.Diagnostics
imports System.Reflection
i=FiLeversionInfo.GetVersionInfo([Assembly].GetExecutingAssembly.Location).fileMajorPart)
VB6:
i=App.Minor
VB.Net:
imports System.Diagnostics
imports System.Reflection
i=FiLeversionInfo.GetVersionInfo([Assembly].GetExecutingAssembly.Location).fileMinorPart)
VB6:
App.NonModalAllowed
VB.Net:
No replacement
VB6:
App.oleRequestPendingMsgText
App.oleRequestPendingMsgTitle
App.oleRequestPendingTimeout
App.oleServerBusyMsgText
App.oleServerBusyMsgTitle
App.oleServerBusyraiseerror
App.oleServerBusyTimeout
VB.Net:
No replacement; olE automation not supported
VB6:
s=App.Path
VB.Net:
s=System.windows.Forms.Application.StartupPath
or
imports System.Reflecti
VB6:
command1.value=True
VB.net:
1、在自定义过程中:@R_404_5554@1_Click(nothing,nothing)
2、在事件过程中:@R_404_5554@1_Click(sender,e)
总结以上是内存溢出为你收集整理的*、VB.net 和 VB6 在一些方法上的转换技巧全部内容,希望文章能够帮你解决*、VB.net 和 VB6 在一些方法上的转换技巧所遇到的程序开发问题。
如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)