put_EnableSplashScreen

Description

Sets whether the packed executable should display a splash screen when it starts.
When enabled, the splash screen image specified by put_SplashScreenPath is shown briefly before the main application window appears.

This feature is typically used to display branding, logos, or loading visuals during application startup.

Syntax

HRESULT put_EnableSplashScreen([in] VARIANT_BOOL bEnable);

Parameters

bEnable
Type: VARIANT_BOOL
[in] Pass VARIANT_TRUE to enable splash screen display at startup, or VARIANT_FALSE to disable it.

Return Value

Returns an HRESULT.

  • S_OK if the setting was successfully applied.
  • E_FAIL or another COM error code if an error occurred.

Example

CComPtr<IBxProject> project;
if (SUCCEEDED(BxPackerApi_CreateProject(&project))) {
    // Enable splash screen for the packed executable
    project->put_EnableSplashScreen(VARIANT_TRUE);
 
    // Optionally, set the splash screen image path
    project->put_SplashScreenPath(CComBSTR(L"C:\\Images\\startup_logo.png"));
}

Remarks

  • This property controls whether a splash screen appears but does not specify which image to use.
    To define the image, use put_SplashScreenPath.
  • The splash screen appears immediately when the packed application starts and disappears once the main window is ready.
  • Supported image formats include .bmp, .jpg, and .png.
  • Use get_EnableSplashScreen to check whether splash screen display is currently enabled.

See Also