Click here to Skip to main content
15,898,588 members
Home / Discussions / Visual Basic
   

Visual Basic

 
QuestionNeed to copy the results of a msgbox Pin
beeker55336-May-09 14:05
beeker55336-May-09 14:05 
AnswerRe: Need to copy the results of a msgbox Pin
Mycroft Holmes6-May-09 14:28
professionalMycroft Holmes6-May-09 14:28 
GeneralRe: Need to copy the results of a msgbox Pin
beeker55336-May-09 14:37
beeker55336-May-09 14:37 
GeneralRe: Need to copy the results of a msgbox Pin
Luc Pattyn6-May-09 15:12
sitebuilderLuc Pattyn6-May-09 15:12 
GeneralRe: Need to copy the results of a msgbox Pin
beeker55336-May-09 17:18
beeker55336-May-09 17:18 
AnswerRe: Need to copy the results of a msgbox Pin
_Damian S_6-May-09 18:04
professional_Damian S_6-May-09 18:04 
GeneralRe: Need to copy the results of a msgbox Pin
beeker55337-May-09 5:59
beeker55337-May-09 5:59 
QuestionVB6 card game question Pin
ymilan6-May-09 9:57
ymilan6-May-09 9:57 
I'm writing a solitaire game and trying to drag and drop card images from an array of images to on top of another array of images on a form.   I'm stuck on trying to get the images dropped and MsgBoxes to work...I have them for test purposes.   Here is some of my code.   Note:   I tried to use .net, but since I'm such a newbie, I thought I'd stay with VB6 for this.   Not a school assignment.   A birthday present to someone.   sorry for bad format; just testing right now.

Private Sub Hearts_DragDrop(Index As Integer, Source As Control, X As Single, Y As Single)
      Dim HeartsIndex As Integer
      Dim NewIndex As Integer
      Dim Button As Integer
      HeartsIndex = 0
      Index = 0
      For HeartsIndex = 1 To 12 - 1
            For Index = 1 To 12 - 1
                  Hearts(HeartsIndex).Picture = Image1(Index).Picture
            If Button = vbLeftButton Then
                  If TypeOf Source Is Image Then
                        Hearts(HeartsIndex).Picture = Source.Picture
            End If
            End If
            Next
            Next
  
   NewIndex = 0
  
            For NewIndex = 0 To 12 - 1
                     If Hearts(NewIndex).Picture <> Image1(NewIndex).Picture Then
                        Image1(NewIndex).Drag vbCancel
                        MsgBox ("This card does not belong here")
                 
                       
                  Exit Sub
               Else
                              Image1(Index).Drag vbEndDrag
                              MsgBox ("You're right!")
                  Exit Sub
      End If
           
  

      Next
  
     
        
           
     
                             
           
                    
                             
           

End Sub
AnswerRe: VB6 card game question Pin
Mycroft Holmes6-May-09 14:26
professionalMycroft Holmes6-May-09 14:26 
AnswerRe: VB6 card game question Pin
riced6-May-09 22:32
riced6-May-09 22:32 
GeneralRe: VB6 card game question Pin
ymilan9-May-09 2:01
ymilan9-May-09 2:01 
GeneralRe: VB6 card game question Pin
riced10-May-09 2:17
riced10-May-09 2:17 
GeneralRe: VB6 card game question Pin
ymilan10-May-09 5:14
ymilan10-May-09 5:14 
GeneralRe: VB6 card game question Pin
ymilan9-May-09 3:01
ymilan9-May-09 3:01 
GeneralRe: VB6 card game question Pin
riced9-May-09 6:27
riced9-May-09 6:27 
GeneralRe: VB6 card game question Pin
ymilan10-May-09 5:14
ymilan10-May-09 5:14 
GeneralRe: VB6 card game question Pin
riced11-May-09 5:45
riced11-May-09 5:45 
GeneralRe: VB6 card game question Pin
ymilan15-May-09 11:27
ymilan15-May-09 11:27 
GeneralRe: VB6 card game question Pin
riced18-May-09 6:11
riced18-May-09 6:11 
GeneralRe: VB6 card game question Pin
ymilan18-May-09 9:22
ymilan18-May-09 9:22 
GeneralRe: VB6 card game question Pin
ymilan2-Jun-09 14:26
ymilan2-Jun-09 14:26 
GeneralRe: VB6 card game question Pin
riced3-Jun-09 4:42
riced3-Jun-09 4:42 
GeneralRe: VB6 card game question Pin
ymilan3-Jun-09 5:10
ymilan3-Jun-09 5:10 
GeneralRe: VB6 card game question Pin
ymilan3-Jun-09 6:28
ymilan3-Jun-09 6:28 
GeneralRe: VB6 card game question Pin
riced3-Jun-09 8:06
riced3-Jun-09 8:06 

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.