Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /* ej20_DragDrop
- Ejemplo del uso del evento para hacer Arrastre */
- #include <radc++.h>
- //create new form
- Form form1("Arrastre algunos archivos y suelte - RAD C++ Ejemplo");
- //create form1's control procedure
- FormProcedure form1Proc(FormProcArgs) {
- ON_CLOSE() { //close applciation when form is closed
- Application.close();
- }
- ON_FILES_DROP() { //check if file(s) dropped on form
- //get dropped files list in variable droppedFiles
- StringList droppedFiles;
- getDroppedFiles( droppedFiles );
- //get total files dropped and assign to variable total
- Number total = droppedFiles.length;
- //combine file names with \r\n and assign to string 'files' to display on messagebox
- String files = droppedFiles.join("\r\n");
- //create new string 'title' for messagebox
- String title = "Total "+str(total)+" archivo(s) soltados en la forma";
- //display the message box now
- form1.msgBox(files,title);
- }
- return 0;
- }
- rad_main()
- //attach procedure 'form1Proc' with form1
- form1.procedure = form1Proc;
- rad_end()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement