|
Thanks for the advice.
I tried something like the following, but when I tried placing the Next, Next lines just below the 'Hearts(Index).Tag = Source.Tag, the compiler gave me an error 340, array element 13 does not exist. It doesn't when I place the Next's at the end. However, what happens at run time is the You're right always happens, and then the card I choose from the left (can be any card), would always appear on the right hand side in hearts(0) slot. I'm confused but think that since Index and NewIndex are set to 0, they will always match and always do vbenddrag, not vbcancel. Any ideas would be much appreciated. Thank you.
'For Index = 0 To 12
'For NewIndex = 0 To 12
'Hearts(Index).Picture = Source.Picture
'Hearts(Index).Tag = Source.Tag
'If Hearts(Index).Tag = Image1(NewIndex).Tag Then
'Image1(NewIndex).Drag vbEndDrag
'MsgBox ("You're right!")
'Exit Sub
'Else
'Image1(NewIndex).Drag vbCancel
'Exit Sub
'End If
'Next
'Next
'End Sub
|
|
|
|
|
You are never getting further than once through, as your code exits the sub regardless of whether heart(index).tab = image1(newindex).tag or not - you have exit sub in both the if and the else!!
ymilan wrote: 'If Hearts(Index).Tag = Image1(NewIndex).Tag Then
'Image1(NewIndex).Drag vbEndDrag
'MsgBox ("You're right!")
'Exit Sub <<<<<<<<<<<<<<<<<< HERE
'Else
'Image1(NewIndex).Drag vbCancel
'Exit Sub <<<<<<<<<<<<<<<<<<< HERE ALSO
'End If
|
|
|
|
|
Hello,
I tried to take them out and then the Msgbox messages would run in an incessant loop at runtime.
I took the message boxes out and tried this; but no card from the image1 side shows up over the card in the hearts side. It is just blank.
Code? Sorry, I'm such a newbie...
If X <= 12 And Y <= 12 Then
Hearts(X).Picture = Source.Picture
Image1(Y).Picture = Hearts(X).Picture
X = X + 1
Y = Y + 1
End If
'should initialize those deck positions right in the array?
For X = 0 To 12 <<<<should I use these For's?
For Y = 0 To 12
Image1(X).Tag = Hearts(Y).Tag <or should I just start with this? But then X and Y will always = each other and it won't go to next lines....it will stop at here.
If Hearts(Y).Tag = Image1(X).Tag Then
Image1(X).Drag vbEndDrag <<<<<is this where I'm messing up?
'MsgBox ("You're right!")
Else
Image1(X).Drag vbCancel
'MsgBox ("You're wrong.")
End If
Next
Next
End Sub
|
|
|
|
|
Where are you actually setting the tags?
Try getting rid of the "you're wrong" message box and the drag cancel etc, and just get it to say "you're right" when you find the right tag.
This will help you work out that your checking routine is working correctly.
|
|
|
|
|
This what I'm trying to do, but what happens is "it is always right" and with "any" card I put into any hearts slot on the right, will put that card right up at hearts(0) and say, you're right. How do I initialize the cards pictures to equal each other, then use next and next for the "for's in the beginning, then question whether the tags = each other. The tag numbers are set in design view.
Here's my code:
Private Sub Hearts_DragDrop(Index As Integer, Source As Control, X As Single, Y As Single)
Dim NewIndex As Integer
For Index = 0 To 12
For NewIndex = 0 To 12
Hearts(Index).Picture = Source.Picture
Source.Picture = Image1(NewIndex).Picture
If Hearts(Index).Tag = Image1(NewIndex).Tag Then
Image1(NewIndex).Drag vbEndDrag
MsgBox ("You're right!")
Exit Sub
Else
Image1(NewIndex).Drag vbCancel
MsgBox ("This card does not belong here")
Exit Sub
End If
Next
Next
End Sub
|
|
|
|
|
Hello every One,
I have a Vb.net 2005 express application.
I will like to define the issue in two folds
- I have to create a controls with many rows and 2 columns having thumbnails. I am not able to decide which control should i use (datagridview or a list view). I had done some experiment with grid and able to do it, but i want to have some text along with the image in same cell only. Is it possible, if so how do i do it. I had declared the col type as imagecol.
- I want to do a drag and drop of image(thumbnail) from one cell to another along with the text. I was able to do drag and drop in 2 individual controls (2 picture box and two text boxes) but having some issues. Can some one plz guide me with the same.
Regards
Nishkarsh
|
|
|
|
|
I would probably do this with a ListView, possibly owner drawn. Just Google for "custom draw listview" for examples.
For an example of creating custom image and text cursors for drag and drop, see this article[^].
|
|
|
|
|
Hi,
i have create simple application using mysql db.
In locallly perfactly working.
but remote connection occur problem.
connection string :
server=XX.XXX.XXX.XXX;Uid=*****;Pwd=****;database=DB;
tanks in advance.
Yours,
KaNNaN
-----------------------------------------------------------------
"Success is When Ur Signature Becomes An Autograph"
Mail To : foreverkans@gmail.com
|
|
|
|
|
Hi,
connection strings are language-independent; here is the connection bible.[^]
Luc Pattyn [Forum Guidelines] [My Articles]
The quality and detail of your question reflects on the effectiveness of the help you are likely to get.
Show formatted code inside PRE tags, and give clear symptoms when describing a problem.
|
|
|
|
|
Which is generally the first returned site on a Google search.
hmmm
Any suggestions, ideas, or 'constructive criticism' are always welcome.
"There's no such thing as a stupid question, only stupid people." - Mr. Garrison
|
|
|
|
|
Hi,
Iam connecting with my SQL Server 2005 [SQl SERVER Authentication] on LAN Network by Remotely.
------------------------------------------
Data Source=1.1.1.2; initial Catalog=Ep_Mngment; User Id=FORUSERS; Password=XXX
------------------------------------------
My clarification is , when I put the program [vb.net] in network drive, all my users will access the same program.
So the above connection can be usefull for multiaccess [also multi user login at single a/c] at same time?
will it be a problem?
Thanks
|
|
|
|
|
Paramu1973 wrote: Data Source=1.1.1.2; initial Catalog=Ep_Mngment; User Id=FORUSERS; Password=XXX
Your connection string has nothing to do with this, unless you set the database up in such a way that the user FORUSERS is limited to a certain amount of simultaneous connections.
Making the app run from a network drive will be tricky, but assuming that you have successfully tested this, every time a user executes your program, it will create a new instance in the user's own PC's memory, and therefore its own connection to the database.
But beware of the application writing logs (text files), and stuff like that, to the program's own directory.
My advice is free, and you may get what you paid for.
|
|
|
|
|
Use the rule: "what are the absolute minimum amount of rights that I can give a user and they can still complete their job".
So you tell us....
Any suggestions, ideas, or 'constructive criticism' are always welcome.
"There's no such thing as a stupid question, only stupid people." - Mr. Garrison
|
|
|
|
|
hi :
I want to write a program that gets numbers in voice then write them into the text file .
I think I must compair two audio files to make it .
please help me about this problem .
my language is not English.
tanks .
|
|
|
|
|
It's called "Voice Recognition", and just comparing two audio files isn't going to do it.
Google for "Voice recognition" or "speech recognition" for software that can do this.
|
|
|
|
|
Speech recognition. If you're using version 3.0 or 3.5 of the .net framework, then look into the SpeechRecognitionEngine[^] class, and in particular the SpeechDetection event, the RecognizeAsync method and the LoadGrammar method (so you can load the numeric grammar)
|
|
|
|
|
Ah, I forgot about that little corner of the namespace. I've been stuck in .NET 2.0 for so long, I forgot there's a whole other world out there!
|
|
|
|
|
Yeah, I love corners. Finding them and seeing how they interact just makes my day - I really feel I learned something
|
|
|
|
|
Very cool, I was unaware about that as well.
Any suggestions, ideas, or 'constructive criticism' are always welcome.
"There's no such thing as a stupid question, only stupid people." - Mr. Garrison
|
|
|
|
|
Sr.No Crop Variety Packing Pkts
1 Cot 589 SG 10 8
2 Cot 789 G 1 120
3 Cot 789 G 1 100
4 Cot 789 G 1 15
5 Cot 789 G 1 150
6 Cot 789 G 1 200
7 Cot 789 G 1 2500
8 Cot 789 G 1 200
9 Cot 789 G 1 512
10 Cot 789 G 1 454
11 Cot 789 G 1 454
12 Cot 789 G 1 454
13 Cot 789 G 1 656
14 Cot 789 G 1 455
15 Cot 789 G 1 88
16 Cot 789 G 1 788
i have above grid data in my vb package
when i modify colum 4 and row 4 and save the record but it has been
change colum 4 and row 10 automatically
please help me
thanking you
kishor
|
|
|
|
|
How are we supposed to help you?
Provide code (as little as possible but still enough to make out what's happening).
Did you try debugging it? (step thru it step by step)
What language? (VB.NET or vb6)
|
|
|
|
|
Dear Sir
Thank you replies for my problem
my allication is based on VB6
secondly this happen only when i add max record and same continue variety
please see following code
rivate Sub cmdDetAdd_Click()
DetRecordStatus = RecNew
mDetailStatus = DetailNew
Call ClearDetails
Call SetDetButtonStatus
If HdrRecordStatus <> RecNew Then
txtIndentRefNo.Enabled = False
cmdIndentRefNo.Enabled = False
Else
txtIndentRefNo.Enabled = True
cmdIndentRefNo.Enabled = True
txtIndentRefNo.SetFocus
End If
If Len(Trim(txtCrop.Text)) = 0 Then
txtIndentRefNo.SetFocus
Else
'txtLotNo.SetFocus
End If
End Sub
Private Sub cmdDetModify_Click()
If HdrRecordStatus = RecNew Or HdrRecordStatus = RecModify Then
DetRecordStatus = RecModify
Call AddDetailsToControls
GridRow = flxDetail.Row
Call SetDetButtonStatus
'txtNoOfBags.SetFocus
txtVariety.SetFocus
End If
End Sub
Private Sub cmdDetDelete_Click()
On Error GoTo ErrHandler
Dim strQry As String
Dim RowCnt As Integer
Dim IsBeginTrans As Boolean
IsBeginTrans = False
With flxDetail
If .Rows > 1 Then
GridRow = .Row
If GridRow = 0 Then Exit Sub
Call AddDetailsToControls
If MsgBox("Do you want to delete the Marketing seed despatch detail of lot number " & Chr(13) & _
.TextMatrix(GridRow, SOLotNoCol), vbYesNo) = vbNo Then Exit Sub
If .TextMatrix(GridRow, SOStatusCol) = DetailExisting Then
If Len(Trim(.TextMatrix(GridRow, SOInvisibleLotNo))) > 0 Then
strQry = "Delete from MktDespatchDet " & _
" Where MktDespatchRefNo = '" & Trim(txtDespatchRefNo.Text) & "'" & _
" and MktLotNo = '" & Trim(.TextMatrix(GridRow, SOInvisibleLotNo)) & "'"
gNSLConn.BeginTrans
IsBeginTrans = True
gNSLConn.Execute strQry
strQry = "Update MktLotMst set " & _
" NoOfBags = NoOfBags + " & Val(.TextMatrix(GridRow, SONoOfBagsCol)) & _
", IsExists = 'Y' " & _
" Where LotNo = '" & Trim(.TextMatrix(GridRow, SOInvisibleLotNo)) & "'"
gNSLConn.Execute strQry
gNSLConn.CommitTrans
IsBeginTrans = False
End If
End If
If DeleteMSFGRow(flxDetail) = False Then
MsgBox "Error in Flexgrid Row Deletion"
GoTo ErrHandler
End If
Call cmdDetClear_Click
End If
End With
Exit Sub
ErrHandler:
If IsBeginTrans = True Then
gNSLConn.RollbackTrans
End If
Call ErrorLog(Err.Number, Err.Description, Err.Source, Me.Name, "cmdDetDelete_Click")
End Sub
|
|
|
|
|
Hi to all,
I have an VB.NET2005 application.
I want to run the application on windows start up. The user should see only the application screen.
All I need is to stop the user to do anything in the system(before my application Run).
Later he should be able to exit the application and do other staff(like opening the explorer etc)
Is there any registry settings for this?or may be some other method
Thanks in advance
-----------------------------
I am a beginner
|
|
|
|
|
Hi,
Add the application exe in the startup in your system.
Thanks
~Khatri Mitesh
khatrimitesh@hotmail.com
Bikaner (Rajasthan)
INDIA
http://www.youtube.com/watch?v=-oJaaPCrk3Q
|
|
|
|
|
thanks for the reply
But I guess it will take some time to run the application.By that time user can do anything(eg: opening MyComputer) on the system. Which I want to avoid for security reason.
Is there any method for the same.
Thanks in advance
-----------------------------
I am a beginner
|
|
|
|