HalilYanar Posted June 29, 2013 Share Posted June 29, 2013 (edited) Merhaba Arkadaşlar, Drag And Drop ile ilgili akıllarda soru işareti kalmaması için kendimce bir örnek yaptım. Bu örnekte resmi programa bırakınca program üzerinde resim gösteriliyor. Kodları yapıştırarak kullanıcak olanlar Plugins lerden Drag And Drop Pluginini seçmesi gerekir. .apz dosyasınıda indirebilirsiniz. Kasmaması için On Timerde olması gereken kodları On Mouse Move'ye Aldım. Onu kendinizde ayarlayabilirsiniz. On Show [Spoiler] hndle = Application.GetWndHandle() DragAndDrop.SetDataFormat(DataFormat.FileDrop); DragAndDrop.Start(hndle); hata = DragAndDrop.GetError(); if (hata == "") then else Dialog.Message("Hata", hata); end [/Spoiler] On Mouse Move [Spoiler] nFile = DragAndDrop.GetDataObject(); for i,v in pairs(nFile) do if (String.SplitPath(v).Extension == ".jpg") or (String.SplitPath(v).Extension == ".png") or (String.SplitPath(v).Extension == ".bmp") or (String.SplitPath(v).Extension == ".gif") or (String.SplitPath(v).Extension == ".jpeg") then Image.Load("Image1", v); else Dialog.Message("Hata!", "Sadece belirli formattaki dosyalar atılabilir.", MB_OK, MB_ICONEXCLAMATION, MB_DEFBUTTON1); end end [/Spoiler] .Apz : http://www.mediafire.com/?abd97jpgbuj7sa4 NOT : Resimdeki klavye benimdir :D Edited June 29, 2013 by HalilYanar Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.