Example #1
0
        public UIClass()
        {
            d1 = new OnDropCallBack(OnDrop);
            d2 = new OnDragLeaveCallBack(OnDragLeave);
            d3 = new OnDragOverCallBack(OnDragOver);
            d4 = new OnDragEnterCallBack(OnDragEnter);
            int       ww = 640, wh = 510;
            Rectangle rect = Lib.CenterWindow(ww, wh);

            ltf = new LTFrameNetClass("LTFrame-Canvas", "OLEDragDrop", IntPtr.Zero, Win32DataType.WS_POPUP | Win32DataType.WS_VISIBLE, rect.Left, rect.Top, ww, wh, IntPtr.Zero);
            ltf.BindUserFunction("DragWindow", DragWindowFun, 1);
            ltf.BindUserFunction("QuitApp", QuitAppFun, 0);
            ltf.BindUserFunction("MinWindow", MinWindowFun, 0);

            ltf.SetOnDropCallBack(d1);
            ltf.SetOnDragLeaveCallBack(d2);
            ltf.SetOnDragOverCallBack(d3);
            ltf.SetOnDragEnterCallBack(d4);


            ltf.loadFile(Lib.GetAppPath + @"./template/Drag2.html");
            ltf.EnableDragFrameChangeSize(false);
            ltf.MessageLoop();
        }