这是捕捉键盘热键,例如QQ写的一个抓屏功能,同时按下Ctrl+Alt+A 就会自动 跳出抓屏。
昌都网站建设公司成都创新互联公司,昌都网站设计制作,有大型网站制作公司丰富经验。已为昌都超过千家提供企业网站建设服务。企业网站搭建\成都外贸网站建设要多少钱,请找那个售后服务好的昌都做网站的公司定做!
也就是说上面这段代码自动获取到的热键符合Ctrl+Alt+A 的命令,所以才会执行事件。
If m.Msg = WM_SYSCOMMAND Then' 如果m 的热键码 有系统命令 执行以下事件。
先如下程序集
Imports System.Web.Script.Serialization
Function StringToObject(content As String) As Object
Dim jss As New JavaScriptSerializer()
Return jss.DeserializeObject(content)
End Function
Dim test1 As Dictionary(Of String, Object) = StringToObject("{
" Chr(34) "objects" Chr(34) ": {
" Chr(34) "minecraft/sounds/entity/rabbit/attack2.ogg" Chr(34) ": {
" Chr(34) "hash" Chr(34) ": " Chr(34) "4b90ff3a9b1486642bc0f15da0045d83a91df82e" Chr(34) ",
" Chr(34) "size" Chr(34) ": 7268
},
" Chr(34) "minecraft/sounds/entity/shulker/close5.ogg" Chr(34) ": {
" Chr(34) "hash" Chr(34) ": " Chr(34) "e555fcece121879fe0becbada9d01dea27ab153d" Chr(34) ",
" Chr(34) "size" Chr(34) ": 5376
},
" Chr(34) "minecraft/lang/ga_IE.lang" Chr(34) ": {
" Chr(34) "hash" Chr(34) ": " Chr(34) "a108f19142820b3573a658d40950ba3317b65c15" Chr(34) ",
" Chr(34) "size" Chr(34) ": 142847
},
" Chr(34) "minecraft/sounds/mob/horse/leather.ogg" Chr(34) ": {
" Chr(34) "hash" Chr(34) ": " Chr(34) "20abaa7d3b0baa105bc6023d5308f1e5d76acc41" Chr(34) ",
" Chr(34) "size" Chr(34) ": 11577
}}
}
")
Dim cc As Dictionary(Of String, Object) = DirectCast(test1.Values(0), Dictionary(Of String, Object))
Dim dd = cc.Values(0)("hash")
这样就可以遍历 hash值了
VB.NET是微软Visual Studio.NET中的一门语言,其中还有C#和J#等语言。它是通过.NET CLR (Common Language Runtime)来解析的,语法是基于传统的VB的。你可以简单地认为它是VB的升级版,呵呵~