To obtain high point of Google's software and transferred to the program?
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Data;
using System.Text;
using System.Windows.Forms;
using System.Runtime.InteropServices;
using EARTHLib;
using System.Threading;
namespace WindowsFormsApplication7
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
public delegate int EnumWindowsProc(IntPtr hwnd, int lParam);
[DllImport("user32", CharSet = CharSet.Auto)]
public extern static IntPtr GetParent(IntPtr hWnd);
[DllImport("user32", CharSet = CharSet.Auto)]
public extern static bool MoveWindow(IntPtr hWnd, int X, int Y, int nWidth, int nHeight, bool bRepaint);
[DllImport("user32", CharSet = CharSet.Auto)]
public extern static IntPtr SetParent(IntPtr hWndChild, IntPtr hWndNewParent);
private IntPtr GEHrender = (IntPtr)0;
private IntPtr GEParentHrender = (IntPtr)0;
public ApplicationGEClass googleEarth;
public void Unload()
{
if (GEParentHrender != (IntPtr)0)
SetParent(GEHrender, GEParentHrender);
}
private void Form1_Load(object sender, EventArgs e)
{
if (this.DesignMode == false)
{
googleEarth = new ApplicationGEClass();
GEHrender = (IntPtr)googleEarth.GetRenderHwnd();
GEParentHrender = GetParent(GEHrender);
MoveWindow(GEHrender, 0, 0, 800, this.Height, true);
SetParent(GEHrender, this.Handle);
}
}
private void timer1_Tick(object sender, EventArgs e)
{
textBox1.Text = "" + googleEarth.ViewExtents.East;
textBox2.Text = "" + googleEarth.ViewExtents.North;
textBox3.Text = "" + googleEarth.ViewExtents.South;
textBox5.Text = "" + googleEarth.ViewExtents.West;
}
North and South, East and West, and it just does not have the elev. Please help.