Dev Tip 1 : VSX - Customize Splash screen and Help -> About
This is the first post in a series of tips on Visual Studio Extensibility development and Visual Studio in general from Extensibility point of view. You might find better resources that explain these tips elsewhere on the web, and I want to provide links to those, so that this Tip list can act as a reference.
Tip: Add your product title and logo to the Splash screen and Help->About of Visual Studio, when developing VSX Package.
- Implement IVsInstalledProduct interface on the VSPackage class
- Provide bitmap logo as icon resource in the VSPackage.resx
- set the ‘useInterface’ parameter of the InstalledProductRegistration attribute to ‘true’; this attribute is on top of the VSPackage class
A sample code listing for the IVsInstalledProduct interface implementation
#region IVsInstalledProduct Members
//This interface members will provide splash screen,
// help->about related product information
//Thus InstalledProduct attribute on top of the
// VSPackage class has UseInterface set to true
public int IdBmpSplash(out uint pIdBmp)
{
pIdBmp = 402;
return VSConstants.S_OK;
}
public int IdIcoLogoForAboutbox(out uint pIdIco)
{
pIdIco = 402;
return VSConstants.S_OK;
}
///
/// Show both Product name and version on the splash screen
///
public int OfficialName(out string pbstrName)
{
pbstrName = GetResourceString("@110");
return VSConstants.S_OK;
}
public int ProductDetails(out string pbstrProductDetails)
{
pbstrProductDetails = GetResourceString("@112");
return VSConstants.S_OK;
}
///
/// ProductId is stored in the VsPackage.resx
/// Please change it everytime you change the release version
///
public int ProductID(out string pbstrPID)
{
// If we provide the version here, then we can't
// get the version on the splash screen,
// as VS only gets the splash screen product string
// from OfficialName method above
// So the version has been added to the resource 110
pbstrPID = GetResourceString("@125");
return VSConstants.S_OK;
}
///
/// Gets resource string from the VsPackage.resx resource file
///
public string GetResourceString(string resourceName)
{
string returnValue = String.Empty;
IVsResourceManager resourceManager =
(IVsResourceManager)this.GetService(typeof(SVsResourceManager));
if (null != resourceManager)
{
Guid packageGuid = this.GetType().GUID;
int hresult = resourceManager.LoadResourceString(ref packageGuid,
-1, resourceName, out returnValue);
}
return returnValue;
}
#endregion


