Results 1 to 13 of 13
  1. #1
    tetobolla's Avatar
    Join Date
    Jun 2012
    Gender
    male
    Location
    Why?!
    Posts
    155
    Reputation
    16
    Thanks
    533
    My Mood
    Aggressive

    NEED Help PLS !!! VB.NET- Drag & Dop Problem

    hey guys
    i'm making a listbox with drag and drop event but there is something,i wanna when i drop the file in the list box it opens an open dialog file and automatically choose the file from the path which appears in the listbox when i drop a file in it
    i knew hw to open the opendialogfile when i drop it but i don't know how let it automatically get the file from the path which appears in the listbox
    and thats the code which i use when drop to open "opendialogfile"
    Code:
            Dim s() As String = e.Data.GetData("FileDrop", False)
            Dim i As Integer
            For i = 0 To s.Length - 1
                listBox1.Items.Add(s(i))
            Next i
            openFileDialog1.Filter = "DLL (*.dll) |*.dll"
            openFileDialog1.ShowDialog()
    pls answer me QUICKLY
    as i think that this need an expert in VB.NET

    @Hassan
    Last edited by tetobolla; 07-23-2012 at 08:33 AM.
     
    لمؤاخذة
     

    Cry More Bitches
    There Is No Impossible

    أنا الحكومة يا ولاد المرة


    لا إله إلا الله محمد رسول الله
    There is no god but Allah, Mohamed is the messenger of Allah

     
    Facebook: https://www.facebook.com/ahmedshaaban00
    Twitter: https://www.twitter.com/ahmedshaaban00
    Yahoo!:just_teto
    Skype:just_teto
    MSN:mr.fast@hotmail.com


  2. #2
    DawgiiStylz's Avatar
    Join Date
    Aug 2009
    Gender
    male
    Location
    Dawg House
    Posts
    7,811
    Reputation
    219
    Thanks
    2,896
    My Mood
    Tired
    Code:
    Private Sub ListBox1_DragDrop(sender As Object, e As DragEventArgs) Handles ListBox1.DragDrop
            Dim Files As String() = CType(e.Data.GetData(DataFormats.FileDrop), String())
            For Each FileName As String In Files
                ListBox1.Items.Add(FileName)
            Next
        End Sub
    
        Private Sub ListBox1_DragEnter(sender As Object, e As DragEventArgs) Handles ListBox1.DragEnter
            If e.Data.GetDataPresent(DataFormats.FileDrop) Then
                e.Effect = DragDropEffects.Copy
            End If
        End Sub
    Should work. I think
    Quote Originally Posted by tetobolla View Post
    hey guys
    i'm making a listbox with drag and drop event but there is something,i wanna when i drop the file in the list box it opens an open dialog file and automatically choose the file from the path which appears in the listbox when i drop a file in it
    i knew hw to open the opendialogfile when i drop it but i don't know how let it automatically get the file from the path which appears in the listbox
    and thats the code which i use when drop to open "opendialogfile"
    Code:
            Dim s() As String = e.Data.GetData("FileDrop", False)
            Dim i As Integer
            For i = 0 To s.Length - 1
                listBox1.Items.Add(s(i))
            Next i
            openFileDialog1.Filter = "DLL (*.dll) |*.dll"
            openFileDialog1.ShowDialog()
    pls answer me QUICKLY
    as i think that this need an expert in VB.NET

    @Hassan

  3. #3
    tetobolla's Avatar
    Join Date
    Jun 2012
    Gender
    male
    Location
    Why?!
    Posts
    155
    Reputation
    16
    Thanks
    533
    My Mood
    Aggressive
    Quote Originally Posted by Dawgy Dawg View Post
    Code:
    Private Sub ListBox1_DragDrop(sender As Object, e As DragEventArgs) Handles ListBox1.DragDrop
            Dim Files As String() = CType(e.Data.GetData(DataFormats.FileDrop), String())
            For Each FileName As String In Files
                ListBox1.Items.Add(FileName)
            Next
        End Sub
    
        Private Sub ListBox1_DragEnter(sender As Object, e As DragEventArgs) Handles ListBox1.DragEnter
            If e.Data.GetDataPresent(DataFormats.FileDrop) Then
                e.Effect = DragDropEffects.Copy
            End If
        End Sub
    Should work. I think
    i already did this..i found it on msdn...i'll explain for u..i'm making an injector for Crossfire and i 've done this Drag and drop thing and it drops alright and show the path of the file in listbox but it doesn't inject the game unless if i used the browse button to open the"openfiledialog" so i want a code thats when i drop the file it opens the "openfiledialog" and choose the file which its path appears in listbox

    its a hard thing to do i know but this drag & drop thing will make the injector easier
     
    لمؤاخذة
     

    Cry More Bitches
    There Is No Impossible

    أنا الحكومة يا ولاد المرة


    لا إله إلا الله محمد رسول الله
    There is no god but Allah, Mohamed is the messenger of Allah

     
    Facebook: https://www.facebook.com/ahmedshaaban00
    Twitter: https://www.twitter.com/ahmedshaaban00
    Yahoo!:just_teto
    Skype:just_teto
    MSN:mr.fast@hotmail.com


  4. #4
    DawgiiStylz's Avatar
    Join Date
    Aug 2009
    Gender
    male
    Location
    Dawg House
    Posts
    7,811
    Reputation
    219
    Thanks
    2,896
    My Mood
    Tired
    So, whats the point of the drag and drop when you wanna use the open file dialog?

  5. #5
    tetobolla's Avatar
    Join Date
    Jun 2012
    Gender
    male
    Location
    Why?!
    Posts
    155
    Reputation
    16
    Thanks
    533
    My Mood
    Aggressive
    Quote Originally Posted by Dawgy Dawg View Post
    So, whats the point of the drag and drop when you wanna use the open file dialog?
    the whole form ,because i made a picture with"Drop Here" to make the injector more modern
     
    لمؤاخذة
     

    Cry More Bitches
    There Is No Impossible

    أنا الحكومة يا ولاد المرة


    لا إله إلا الله محمد رسول الله
    There is no god but Allah, Mohamed is the messenger of Allah

     
    Facebook: https://www.facebook.com/ahmedshaaban00
    Twitter: https://www.twitter.com/ahmedshaaban00
    Yahoo!:just_teto
    Skype:just_teto
    MSN:mr.fast@hotmail.com


  6. #6
    DawgiiStylz's Avatar
    Join Date
    Aug 2009
    Gender
    male
    Location
    Dawg House
    Posts
    7,811
    Reputation
    219
    Thanks
    2,896
    My Mood
    Tired
    Why are you trying to make an openfiledialog again?
    Quote Originally Posted by tetobolla View Post
    the whole form ,because i made a picture with"Drop Here" to make the injector more modern

  7. #7
    tetobolla's Avatar
    Join Date
    Jun 2012
    Gender
    male
    Location
    Why?!
    Posts
    155
    Reputation
    16
    Thanks
    533
    My Mood
    Aggressive
    Quote Originally Posted by Dawgy Dawg View Post
    Why are you trying to make an openfiledialog again?
    because when i drop the hack files in the injector it doesn't inject but when i use the openfiledialog throw Browse Button it injects successfully because it uses the openfiledialog
     
    لمؤاخذة
     

    Cry More Bitches
    There Is No Impossible

    أنا الحكومة يا ولاد المرة


    لا إله إلا الله محمد رسول الله
    There is no god but Allah, Mohamed is the messenger of Allah

     
    Facebook: https://www.facebook.com/ahmedshaaban00
    Twitter: https://www.twitter.com/ahmedshaaban00
    Yahoo!:just_teto
    Skype:just_teto
    MSN:mr.fast@hotmail.com


  8. #8
    DawgiiStylz's Avatar
    Join Date
    Aug 2009
    Gender
    male
    Location
    Dawg House
    Posts
    7,811
    Reputation
    219
    Thanks
    2,896
    My Mood
    Tired
    Then something in your code isn't working right. Is declarations linked in your click even where your drag and drop not doing?
    If its not there then the drag and drop is working. I'm guessing it should load the file location (Name, or full name)
    Quote Originally Posted by tetobolla View Post
    because when i drop the hack files in the injector it doesn't inject but when i use the openfiledialog throw Browse Button it injects successfully because it uses the openfiledialog

  9. #9
    tetobolla's Avatar
    Join Date
    Jun 2012
    Gender
    male
    Location
    Why?!
    Posts
    155
    Reputation
    16
    Thanks
    533
    My Mood
    Aggressive
    Quote Originally Posted by Dawgy Dawg View Post
    Then something in your code isn't working right. Is declarations linked in your click even where your drag and drop not doing?
    If its not there then the drag and drop is working. I'm guessing it should load the file location (Name, or full name)
    u mean in the drop code?
     
    لمؤاخذة
     

    Cry More Bitches
    There Is No Impossible

    أنا الحكومة يا ولاد المرة


    لا إله إلا الله محمد رسول الله
    There is no god but Allah, Mohamed is the messenger of Allah

     
    Facebook: https://www.facebook.com/ahmedshaaban00
    Twitter: https://www.twitter.com/ahmedshaaban00
    Yahoo!:just_teto
    Skype:just_teto
    MSN:mr.fast@hotmail.com


  10. #10
    DawgiiStylz's Avatar
    Join Date
    Aug 2009
    Gender
    male
    Location
    Dawg House
    Posts
    7,811
    Reputation
    219
    Thanks
    2,896
    My Mood
    Tired
    Yeah the drop code.

    It'll be a little more helpful if I saw your Browse button code and Drop code
    Quote Originally Posted by tetobolla View Post
    u mean in the drop code?

  11. #11
    tetobolla's Avatar
    Join Date
    Jun 2012
    Gender
    male
    Location
    Why?!
    Posts
    155
    Reputation
    16
    Thanks
    533
    My Mood
    Aggressive
    Private Sub Form1_DragDrop(sender As Object, e As System.Windows.Forms.DragEventArgs) Handles Me.DragDrop


    Dim s() As String = e.Data.GetData("FileDrop", False)
    Dim i As Integer
    For i = 0 To s.Length - 1
    listBox1.Items.Add(s(i))
    Next i
    End Sub

    Private Sub Form1_DragEnter(sender As Object, e As System.Windows.Forms.DragEventArgs) Handles Me.DragEnter
    If (e.Data.GetDataPresent(DataFormats.FileDrop)) Then
    e.Effect = DragDropEffects.All
    Else
    e.Effect = DragDropEffects.None
    End If
    End Sub

    this is the drag and drop code and wht do u mean with declarations ??
    @Dawgy Dawg

    ---------- Post added at 08:36 PM ---------- Previous post was at 07:57 PM ----------

    Quote Originally Posted by Dawgy Dawg View Post
    Yeah the drop code.

    It'll be a little more helpful if I saw your Browse button code and Drop code
    thats the Browse Button
    Code:
            openFileDialog1.Filter = "DLL (*.dll) |*.dll"
            openFileDialog1.ShowDialog()
    and thats the Drop Code
    Code:
      Private Sub Form1_DragDrop(sender As Object, e As System.Windows.Forms.DragEventArgs) Handles Me.DragDrop
    
    
            Dim s() As String = e.Data.GetData("FileDrop", False)
            Dim i As Integer
            For i = 0 To s.Length - 1
                listBox1.Items.Add(s(i))
            Next i
        End Sub
    
        Private Sub Form1_DragEnter(sender As Object, e As System.Windows.Forms.DragEventArgs) Handles Me.DragEnter
            If (e.Data.GetDataPresent(DataFormats.FileDrop)) Then
                e.Effect = DragDropEffects.All
            Else
                e.Effect = DragDropEffects.None
            End If
        End Sub
    and thats the OpenFileDialog Code
    Code:
     Private Sub openFileDialog1_FileOk(sender As System.Object, e As System.ComponentModel.CancelEventArgs) Handles openFileDialog1.FileOk
            Dim FileName As String = openFileDialog1.FileName.Substring(openFileDialog1.FileName.LastIndexOf("\"))
            Dim DllFileName As String = FileName.Replace("\", "")
            listBox1.Items.Add(DllFileName)
            dlls.Add(DllFileName, openFileDialog1.FileName)
        End Sub
    Last edited by tetobolla; 07-23-2012 at 12:04 PM.
     
    لمؤاخذة
     

    Cry More Bitches
    There Is No Impossible

    أنا الحكومة يا ولاد المرة


    لا إله إلا الله محمد رسول الله
    There is no god but Allah, Mohamed is the messenger of Allah

     
    Facebook: https://www.facebook.com/ahmedshaaban00
    Twitter: https://www.twitter.com/ahmedshaaban00
    Yahoo!:just_teto
    Skype:just_teto
    MSN:mr.fast@hotmail.com


  12. #12
    Pingo's Avatar
    Join Date
    Apr 2010
    Gender
    male
    Posts
    687
    Reputation
    24
    Thanks
    865
    My Mood
    Blah
    @tetobolla
    You would need to run your app as admin to inject into crossfire.
    Unless the dll has admin right, drag/drop doesnt work on vista/ win7 unless the file you're dragging has the same rights.
    It'l work on win xp though.

    Lets say by some off chance it does allow you to drag, you dont need openfiledialog.
    You're only injecting the path converted to array into your cave.
    If your injector isnt injecting like you say, id look at the code used to get your paths from the listbox.
    Im guessing something there is causing the problem.

  13. #13
    tetobolla's Avatar
    Join Date
    Jun 2012
    Gender
    male
    Location
    Why?!
    Posts
    155
    Reputation
    16
    Thanks
    533
    My Mood
    Aggressive
    Quote Originally Posted by Pingo View Post
    @tetobolla
    You would need to run your app as admin to inject into crossfire.
    Unless the dll has admin right, drag/drop doesnt work on vista/ win7 unless the file you're dragging has the same rights.
    It'l work on win xp though.

    Lets say by some off chance it does allow you to drag, you dont need openfiledialog.
    You're only injecting the path converted to array into your cave.
    If your injector isnt injecting like you say, id look at the code used to get your paths from the listbox.
    Im guessing something there is causing the problem.
    can i have ur msn to make it easier?
     
    لمؤاخذة
     

    Cry More Bitches
    There Is No Impossible

    أنا الحكومة يا ولاد المرة


    لا إله إلا الله محمد رسول الله
    There is no god but Allah, Mohamed is the messenger of Allah

     
    Facebook: https://www.facebook.com/ahmedshaaban00
    Twitter: https://www.twitter.com/ahmedshaaban00
    Yahoo!:just_teto
    Skype:just_teto
    MSN:mr.fast@hotmail.com


Similar Threads

  1. [Help Request] Need help pls
    By pk3d in forum Call of Duty Modern Warfare 3 Help
    Replies: 2
    Last Post: 04-25-2012, 09:02 PM
  2. Need help pls (sorry about last post didnt know how to edit so started a new one)
    By candylinjack2 in forum Alliance of Valiant Arms (AVA) Hacks & Cheats
    Replies: 15
    Last Post: 03-13-2010, 01:28 PM
  3. Need help pls PART 2
    By candylinjack2 in forum Alliance of Valiant Arms (AVA) Hacks & Cheats
    Replies: 3
    Last Post: 03-09-2010, 05:42 PM
  4. pls i need help pls pls pls i cant play !
    By foggi in forum CrossFire Hacks & Cheats
    Replies: 4
    Last Post: 10-14-2009, 10:24 AM
  5. About Warrock... Need help pls.
    By william1033 in forum WarRock - International Hacks
    Replies: 2
    Last Post: 06-25-2009, 12:04 PM