一、先決條件
- STK10.1.3及可二次開發(fā)的license
- VS2019
二、操作步驟
1、在Visual Studio2019中新建WinForm項(xiàng)目

新建項(xiàng)目
2、在工具箱中添加名為STK10的選項(xiàng)卡

添加STK10選項(xiàng)卡
3、在STK10選項(xiàng)卡中右鍵菜單->"選擇項(xiàng)",打開“選擇工具箱項(xiàng)”

選擇工具箱項(xiàng)
選中"AGI Globe Control 10"和"AGI Map Control10"兩項(xiàng),并點(diǎn)擊確定按鈕。
STK10選項(xiàng)卡中會(huì)出現(xiàn)三維和二維控件

正確添加控件
4、在Form1窗體中分別拖入三維控件和二維控件

Form1窗體中拖入控件
5、在Form1窗體的Load事件中,添加新建stk場(chǎng)景的代碼
this.axAgUiAx2DCntrl1.Application.ExecuteCommand("New / Scenario Test");

新建場(chǎng)景代碼
6、運(yùn)行程序,稍等片刻出現(xiàn)如下窗體,表明成功

運(yùn)行成功