Click here to Skip to main content
16,005,339 members
Home / Discussions / Visual Basic
   

Visual Basic

 
GeneralRe: Unrecognized database format Pin
Dave Kreskowiak2-May-09 16:23
mveDave Kreskowiak2-May-09 16:23 
GeneralRe: Unrecognized database format Pin
ivo751-May-09 10:20
ivo751-May-09 10:20 
GeneralRe: Unrecognized database format Pin
ivo751-May-09 10:25
ivo751-May-09 10:25 
AnswerRe: Unrecognized database format Pin
Mycroft Holmes30-Apr-09 17:42
professionalMycroft Holmes30-Apr-09 17:42 
GeneralRe: Unrecognized database format Pin
ivo7530-Apr-09 20:25
ivo7530-Apr-09 20:25 
QuestionNewbie trying to do Drag and Drop of Images Pin
ymilan30-Apr-09 6:21
ymilan30-Apr-09 6:21 
AnswerRe: Newbie trying to do Drag and Drop of Images Pin
Henry Minute30-Apr-09 8:01
Henry Minute30-Apr-09 8:01 
GeneralRe: Newbie trying to do Drag and Drop of Images Pin
ymilan1-May-09 4:23
ymilan1-May-09 4:23 
Thanks for the advice.   I didn't have the attribute AllowDrop set to True, so I changed it, but it didn't make a difference.   I still cannot get the images, image(0-51) on the left to move or even be selected.   I am trying different things, but here is the code and some edited out for testing purposes.

By the way, I formatted this with indentation, but when I post it, it comes up all the way to the left.   Any way I can change this?

Private Sub Image1_MouseDown(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles Image1.MouseDown
            Dim Index As Integer
            For Index = 0 To 51
                  Image1(Index).DoDragDrop(Image1(Index), DragDropEffects.Copy)
                  Image1(Index).DoDragDrop(Image1(Index), DragDropEffects.Move)
                  ' DoDragDrop(Image1(Index), DragDropEffects.Move)
            Next
      End Sub
      Private Sub _Image1_DragEnter(ByVal sender As Object, ByVal e As DragEventArgs) Handles Image1.DragEnter, Hearts.DragEnter, Clubs.DragEnter 'Diamonds.DragEnter, Spades.DragEnter
            Dim Index As Integer
            For Index = 0 To 51
                  Image1(Index).DoDragDrop(Image1(Index), DragDropEffects.Copy)
                  Image1(Index).DoDragDrop(Image1(Index), DragDropEffects.Move)
            Next




            ' Dim Index As Integer
            ' Index = 0
            ' For Index = 0 To 51
            ' If (e.Data.GetDataPresent(DataFormats.Bitmap)) Then
            ' e.Effect = DragDropEffects.Move
            ' End If
            ' Next
      End Sub
      Private Sub Image1_DragDrop(ByVal sender As Object, ByVal e As DragEventArgs) Handles Image1.DragDrop, Hearts.DragDrop, Clubs.DragEnter ' Diamonds.DragEnter, Spades.DragEnter
            Dim Button As Short
            Dim Index As Integer
            For Index = 0 To 51
                  If Button = VB6.MouseButtonConstants.LeftButton Then
                        Image1(Index).DoDragDrop(Image1(Index), DragDropEffects.Copy)
                        Image1(Index).DoDragDrop(Image1(Index), DragDropEffects.Move)

                        Hearts(12).Image = Image1(0).Image
                        Hearts(11).Image = Image1(1).Image
                        Hearts(10).Image = Image1(2).Image
                        Hearts(9).Image = Image1(3).Image
                        Hearts(8).Image = Image1(4).Image
                        Hearts(7).Image = Image1(5).Image
                        Hearts(6).Image = Image1(6).Image
                        Hearts(5).Image = Image1(7).Image
                        Hearts(4).Image = Image1(8).Image
                        Hearts(3).Image = Image1(9).Image
                        Hearts(2).Image = Image1(10).Image
                        Hearts(1).Image = Image1(11).Image
                        Hearts(0).Image = Image1(12).Image

                        Clubs(12).Image = Image1(25).Image
                        Clubs(11).Image = Image1(24).Image
                        Clubs(10).Image = Image1(23).Image
                        Clubs(9).Image = Image1(22).Image
                        Clubs(8).Image = Image1(21).Image
                        Clubs(7).Image = Image1(20).Image
                        Clubs(6).Image = Image1(19).Image
                        Clubs(5).Image = Image1(18).Image
                        Clubs(4).Image = Image1(17).Image
                        Clubs(3).Image = Image1(16).Image
                        Clubs(2).Image = Image1(15).Image
                        Clubs(1).Image = Image1(14).Image
                        Clubs(0).Image = Image1(13).Image

                        e.Effect = DragDropEffects.Link
                        Image1(Index).DoDragDrop(Image1(Index), DragDropEffects.Link)
                  Else : MsgBox("Test")
                  End If
            Next





           

            ' If e.Effect <> DragDropEffects.Link Then
            ' e.Effect = DragDropEffects.None
            ' MsgBox("This card does not belong here.")
GeneralRe: Newbie trying to do Drag and Drop of Images Pin
ymilan1-May-09 4:23
ymilan1-May-09 4:23 
GeneralRe: Newbie trying to do Drag and Drop of Images Pin
Henry Minute1-May-09 8:36
Henry Minute1-May-09 8:36 
Questionwhat's wrong in this code? Pin
rajulama30-Apr-09 3:36
rajulama30-Apr-09 3:36 
AnswerRe: what's wrong in this code? Pin
Jay Royall30-Apr-09 4:18
Jay Royall30-Apr-09 4:18 
AnswerRe: what's wrong in this code? Pin
Dave Kreskowiak30-Apr-09 13:52
mveDave Kreskowiak30-Apr-09 13:52 
GeneralRe: what's wrong in this code? Pin
Jeff Circeo1-May-09 3:17
Jeff Circeo1-May-09 3:17 
QuestionHow to Set Culture Info to a Datagridview Column? Pin
Paramu197330-Apr-09 3:01
Paramu197330-Apr-09 3:01 
AnswerRe: How to Set Culture Info to a Datagridview Column? Pin
Henry Minute30-Apr-09 8:44
Henry Minute30-Apr-09 8:44 
Questioncontent Pin
girikaimal30-Apr-09 2:43
girikaimal30-Apr-09 2:43 
AnswerRe: content Pin
dan!sh 30-Apr-09 2:46
professional dan!sh 30-Apr-09 2:46 
AnswerRe: content Pin
Christian Graus30-Apr-09 10:39
protectorChristian Graus30-Apr-09 10:39 
QuestionCalculating with Time Pin
Zaegra30-Apr-09 2:09
Zaegra30-Apr-09 2:09 
AnswerRe: Calculating with Time Pin
Luc Pattyn30-Apr-09 2:12
sitebuilderLuc Pattyn30-Apr-09 2:12 
AnswerRe: Calculating with Time Pin
Natza Mitzi30-Apr-09 9:58
Natza Mitzi30-Apr-09 9:58 
GeneralRe: Calculating with Time Pin
Henry Minute30-Apr-09 11:41
Henry Minute30-Apr-09 11:41 
GeneralRe: Calculating with Time Pin
Dave Kreskowiak30-Apr-09 13:49
mveDave Kreskowiak30-Apr-09 13:49 
GeneralRe: Calculating with Time Pin
Zaegra30-Apr-09 14:22
Zaegra30-Apr-09 14:22 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.