|
هذه هي الطريقة
you can include google earth in your application for that you have to follow the following steps.
1. Have to install google earth in your pc.
2. Add the reference for google earth from your project.
3. you have to extern the following functions from the users32.dll.
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;
4. Then you have to call the functions from the page load event.
if (this.DesignMode == false)
{
googleEarth = new ApplicationGEClass();
GEHrender = (IntPtr)googleEarth.GetRenderHwnd();
GEParentHrender = GetParent(GEHrender);
MoveWindow(GEHrender, 0, 0, this.Width, this.Height,true);
SetParent(GEHrender, this.Handle);
}
قرأتُ مجدَكِ في قلبي و في الكُتُـبِ شَـآمُ ، ما المجدُ؟ أنتِ المجدُ لم يَغِبِ
|