要写一堆代码,红色代码,写到afterOpenProject即可
Dim typeForKeywords As Type = Type.[Gettype]("System.Windows.Forms.SendKeys+KeywordVk[], System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089")
Dim typeForKeywordItem As Type = Type.[Gettype]("System.Windows.Forms.SendKeys+KeywordVk, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089")
Dim objNewKey As Object = Activator.CreateInstance(typeForKeywordItem, "SPACE", &H20)
Dim typeForSendKeys As Type = Gettype(SendKeys)
Dim fieldForkeywords As System.Reflection.FieldInfo = typeForSendKeys.GetField("keywords", System.Reflection.BindingFlags.NonPublic Or System.Reflection.BindingFlags.GetField Or System.Reflection.BindingFlags.[Static])
Dim objKeys As Object = fieldForkeywords.GetValue(Nothing)
Dim typeForlistForKeyword As Type = Type.[Gettype]("System.Collections.Generic.List`1[[System.Windows.Forms.SendKeys+KeywordVk, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]], mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089")
Dim objForTmpKeyWords As Object = Activator.CreateInstance(typeForlistForKeyword)
Dim mi As System.Reflection.MethodInfo = typeForlistForKeyword.GetMethod("Add")
For Each var As Object In DirectCast(objKeys, Array)
'list.Add(var);
mi.Invoke(objForTmpKeyWords, New Object() {var})
Next
'list.Add(key);
mi.Invoke(objForTmpKeyWords, New Object() {objNewKey})
mi = typeForlistForKeyword.GetMethod("ToArray")
Dim objArray As Object = mi.Invoke(objForTmpKeyWords, Nothing)
fieldForkeywords.SetValue(Nothing, objArray)
SendKeys.Send("^{Space}")