VB6的App对象,提供App.ExeName等众多的功能。现VB2010已升级到My名字空间My.Application, 用于提供当前应用程序的信息,包括标题,目录,版本号等。
因此,
1. 象原来的代码:
App.ExeName
在VB2010中就要写成,
My.Application.Info.AssemblyName
2. App.hInstance 则没有升级到My名字空间,单独为GetHInstance 函数,所以应该写成VB6.GetHInstance.ToInt32
ps: 后面加ToInt32的原因是因为变量的升级。请参考:
http://www.dingcrown.com/soft/htm/6/Log/?/ID/15.html (转载后为:
http://blog.csdn.net/happybasic/article/details/8186095)
3. App.Path 升级为:My.Application.Info.DirectoryPath