Click here to Skip to main content
15,899,679 members
Home / Discussions / Visual Basic
   

Visual Basic

 
QuestionProperty for user defined control Pin
jainga1021325-Apr-09 17:20
jainga1021325-Apr-09 17:20 
AnswerRe: Property for user defined control Pin
Dave Kreskowiak26-Apr-09 10:52
mveDave Kreskowiak26-Apr-09 10:52 
QuestionHow to find a file in a certain directory Pin
cjfusion25-Apr-09 9:28
cjfusion25-Apr-09 9:28 
AnswerRe: How to find a file in a certain directory Pin
Eslam Afifi25-Apr-09 12:35
Eslam Afifi25-Apr-09 12:35 
GeneralRe: How to find a file in a certain directory Pin
cjfusion25-Apr-09 13:21
cjfusion25-Apr-09 13:21 
GeneralRe: How to find a file in a certain directory Pin
Dave Kreskowiak26-Apr-09 10:51
mveDave Kreskowiak26-Apr-09 10:51 
GeneralRe: How to find a file in a certain directory Pin
cjfusion26-Apr-09 10:59
cjfusion26-Apr-09 10:59 
QuestionStumped on VB 6.0 LoadPicture function Pin
ymilan25-Apr-09 6:26
ymilan25-Apr-09 6:26 
I'm writing a solitaire game and want a specific card in a control array, let's say image1(12) which has a specific picture associated with it, to drop onto a specific position and take over the image of another control array, hearts(12). Here is my code; keep getting file not found. Just using one element in the array right now for testing.

Any help would be much appreciated. I'm a noob LOL.

Private Sub Hearts_DragDrop(Index As Integer, Source As Control, X As Single, Y As Single)
Hearts(12).Picture = Image1(12).Picture
Index = 0
For Index = 0 To 51
If TypeOf Source Is Image Then
Hearts(12).Picture = Source.Picture
LoadPicture Image1(12).Picture
'Load Hearts(Index).Picture.ubound + 1
Else: MsgBox ("Your chosen card does not belong here")
End If
Next

End Sub
Private Sub Clubs_DragDrop(Index As Integer, Source As Control, X As Single, Y As Single)
Index = 0
For Index = 0 To 51
If TypeOf Source Is Image Then
Clubs(Index).Picture = Source.Picture
End If
Next

End Sub
Private Sub Diamonds_DragDrop(Index As Integer, Source As Control, X As Single, Y As Single)
Index = 0
For Index = 0 To 51
If TypeOf Source Is Image Then
Diamonds(Index).Picture = Source.Picture
End If
Next

End Sub
Private Sub Spades_DragDrop(Index As Integer, Source As Control, X As Single, Y As Single)
Index = 0
For Index = 0 To 51
If TypeOf Source Is Image Then
Spades(Index).Picture = Source.Picture
End If
Next

End Sub
Private Sub Image1_MouseMove(Index As Integer, Button As Integer, Shift As Integer, X As Single, Y As Single)
For Index = 0 To 51
If Button = vbLeftButton Then
Image1(Index).Drag vbBeginDrag
End If
Next

End Sub
Private Sub Image1_MouseUp(Index As Integer, Button As Integer, Shift As Integer, X As Single, Y As Single)
For Index = 0 To 51
If Button = vbLeftButton Then
If Image1(Index).Picture = Hearts(Index).Picture Then
Image1(Index).Drag vbEndDrag
Else: GoTo 5
5 If Image1(Index).Picture = Clubs(Index).Picture Then
Image1(Index).Drag vbEndDrag
Else: GoTo 9
9 If Image1(Index).Picture = Diamonds(Index).Picture Then
Image1(Index).Drag vbEndDrag
Else: GoTo 12
12 If Image1(Index).Picture = Spades(Index).Picture Then
Image1(Index).Drag vbEndDrag
Else: MsgBox ("This card does not match the source card")
Image1(Index).Picture = Image1(Index).Picture
End If
End If
End If
End If
End If

Next

End Sub
AnswerRe: Stumped on VB 6.0 LoadPicture function Pin
Christian Graus25-Apr-09 11:31
protectorChristian Graus25-Apr-09 11:31 
GeneralRe: Stumped on VB 6.0 LoadPicture function Pin
ymilan25-Apr-09 12:35
ymilan25-Apr-09 12:35 
GeneralRe: Stumped on VB 6.0 LoadPicture function Pin
Christian Graus25-Apr-09 13:26
protectorChristian Graus25-Apr-09 13:26 
GeneralRe: Stumped on VB 6.0 LoadPicture function Pin
ymilan26-Apr-09 6:01
ymilan26-Apr-09 6:01 
GeneralRe: Stumped on VB 6.0 LoadPicture function Pin
Christian Graus26-Apr-09 11:35
protectorChristian Graus26-Apr-09 11:35 
GeneralRe: Stumped on VB 6.0 LoadPicture function Pin
ymilan27-Apr-09 12:56
ymilan27-Apr-09 12:56 
QuestionFade images in and out Pin
User 584223725-Apr-09 5:51
User 584223725-Apr-09 5:51 
AnswerRe: Fade images in and out Pin
LloydA11125-Apr-09 8:44
LloydA11125-Apr-09 8:44 
GeneralRe: Fade images in and out Pin
User 584223726-Apr-09 0:26
User 584223726-Apr-09 0:26 
QuestionDetermine how long a user has held down on a mouse button Pin
AndyASPVB25-Apr-09 4:21
AndyASPVB25-Apr-09 4:21 
AnswerRe: Determine how long a user has held down on a mouse button Pin
Luc Pattyn25-Apr-09 5:15
sitebuilderLuc Pattyn25-Apr-09 5:15 
GeneralRe: Determine how long a user has held down on a mouse button Pin
AndyASPVB25-Apr-09 10:42
AndyASPVB25-Apr-09 10:42 
GeneralRe: Determine how long a user has held down on a mouse button Pin
Dave Kreskowiak26-Apr-09 10:48
mveDave Kreskowiak26-Apr-09 10:48 
QuestionHow to change the "Validation Rule" property of a filed in a table using VBScript Pin
ADIDADPU25-Apr-09 1:18
ADIDADPU25-Apr-09 1:18 
QuestionDataGridView Refresh not Refreshing Pin
Paul McGann25-Apr-09 0:59
professionalPaul McGann25-Apr-09 0:59 
AnswerRe: DataGridView Refresh not Refreshing Pin
Eddy Vluggen25-Apr-09 3:29
professionalEddy Vluggen25-Apr-09 3:29 
Questionplz help me in finding thealgorithm or a program of circle hough transform in vb Pin
javeria khalid24-Apr-09 20:27
javeria khalid24-Apr-09 20:27 

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.