private void Form1_Load(object sender, EventArgs e) { if (this.DesignMode == false) { cam.FocusPointAltitudeMode = AltitudeModeGE.RelativeToGroundAltitudeGE; googleEarth = new ApplicationGEClass(); cam.Tilt = 35; cam.Azimuth = 0; numericUpDown1.Value = 250; cam.Range = (double)numericUpDown1.Value; } } private void InsertGoogleButton_Click(object sender, EventArgs e) { int ww, ll, x; ww = this.Width; ww = (int)(88 * ww / 100); ll = this.Height; ll = (int)(88 * ll / 100); InsertGoogleButton.Enabled = false; UpdateGoogleButton.Enabled = true; cam.FocusPointLatitude = Form1.Lat_1 + Form1.Lat_2 / 60 + Form1.Lat_3 / 3600; cam.FocusPointLongitude = Form1.Long_1 + Form1.Long_2 / 60 + Form1.Long_3/ 3600; cam.FocusPointAltitude = 150; //--------------------------------------- cam.Tilt = 35; textBox1.Text = cam.Tilt.ToString(); cam.Azimuth = 0;//stright north textBox2.Text = cam.Azimuth.ToString(); cam.Range = 250; numericUpDown1.Value = (decimal)cam.Range; //---------------------------- cam.FocusPointAltitudeMode = AltitudeModeGE.RelativeToGroundAltitudeGE; googleEarth = new ApplicationGEClass(); //Hwnd wnd=googleEarth.GetMainHwnd;// <---------- may be this one //wnd.setIconic;// <---------- syntax may may be like this //-------------------------------------- GEHrender = (IntPtr)googleEarth.GetRenderHwnd(); GEParentHrender = ClassGoogle.GetParent(GEHrender); ClassGoogle.MoveWindow(GEHrender, 0, 0, ww, ll, true); ClassGoogle.SetParent(GEHrender, this.Handle); googleEarth.SetCamera(cam, 0.25f); }
googleEarth
Control
Form
this.WindowState = FormWindowState.Minimized;
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)