|
hi,
i wrote following code to validate my all controls on form.
it is working well but when i run my project & for testing purpose i leave the textbox as it is
following code executed & showing appropriate message but it is validating controls randomly....& i wnt that it should validate control in a sequence
( e.g. employeeid ,empname,designation......etc).
i have given tabindex to all controls in sequence though it is validating controls in random manner Wht shuld i do??
Is there anyone who will solve my problem????
Public Function Validate_Ctrl(ByVal sender As Form) As Boolean
For Each obj In sender.Controls
If TypeOf obj Is TextBox Then
If obj.Name = "txtSearch1" Or obj.Name = "txtSearch2" Or (TypeOf obj Is CheckBox) Then Continue For
If obj.Text = "" Then
MsgBox("Please Enter Values In " + obj.Name, MsgBoxStyle.Exclamation + MsgBoxStyle.OkOnly, obj.Name + " Validation")
obj.Focus()
Validate_Ctrl = False
Exit Function
End If
End If
Next
Validate_Ctrl = True
End Function
priya
|
|
|
|
|
As far as I know, the for each loop will visit the controls not according to tab index, but something else.
A cumbersome method can be to load all the controls in an array and then sort them based on their tab index and then apply the validations on them.
A simpler method might be to use ErrorProvider and the validate events for a better control over validation (This applies only in .Net 2.0) - so if you are using VB 6, ignore this part.
Shreekar
|
|
|
|
|
any code for doing a booking system in vb.net and just using the database to store the details. require code for the seats which are going to be text boxes 200 minimum 600 maximum and going to be using the tab index to return that specific seat number, which when searching a specific date tells me that whether the seats are free or booked and if free will let me book the seat for the customer, and if booked display the customers name seat no, and row, seat 30 x 20= 600 from rows A to T. jsu tell me where to look if possible please for the appropriate code thank you
-- modified at 9:24 Tuesday 16th January, 2007
|
|
|
|
|
Is this homework, or are you being paid to write this ? Sounds more like the former, but either way, the way to do this is well documented online, if you're not willing to do some research and start your project, you're on your own. If you're willing to give it a go, and ask specific questions when you get stuck, we're here to help.
Christian Graus - C++ MVP
'Why don't we jump on a fad that hasn't already been widely discredited ?' - Dilbert
|
|
|
|
|
Here[^] we go. Trainwreck in progess...
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
Christian Graus - C++ MVP
'Why don't we jump on a fad that hasn't already been widely discredited ?' - Dilbert
|
|
|
|
|
Christian Graus wrote:
Hehehehe! I can't help but to laugh every time I see that icon. One of the best next to .
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
Hi Guys,
Does anyone know how to deal with leagcy binary .dat files in VB .Net i have a few systems in VB 6 that write to .dat files 1 example is the following structure / type:
Type AccountDat
cAccount As String * 12
cCompany As String * 32
cAddress(3) As String * 32
cTelFax(1) As String * 18
cContact As String * 22
nPriceLevel As Integer
nStop As Integer
nCash As Integer
nFirst As Long
nLast As Long
nLimit As Long
nBalance(4) As Long
nLock As Integer
End Type
Type AccountIdx
cAccount As String * 12
nRecord As Long
End Type
My question is how do i handle these files in VB .Net
Thanks
Keith
|
|
|
|
|
How to disable the Lock Computer button in Win 2k.
Plz Tell me....
Thanks & Regards
Kumaran
|
|
|
|
|
What do you want to disable ? The odds are, the answer is 'computer says no'
Christian Graus - C++ MVP
'Why don't we jump on a fad that hasn't already been widely discredited ?' - Dilbert
|
|
|
|
|
hi actually i cant get what u want can u please make it clear
SP
--
Bugs can neither be created nor be removed from software by a developer. They can only be converted from one form to another. The total number of bugs in the software always remain constant.
|
|
|
|
|
The best way to do it is through Group Policy. Or, you can just edit the registry key that disables it. See here[^].
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
hi all
please tell me how i can create a TRANSPERANT FORM
i.e. i can view back item on screen while form is on
SP
--
Bugs can neither be created nor be removed from software by a developer. They can only be converted from one form to another. The total number of bugs in the software always remain constant.
|
|
|
|
|
Isn't there a transparency property ? There was an API in C++ from W2000 to set the transparency
Christian Graus - C++ MVP
'Why don't we jump on a fad that hasn't already been widely discredited ?' - Dilbert
|
|
|
|
|
hi
tx
can you please specify it with example
-- modified at 4:38 Tuesday 16th January, 2007
SP
--
Bugs can neither be created nor be removed from software by a developer. They can only be converted from one form to another. The total number of bugs in the software always remain constant.
|
|
|
|
|
hi there
is any method in VB 6.0 for the same
SP
--
Bugs can neither be created nor be removed from software by a developer. They can only be converted from one form to another. The total number of bugs in the software always remain constant.
|
|
|
|
|
Oh, no, I don't think so. VB6 is very out of date, it sure predates opacity on forms.
Christian Graus - C++ MVP
'Why don't we jump on a fad that hasn't already been widely discredited ?' - Dilbert
|
|
|
|
|
ohh ok
thanks i will try .net
SP
--
Bugs can neither be created nor be removed from software by a developer. They can only be converted from one form to another. The total number of bugs in the software always remain constant.
|
|
|
|
|
SACHIN P. wrote: is any method in VB 6.0 for the same
I think you can, using some Windows API calls. These will work only OS later than Win98.
I remember seeing some code on PlanetSource a long time ago.
HTH
|
|
|
|
|
just set form's opacity to 85 or whatever in for properties!!!
and sorry on bad English!
|
|
|
|
|
TX
SP
--
Bugs can neither be created nor be removed from software by a developer. They can only be converted from one form to another. The total number of bugs in the software always remain constant.
|
|
|
|
|
Hi,i'm Steven
Can VB.NET create a coding IP Camera beside C#?
If yes, how can i get the information about it.
Which website can give me resources regarding security system using IP Camera?
Hope someone can give some advice..
Thanks
Steven Tay
Steven Tay
|
|
|
|
|
Hi,i'm Steven
Can VB.NET create a coding IP Camera beside C#?
If yes, how can i get the information about it.
Which website can give me resources regarding security system using IP Camera?
Hope someone can give some advice..
Thanks
Steven Tay
|
|
|
|
|
wrote: Can VB.NET create a coding IP Camera beside C#?
If C# can do it, VB.NET can probably do it.
wrote: Which website can give me resources regarding security system using IP Camera?
I thought there was a CP article ? DirectShow is what you need, just download it and check the samples.
Christian Graus - C++ MVP
'Why don't we jump on a fad that hasn't already been widely discredited ?' - Dilbert
|
|
|
|
|
hi hesicong!! i hv seen ur project FILE TRANSFER FROM PC TO MOBILE PHONE i hv some prob about sdk.plzz tell me what is sdk and i could i get it?plzz give me detail about SDK. thnku
|
|
|
|