vb 中:=符号是什么意思?
比如这个:.Application.Selection.EndOfunit:=wdCharacter...
比如这个:.Application.Selection.EndOf unit:=wdCharacter
展开
展开全部
:=是VB中的可选参数,按名传递。我见过的都是在<属性>中给参数赋值用:=符号,比如这个MSDN中的例子
Visual Basic
Copy Code
' Declares a class member foreachstructure element.
< StructLayout( LayoutKind.Sequential, CharSet := CharSet.Auto )> _
PublicClass FindData
Public fileAttributes AsInteger = 0
' creationTime was a by-value FILETIME structure.
Public creationTime_lowDateTime AsInteger = 0
Public creationTime_highDateTime AsInteger = 0
' lastAccessTime was a by-value FILETIME structure.
Public lastAccessTime_lowDateTime AsInteger = 0
Public lastAccessTime_highDateTime AsInteger = 0
' lastWriteTime was a by-value FILETIME structure.
Public lastWriteTime_lowDateTime AsInteger = 0
Public lastWriteTime_highDateTime AsInteger = 0
Public nFileSizeHigh AsInteger = 0
Public nFileSizeLow AsInteger = 0
Public dwReserved0 AsInteger = 0
Public dwReserved1 AsInteger = 0
< MarshalAs( UnmanagedType.ByValTStr, SizeConst := 256 )> _
Public fileName AsString = Nothing
< MarshalAs( UnmanagedType.ByValTStr, SizeConst := 14 )> _
Public alternateFileName AsString = NothingEndClass 'FindData
PublicClass LibWrap
' Declares a managed prototype for the unmanaged function.
DeclareAutoFunction FindFirstFile Lib"Kernel32.dll" _
( ByVal fileName AsString, <[In], Out> ByVal findFileData As _
FindData ) As IntPtr
EndClass 'LibWrap
Visual Basic
Copy Code
' Declares a class member foreachstructure element.
< StructLayout( LayoutKind.Sequential, CharSet := CharSet.Auto )> _
PublicClass FindData
Public fileAttributes AsInteger = 0
' creationTime was a by-value FILETIME structure.
Public creationTime_lowDateTime AsInteger = 0
Public creationTime_highDateTime AsInteger = 0
' lastAccessTime was a by-value FILETIME structure.
Public lastAccessTime_lowDateTime AsInteger = 0
Public lastAccessTime_highDateTime AsInteger = 0
' lastWriteTime was a by-value FILETIME structure.
Public lastWriteTime_lowDateTime AsInteger = 0
Public lastWriteTime_highDateTime AsInteger = 0
Public nFileSizeHigh AsInteger = 0
Public nFileSizeLow AsInteger = 0
Public dwReserved0 AsInteger = 0
Public dwReserved1 AsInteger = 0
< MarshalAs( UnmanagedType.ByValTStr, SizeConst := 256 )> _
Public fileName AsString = Nothing
< MarshalAs( UnmanagedType.ByValTStr, SizeConst := 14 )> _
Public alternateFileName AsString = NothingEndClass 'FindData
PublicClass LibWrap
' Declares a managed prototype for the unmanaged function.
DeclareAutoFunction FindFirstFile Lib"Kernel32.dll" _
( ByVal fileName AsString, <[In], Out> ByVal findFileData As _
FindData ) As IntPtr
EndClass 'LibWrap
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
就是赋值。一般只出现在用VB操作WORD等软件的代码中
本回答被提问者采纳
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
VB中没有这个符号, 这个是Delphi的. 是赋值的意思
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
VBA中的代码了
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询