private void Form2_Load(object sender, EventArgs e)
        {
            mi = new MapInfo.MapInfoApplication();
            int p = panel1.Handle.ToInt32();

            mi.Do("set next document parent " + p.ToString() + "style 1");
            mi.Do("set application window " + p.ToString());
            mi.Do("run application \"" + "C:/Users/mmhus/Desktop/dunya.wor" + "\"");

            mi.SetCallback(bilgiButonuD);
            mi.Do("create buttonpad \"a\" as toolbutton calling OLE \"bilgiSaglayaci\" id 2001");

            win_id = mi.Eval("frontwindow()");
        }
Beispiel #2
0
        private void Form1_Load(object sender, EventArgs e)
        {
            mi = new MapInfo.MapInfoApplication();
            //mi = Activator.CreateInstance(Type.GetTypeFromProgID("Mapinfo.Application")) as MapInfoApplication;
            int p = panel1.Handle.ToInt32();

            mi.Do("set next document parent " + p.ToString() + "style 1");
            mi.Do("set application window " + p.ToString());
            mi.Do("run application \"" + "d:/OLE7.wor" + "\"");
            mi.Do("Add Column \"Iller\" (tuketim Decimal (20, 3))From Elektrik_Uretim_Tuketim Set To Elektrik_Uretim Where COL2 = COL1  Dynamic");
            mi.Do("Add Column \"Iller\" (uretim Decimal (20, 3))From Elektrik_Uretim_Tuketim Set To Elektrik_Tuketim Where COL2 = COL1  Dynamic");
            mi.Do("Add Column \"Iller\" (kayip_kacak Decimal (20, 1))From Kayip_Kacak Set To Il_KK_Oran Where COL2 = COL1  Dynamic");
            mi.Do("Add Column \"Iller\" (gunes Decimal (20, 1))From Ortalama_Gunes_Suresi Set To Ortalama_Gunes_Suresi Where COL2 = COL1  Dynamic");
            mi.Do("Add Column \"Iller\" (uretim_tuketim_oran Float)From Elektrik_Uretim_Tuketim Set To Elektrik_Tuketim/Elektrik_Uretim Where COL2 = COL1  Dynamic");
            mi.Do("Add Column \"Iller\" (tuketim_uretim_oran Float)From Elektrik_Uretim_Tuketim Set To Elektrik_Uretim/Elektrik_Tuketim Where COL2 = COL1  Dynamic");
            mi.Do("Add Column \"Iller\" (bolge_kayip_kacak Decimal (20, 1))From Kayip_Kacak Set To Bolge_KK_Oran Where COL2 = COL1  Dynamic");
            mi.Do("Add Column \"Iller\" (kayip_kacak_enerji Decimal (20, 1))From Kayip_Kacak Set To Kayip_Kacak_Enerji Where COL2 = COL1  Dynamic");
            mi.Do("Add Column \"Iller\" (bolge_no Float)From Kayip_Kacak Set To Bolge_No Where COL2 = COL1  Dynamic");
            win_id = mi.Eval("frontwindow()");

            mi.SetCallback(callb);
            mi.Do("create buttonpad \"a\" as toolbutton calling OLE \"info\" id 2001");
        }