public GlobeViewControl() { InitializeComponent(); requirements = new Requirements(); //Check if VE3D is installed Type veCheckType = Type.GetTypeFromProgID("Microsoft.SentinelVirtualEarth3DProxy.SentinelVE3DProxy"); if (veCheckType != null) { object veCheckObject = Activator.CreateInstance(veCheckType); object veVersion = veCheckType.InvokeMember("CurrentVersion", BindingFlags.GetProperty, null, veCheckObject, null); if (veVersion != null) { if (double.Parse(veVersion.ToString(), CultureInfo.InvariantCulture) > 4.0) { // create the control and set Forms properties. this.viewBase = new VirtualEarthViewBase(); this.viewBase.Name = "globeControl"; this.viewBase.TabIndex = 0; this.viewBase.SendToBack(); mainHost.Child = viewBase; this.loader = PlugInLoader.CreateLoader(this.viewBase.Host); this.viewBase.Host.RenderEngine.Initialized += EngineInitialized; } else { this.Content = requirements; } } } else { this.Content = requirements; } }