I did start a thread here but it is (i think) a totally different topic and shows my inexperience.
http://www.access-programmers.co.uk/forums/showthread.php?t=167295
I have a feeling I am getting further by using Google Earth itself.
The idea is to get just the earth part (Rendered) of the google earth program and put it on a form. I can do this but as I am not experience enough I am not getting any further. IMO all that I need is someone that can manipulate windows with the API.
Maybe someone here is interested in doing something like this. Of course the goal is that with this on a form I can feed it kml files based on peoples choices etc and intend to fly around these choices.
I was thinking the next steps would be to hide the rest of Google Earth and I thought I could do that with ShowWindowAsync.
Move my new rendered section on my form to where I want it.
Of course you will need to have google earth and then to reference googleearth.exe.
http://www.access-programmers.co.uk/forums/showthread.php?t=167295
I have a feeling I am getting further by using Google Earth itself.
The idea is to get just the earth part (Rendered) of the google earth program and put it on a form. I can do this but as I am not experience enough I am not getting any further. IMO all that I need is someone that can manipulate windows with the API.
Maybe someone here is interested in doing something like this. Of course the goal is that with this on a form I can feed it kml files based on peoples choices etc and intend to fly around these choices.
I was thinking the next steps would be to hide the rest of Google Earth and I thought I could do that with ShowWindowAsync.
Move my new rendered section on my form to where I want it.
Code:
Option Compare Database
Option Explicit
Private Declare Function ShowWindowAsync Lib "user32" ( _
ByVal hwnd As Long, _
ByVal nCmdShow As Long) _
As Boolean
Private Declare Function GetWindowPlacement Lib "user32" (ByVal hwnd As Long, lpwndpl As WINDOWPLACEMENT) As Long
Private Declare Function GetParent Lib "user32" (ByVal hwnd As Long) As Long
Private Declare Function MoveWindow Lib "user32" (ByVal hwnd As Long, ByVal x As Long, ByVal y As Long, ByVal nWidth As Long, ByVal nHeight As Long, ByVal bRepaint As Long) As Long
Private Declare Function SetParent Lib "user32" (ByVal hWndChild As Long, ByVal hWndNewParent As Long) As Long
Public GE_interface As Object
Public GE_interface_view As Object
Public GEParentHrender As Long
Public GE_main_window_handle As Long
Public GE_render_Window_handle As Long
Private Const SW_HIDE = 0
Private Const SW_SHOW = 5
Private Type POINTAPI
x As Integer
y As Integer
End Type
Private Type RECT
Left As Integer
Top As Integer
Right As Integer
Bottom As Integer
End Type
Private Type WINDOWPLACEMENT
Length As Integer
flags As Integer
showCmd As Integer
ptMinPosition As POINTAPI
ptMaxPosition As POINTAPI
rcNormalPosition As RECT
End Type
Private Sub Form_Load()
Dim bCmdShow As Boolean
bCmdShow = False
Set GE_interface = CreateObject("GoogleEarth.ApplicationGE")
Set GE_interface_view = CreateObject("GoogleEarth.CameraInfoGE")
'Loop forever...
Do
If GE_interface.IsInitialized Then Exit Do
Loop
GE_render_Window_handle = GE_interface.GetRenderHwnd
GE_main_window_handle = GE_interface.GetMainHwnd
GEParentHrender = GetParent(GE_render_Window_handle)
MoveWindow GE_render_Window_handle, 0, 0, 600, 400, True
SetParent GE_render_Window_handle, Me.hwnd
'ShowWindowAsync GE_main_window_handle, IIf(bCmdShow, SW_SHOW, SW_HIDE)
'ShowWindowAsync GE_render_Window_handle, SW_SHOW
End Sub