当前位置:网站首页>ArcEngine read raster flash back
ArcEngine read raster flash back
2022-04-22 14:24:00 【ShirmyMao】
If it's going on argis The secondary development was not carried out mapcontrol Control initialization , We often encounter inexplicable problems , For example, reading raster data and flashing back , Failed to create database , Layers with custom coordinate system or unknown coordinate system cannot be read , The solution is as follows :
cs
When the main program is initialized, add the following code :
private void Initial()
{
var win = new Window()
{
Content = new WindowsFormsHost() {
Child = new AxMapControl() },
WindowState = WindowState.Minimized
};
win.Loaded += (s, e) =>
{
var host = ((Window)s).Content as WindowsFormsHost;
host.Child.Dispose();
host.Dispose();
((Window)s).Close();
};
win.Show();
}
bs
stay Application_Start Call in function Initial() function
/// <summary>
/// Loading license and control initialization processing
/// </summary>
public static void Initial()
{
//arcgis to grant authorization
LoadLicense();
// initialization AxMapControl Control , Otherwise, the grid reading will flash back
Thread thread = new Thread(() =>
{
ShowWindow();
});
thread.SetApartmentState(ApartmentState.STA);
thread.Start();
}
private static void ShowWindow()
{
// Code to initialize the control
var win = new Window()
{
Content = new WindowsFormsHost() {
Child = new AxMapControl() },
WindowState = WindowState.Minimized
};
win.Loaded += (s, e) =>
{
var host = ((Window)s).Content as WindowsFormsHost;
host.Child.Dispose();
host.Dispose();
((Window)s).Close();
};
win.ShowDialog();
}
版权声明
本文为[ShirmyMao]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/04/202204221421351914.html
边栏推荐
- Codeforces Round #782 (Div. 2) D. Reverse Sort Sum
- TopK
- 2020 popular whole network series: This is a very suitable Android advanced - interview key and difficult data notes for collection and collection! Continuously update the high-quality interview links
- 系列解读 SMC-R (二):融合 TCP 与 RDMA 的 SMC-R 通信 | 龙蜥技术
- 运行npm install命令的时候会发生什么?
- Full solution of database SQL
- What happens when you run the NPM install command?
- 深入剖析volatile原理
- 双指针快慢指针||快乐数、寻找重复数202、287、|141、142、143、234、457
- 应用随机过程09:离散时间鞅
猜你喜欢

Deep understanding of condition

Mariadb互为主从(双主模式)配置

MapReduce高级应用——全排序和二次排序

@Resource与构造函数踩坑

Huawei cloud media Zha Yong: Huawei cloud's technical practice in the field of video AI transcoding

Why do I like to use flying items for task management

字节跳动的面试分享,为了拿下这个offer鬼知道我经历了什么

Understand C language -- string, escape character, comment

我为什么那么爱用飞项做任务管理
20道25K+Android工程师面试必问面试题,网易Android面试必问
随机推荐
spark代码 spark-submit提交yarn-cluster模式
3. Fiddler certificate installation and fetching hettps settings
Series interpretation of smc-r (II): smc-r communication technology integrating TCP and RDMA
Tencent build project image
字符串的反转练习 344、541、557、151
代码覆盖率之 sonar
ArcPy开发环境配置
Understand C language -- string, escape character, comment
链表 环形链表 链表判环 寻找入环节点141、142
运行npm install命令的时候会发生什么?
Binary Tree练习二叉树遍历递归257、100、222、101、226、437、563、617、572、543、|687
万元礼品奖池!玩转「Lighthouse」有奖征文来袭
asp.net framework配置swagger并支持上传文件
双指针快慢指针||快乐数、寻找重复数202、287、|141、142、143、234、457
ArcGIS面缝隙检查
TopK
Arcengine点,线,面,文本渲染
Apache IoTDB’s UDF源码分析(1)
Why do I like to use flying items for task management
深入理解Condition