# @ohos.app.ability.StartOptions (StartOptions) **StartOptions** is used as an input parameter of [startAbility()](js-apis-inner-application-uiAbilityContext.md#uiabilitycontextstartability-1) to specify the window mode of an ability. > **NOTE** > > - The initial APIs of this module are supported since API version 9. Newly added APIs will be marked with a superscript to indicate their earliest API version. > > - The APIs of this module can be used only in the stage model. ## Modules to Import ```ts import { StartOptions } from '@kit.AbilityKit'; ``` ## Properties **System capability**: SystemCapability.Ability.AbilityRuntime.Core | Name| Type| Read-only| Optional| Description| | -------- | -------- | -------- | -------- | -------- | | windowMode12+ | number | No| Yes| Window mode when the ability is started. For details, see [WindowMode](./js-apis-app-ability-abilityConstant.md#windowmode12).| | displayId | number | No| Yes| Display ID mode. The default value is **0**, indicating the current display.
**Atomic service API**: This API can be used in atomic services since API version 11.| | withAnimation11+ | boolean | No| Yes| Whether the ability has the animation effect.| | windowLeft11+ | number | No| Yes| Left position of the window.| | windowTop11+ | number | No| Yes| Top position of the window.| | windowWidth11+ | number | No| Yes| Width of the window.| | windowHeight11+ | number | No| Yes| Height of the window.| | processMode12+ | [contextConstant.ProcessMode](js-apis-app-ability-contextConstant.md#processmode12) | No| Yes| Process mode.
**Constraints**:
1. This property takes effect only on tablets.
2. This property takes effect only in [UIAbilityContext.startAbility](js-apis-inner-application-uiAbilityContext.md#uiabilitycontextstartability-1).
3. **processMode** and **startupVisibility** must be set in pair.| | startupVisibility12+ | [contextConstant.StartupVisibility](js-apis-app-ability-contextConstant.md#startupvisibility12) | Yes| No| Visibility of the ability after it is started.
**Constraints**:
1. This property takes effect only on tablets.
2. This property takes effect only in [UIAbilityContext.startAbility](js-apis-inner-application-uiAbilityContext.md#uiabilitycontextstartability-1).
3. **processMode** and **startupVisibility** must be set in pair.| | startWindowIcon14+ | [image.PixelMap](../../reference/apis-image-kit/js-apis-image.md#pixelmap7) | No| Yes| Icon displayed on the launch page when the UIAbility is started in an application. If this property is not set, the value of **startWindowIcon** in the **module.json5** file is used by default.
**Constraints**:
1. This property takes effect only on tablets and 2-in-1 devices.
2. This property takes effect only in [UIAbilityContext.startAbility](js-apis-inner-application-uiAbilityContext.md#uiabilitycontextstartability-1).
3. The maximum size of an image is 600 MB.| | startWindowBackgroundColor14+ | string | No| Yes| Background color of the launch page when the UIAbility is launched in an application. If this property is not set, the value of **startWindowBackground** in the **module.json5** file is used by default.
**Constraints**:
1. This property takes effect only on tablets and 2-in-1 devices.
2. This property takes effect only in [UIAbilityContext.startAbility](js-apis-inner-application-uiAbilityContext.md#uiabilitycontextstartability-1).| | supportWindowModes14+ | Array\<[bundleManager.SupportWindowMode](./js-apis-bundleManager.md#supportwindowmode)> | No| Yes| Whether to display the maximize, minimize, or split-screen button when the UIAbility is launched in an application. If this property is not set, the value of **supportWindowMode** in the **module.json5** file is used by default.
**Constraints**:
This property takes effect only on tablets and 2-in-1 devices.| **Example** ```ts import { UIAbility, Want, StartOptions, bundleManager } from '@kit.AbilityKit'; import { BusinessError } from '@kit.BasicServicesKit'; import { image } from '@kit.ImageKit'; export default class EntryAbility extends UIAbility { onForeground() { let want: Want = { deviceId: '', bundleName: 'com.example.myapplication', abilityName: 'EntryAbility' }; let color = new ArrayBuffer(0); let imagePixelMap: image.PixelMap; image.createPixelMap(color, { size: { height: 100, width: 100 } }).then((data) => { imagePixelMap = data; let options: StartOptions = { displayId: 0, startWindowIcon: imagePixelMap, startWindowBackgroundColor: '#00000000', supportWindowModes: [ bundleManager.SupportWindowMode.FULL_SCREEN, bundleManager.SupportWindowMode.SPLIT, bundleManager.SupportWindowMode.FLOATING ] }; try { this.context.startAbility(want, options, (err: BusinessError) => { if (err.code) { // Process service logic errors. console.error(`startAbility failed, code is ${err.code}, message is ${err.message}`); return; } // Carry out normal service processing. console.info('startAbility succeed'); }); } catch (err) { // Process input parameter errors. let code = (err as BusinessError).code; let message = (err as BusinessError).message; console.error(`startAbility failed, code is ${code}, message is ${message}`); } }).catch((err: BusinessError) => { console.error(`createPixelMap failed, code is ${err.code}, message is ${err.message}`); }); } } ```