Start Navigation Window-in-Window Example


This sample demonstrates how to open Sygic navigation in an embedded view, i.e. in a window in window form. This examples chooses the graphical element Panel, which serves as the boundary for embedding the whole navigation. They key point here is calling the API function InitApi, in which we pass the handle of the Panel as a parent window, and parth to the navigation executable.


public void InitializationExample()
   // selecting Panel as embedding for navigation
   this.Embed_Width  = Panel.Width;
   this.Embed_Height = Panel.Height;
   this.Embed_Handle = Panel.Handle;

   Thread t = new Thread(StartSygic);

public static int StartSygic()
    string mySygicPath = @"sdcard\Drive\WindowsCE\Drive.exe";  // path to Sygic navigation executable
    int inLeft = 0;                   // X coordinate of Sygic application
    int inTop = 0;                    // Y coordinate of Sygic application
    int inWidth = this.Embed_Width;   // width of Sygic application
    int inHeight = this.Embed_Height; // height of Sygic application
    bool inRunForeground = true;      // true for running Sygic in foreground
    bool inNoCaption = false;         // true for removing the border of Sygic application window
    IntPtr inParentWnd = this.Embed_Handle;  // parent window definition

    CApplicationAPI.ApplicationHandler AppHnd = new CApplicationAPI.ApplicationHandler(NaviHandler);
    int ret = CApplicationAPI.InitApi(mySygicPath, AppHnd, inLeft, inTop, inWidth, inHeight, inRunInForeground, inNoCaption, inParentWnd);
    return ret;

public static void NaviHandler(int nEventID, IntPtr strData)
    // process navigation events if needed
Was this article helpful?
0 out of 0 found this helpful
Have more questions? Submit a request