Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. Windows foms control in Web page. a simple problem when with web pages

Windows foms control in Web page. a simple problem when with web pages

Scheduled Pinned Locked Moved Web Development
helpquestion
9 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • R Offline
    R Offline
    ram1974
    wrote on last edited by
    #1

    Hi all, I am having a winodows forms control (windows control library) which is having a list view control on to which I will drag and drop the files and the control holds their names along with the path. It is working fine when I am executing it in VS2005. I am able to drag and drop single file or multiple files at a time. But, when I am embeding it into a web page using tab, I am able to drag drop only single file at a time, it is not allowing me to drag and drop multiple files at a single go. any body have any clue? my web page code: <object id="myName" classid="http:WindowsControlLibrary1.dll#WindowsControlLibrary1.UserControl1" height="870" width="1250" align="left" name="myCtrl" /> </object> my dll code is here: private void listView1_DragDrop(object sender, DragEventArgs e) { if(e.Data.GetDataPresent(System.Windows.Forms.DataFormats.FileDrop)) { string[] files =(string[])e.Data.GetData(System.Windows.Forms.DataFormats.FileDrop); try { foreach (string s in files) { listView1.Items.Add(s.ToString()); } } catch (System.Exception ex) { System.Windows.Forms.MessageBox.Show(ex.Message); return; } } } private void listView1_DragEnter(object sender, DragEventArgs e) { if (e.Data.GetDataPresent(System.Windows.Forms.DataFormats.FileDrop)) { string[] files = (string[])e.Data.GetData(System.Windows.Forms.DataFormats.FileDrop); foreach (string s in files) { e.Effect = System.Windows.Forms.DragDropEffects.Copy; } return; } else { e.Effect = System.Windows.Forms.DragDropEffects.None; } } private void listView1_DragOver(object sender, DragEventArgs e) { if (e.Data.GetDataPresent(System.Windows.Forms.DataFormats.FileDrop)) { string[] files = (string[])e.Data.GetData(System.Windows.Forms.DataFormats.FileDrop); foreach (string s in files) { e.Effect = System.Windows.Forms.DragDropEffects.Copy;

    M 1 Reply Last reply
    0
    • R ram1974

      Hi all, I am having a winodows forms control (windows control library) which is having a list view control on to which I will drag and drop the files and the control holds their names along with the path. It is working fine when I am executing it in VS2005. I am able to drag and drop single file or multiple files at a time. But, when I am embeding it into a web page using tab, I am able to drag drop only single file at a time, it is not allowing me to drag and drop multiple files at a single go. any body have any clue? my web page code: <object id="myName" classid="http:WindowsControlLibrary1.dll#WindowsControlLibrary1.UserControl1" height="870" width="1250" align="left" name="myCtrl" /> </object> my dll code is here: private void listView1_DragDrop(object sender, DragEventArgs e) { if(e.Data.GetDataPresent(System.Windows.Forms.DataFormats.FileDrop)) { string[] files =(string[])e.Data.GetData(System.Windows.Forms.DataFormats.FileDrop); try { foreach (string s in files) { listView1.Items.Add(s.ToString()); } } catch (System.Exception ex) { System.Windows.Forms.MessageBox.Show(ex.Message); return; } } } private void listView1_DragEnter(object sender, DragEventArgs e) { if (e.Data.GetDataPresent(System.Windows.Forms.DataFormats.FileDrop)) { string[] files = (string[])e.Data.GetData(System.Windows.Forms.DataFormats.FileDrop); foreach (string s in files) { e.Effect = System.Windows.Forms.DragDropEffects.Copy; } return; } else { e.Effect = System.Windows.Forms.DragDropEffects.None; } } private void listView1_DragOver(object sender, DragEventArgs e) { if (e.Data.GetDataPresent(System.Windows.Forms.DataFormats.FileDrop)) { string[] files = (string[])e.Data.GetData(System.Windows.Forms.DataFormats.FileDrop); foreach (string s in files) { e.Effect = System.Windows.Forms.DragDropEffects.Copy;

      M Offline
      M Offline
      Michael Sync
      wrote on last edited by
      #2

      It's better if you don't use any window control in webform.

      Thanks and Regards, Michael Sync ( Blog: http://michaelsync.net)

      R 1 Reply Last reply
      0
      • M Michael Sync

        It's better if you don't use any window control in webform.

        Thanks and Regards, Michael Sync ( Blog: http://michaelsync.net)

        R Offline
        R Offline
        ram1974
        wrote on last edited by
        #3

        Hi Michael, Then how do I get similar functionality? The web controls will not allow the drag and drop functionality so, how do I achieve it? -Ram

        M 1 Reply Last reply
        0
        • R ram1974

          Hi Michael, Then how do I get similar functionality? The web controls will not allow the drag and drop functionality so, how do I achieve it? -Ram

          M Offline
          M Offline
          Michael Sync
          wrote on last edited by
          #4

          ram1974 wrote:

          The web controls will not allow the drag and drop functionality

          You ca drag and drop the web control but your requirement is very strange. You want to drap and drop the file from Explore to the web page, right? Actually, it is not very good requirement for web application..

          Thanks and Regards, Michael Sync ( Blog: http://michaelsync.net)

          R 1 Reply Last reply
          0
          • M Michael Sync

            ram1974 wrote:

            The web controls will not allow the drag and drop functionality

            You ca drag and drop the web control but your requirement is very strange. You want to drap and drop the file from Explore to the web page, right? Actually, it is not very good requirement for web application..

            Thanks and Regards, Michael Sync ( Blog: http://michaelsync.net)

            R Offline
            R Offline
            ram1974
            wrote on last edited by
            #5

            Hi Michael, Yes you are right I want to drap and drop the file from Explore to the web page. Yes it may be a strange requirement. I tried my luck with web applications then later I thought to bet on mixing both the web applications and Windows, by using the windows control libarary inside the web page. When I am able to drag and drop a single file, it should allow me drag and drop multiple files also - am I right? But, it is not allowing me to drop multiple files. Am I mising something? Thank you Michael for your response..... -Ram.

            modified on Thursday, December 27, 2007 3:09:55 AM

            M 1 Reply Last reply
            0
            • R ram1974

              Hi Michael, Yes you are right I want to drap and drop the file from Explore to the web page. Yes it may be a strange requirement. I tried my luck with web applications then later I thought to bet on mixing both the web applications and Windows, by using the windows control libarary inside the web page. When I am able to drag and drop a single file, it should allow me drag and drop multiple files also - am I right? But, it is not allowing me to drop multiple files. Am I mising something? Thank you Michael for your response..... -Ram.

              modified on Thursday, December 27, 2007 3:09:55 AM

              M Offline
              M Offline
              Michael Sync
              wrote on last edited by
              #6

              I have seen that kinda features in some photos website.. but they used Flash for that.. Can you check this article? http://blog.vixiom.com/2007/06/29/merb-on-air-drag-and-drop-multiple-file-upload/[^] They said,

              That's it! test your AIR app by dragging some files from the file system, once you drop them the upload progress components show a visual representation of the files, click 'upload files' and the files are upload all at once (for real real not for play play this time).

              So, I think it is what you are looking for..

              Thanks and Regards, Michael Sync ( Blog: http://michaelsync.net)

              R 1 Reply Last reply
              0
              • M Michael Sync

                I have seen that kinda features in some photos website.. but they used Flash for that.. Can you check this article? http://blog.vixiom.com/2007/06/29/merb-on-air-drag-and-drop-multiple-file-upload/[^] They said,

                That's it! test your AIR app by dragging some files from the file system, once you drop them the upload progress components show a visual representation of the files, click 'upload files' and the files are upload all at once (for real real not for play play this time).

                So, I think it is what you are looking for..

                Thanks and Regards, Michael Sync ( Blog: http://michaelsync.net)

                R Offline
                R Offline
                ram1974
                wrote on last edited by
                #7

                Hi Michael, Thank you very much for your response. This is a kind of task I am looking at. But, I doubt my co., will allow me to use any third party S/w. Do, you think I can solve this problem in a any way? -Ram.

                M 1 Reply Last reply
                0
                • R ram1974

                  Hi Michael, Thank you very much for your response. This is a kind of task I am looking at. But, I doubt my co., will allow me to use any third party S/w. Do, you think I can solve this problem in a any way? -Ram.

                  M Offline
                  M Offline
                  Michael Sync
                  wrote on last edited by
                  #8

                  I think this is the Flex feature, right? not third-party control.... AFAIK, Flex is as same as Flash and Flex is open source one.

                  Thanks and Regards, Michael Sync ( Blog: http://michaelsync.net)

                  R 1 Reply Last reply
                  0
                  • M Michael Sync

                    I think this is the Flex feature, right? not third-party control.... AFAIK, Flex is as same as Flash and Flex is open source one.

                    Thanks and Regards, Michael Sync ( Blog: http://michaelsync.net)

                    R Offline
                    R Offline
                    ram1974
                    wrote on last edited by
                    #9

                    Hi Michael, Thanks you very much, I will give a try with Flex. Thanks a lot once again. -Ram.

                    1 Reply Last reply
                    0
                    Reply
                    • Reply as topic
                    Log in to reply
                    • Oldest to Newest
                    • Newest to Oldest
                    • Most Votes


                    • Login

                    • Don't have an account? Register

                    • Login or register to search.
                    • First post
                      Last post
                    0
                    • Categories
                    • Recent
                    • Tags
                    • Popular
                    • World
                    • Users
                    • Groups