|
|
Pushpa Setty wrote: If sDate = DateTime.ParseExact(strDate, "yyyyMMdd", formatNew) Then
This won't work as, unlike C++ or C#, you're not assigning anything to sDate. You're actually comparing a date object (Jan 1, 0001) to the date object returned by the DateTime.Parse, which will, in all likelyhood, be false every single time.
It should work, and be a little more flexible, if you did something like:
Public Shared Function CheckDateFormat(ByVal dateToCheck As String, ByVal culture As CultureInfo) As Boolean
Try
DateTime.ParseExact(dateToCheck, "yyyyMMdd", culture)
Return True
Catch
' Your function shouldn't care about other controls on the form.
' It's up to the caller to decide what should be done, like post a message,
' when this function returns False.
Return False
End Try
End Function
Mind you, this will only check to see if the date is legal on the Gregorian Calendar. It won't check to see if the date is within a legal range for your applications data.
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
function which will clear all controls in the form when it is called. appreciated for ur help.thank u
|
|
|
|
|
Hi
You Must Write The Function Yourself.
For Example I Have 2 TextBox;2 CheckBox&....
I Write a Sub or function Such This:
Sub ClearMyForm()
Text1.text=Dafault Text1
Text2.text=Dafault Text2
Checkbox1.Value=0 'Default Is UnChecked
checkbox2.value=1 'Default Is Checked
.
.
.
End Sub
Good Luck.
Mogtabam
|
|
|
|
|
Use control collection...
For Each ctl As Control In Me.Controls
ctl.text="" '''''''''get each control one by one
Next
Parwej Ahamad
g_parwez@rediffmail.com
|
|
|
|
|
when a row is double clicked in datagrid ,the row data should display in textboxes(VB.NET).waiting for help.
thank u
|
|
|
|
|
If you are using a datagridview here's an example:
txtAC.Text = DataGridView1.CurrentRow.Cells(9).Value & " "
PUT THIS IN THE DATAGRIDVIEW CLICK EVENT.
jhoga
|
|
|
|
|
Hi all,
Datagrid ctrl using with ComboBox and Text box...But how to assign the Value in Datagrid..so pls send me sample coding format.........
thanking you
Somasundaram G
|
|
|
|
|
Hi
Wath is Your Usage?
You Use DataGrid With Database? or Not?
Mogtabam
|
|
|
|
|
Yes through Database Only... Pls tel me...
iam selecting the item in combobox from Database....
somasundaram
|
|
|
|
|
You Must Use Microsoft ADO Control (for example Named Adodc1). And Set TextBox & Combobox DataSurce to Adodc1 & Specified DataField For TextBox & ComboBox.
Then If You Change Textbox Or Combobox The Data In DataGrid & DataBase Will Be Changed.
Good Luck
Mogtabam
|
|
|
|
|
I have created a form in the Resolution of my system as 1024 X 768 Pixels. But when I submit the project at the client side the Resolution is some 800 X 600 Pixels. In some other different Resolution is there.
How can I change my Form Dynamically according to the Resolution present in the System where we are using.
Thanx in advance
Priya
|
|
|
|
|
Hi
This May Useful for you.
Width Of Screen In Pixel: Screen.Width / Screen.TwipsPerPixelX
Height Of Screen In Pixel: Screen.Height / Screen.TwipsPerPixelY
For Example :
Private Sub Form_Load()
Me.Width = Screen.Width
Me.Height = Screen.Height
Me.Top = 0
Me.Left = 0
End Sub
Good Luck
Mogtabm
|
|
|
|
|
|
I have created a form in the Resolution of my system as 1024 X 768 Pixels. But when I submit the project at the client side the Resolution is some 800 X 600 Pixels. In some other different Resolution is there.
How can I change my Form Dynamically according to the Resolution present in the System where we are using.
When I Use this Code:
Width Of Screen In Pixel: Screen.Width / Screen.TwipsPerPixelX
Height Of Screen In Pixel: Screen.Height / Screen.TwipsPerPixelY
For Example :
Private Sub Form_Load()
Me.Width = Screen.Width
Me.Height = Screen.Height
Me.Top = 0
Me.Left = 0
End Sub
Displaying of Form is OK.
But controls are missing.
What I need is It has to adjust the controls also according to the System Resolution and all the content present in the Form should be displayed in the Resolution present in the System.
controls as well as form should be resized according to the System resolution.
Priya
|
|
|
|
|
Hi
For Resizing Controls You Can Use "Microsoft Forms2"
You Can Resize Zoom In & Zoom Out In Microsoft Forms2 Components.
But I don't Remember How You Can Resize Or Zoom In & Zoom Out.
If I Remember I Will Send You An Example Code.
Good Luck.
Mogtabam
|
|
|
|
|
What I have done in the past is design the form at the lowest usable resolution, then in the same routine that sets the size of the form I figure out the difference in the screen sizes and iterate through the forms control collection and set the position and size to what I want it to be.
You also will need to adjust your font size for each control
-- modified at 12:32 Monday 12th March, 2007
|
|
|
|
|
write an HTML code to present two frames in a window. the first frame presents the list of programming labs for MCA-IIyr. and the second frame presents the list of programs to be written in the selected programming lab.write vbscript to do the above.
|
|
|
|
|
Is this your homework that you are trying to get someone else to do for you? It really sounds like that, anyway.
Unless you explain a bit more about what you are doing, and specifically what it is that you need help with, I don't think that you will get many answers.
Also, this is rather a web development question than a VB question. VBScript is not VB.
---
single minded; short sighted; long gone;
|
|
|
|
|
I want to change the color of the small box in the checkbox.
If I change the backcolor to white, it does not affect the small square inside the checkbox border on which we actually click.
Can anyone please tell me how can I change that color ?
|
|
|
|
|
I dont' believe you can simply by setting a property. You can extend the checkbox by creating a class and inheriting the checkbox. In the OnPaint event you could fill that square in yourself with a different color. However, you'll have to draw the check mark as well.
|
|
|
|
|
when a row is double clicked in datagrid ,the row data should display in textboxes.waiting for help.
thank u
-- modified at 1:03 Tuesday 13th March, 2007
|
|
|
|
|
Generally whenever you are displaying data in a grid it contains a unique value in a particular column. So, put the unique column number
Formname.textboxname.text=val(datagrid.textmatrix(datagrid.row,colnumber)
Then you can write a query for displaying other things using this unique vale
I hope this can solve your problem
Priya
|
|
|
|
|
I am making a windows application in VB.NET 2003 and ACCESS.I want to set reminders through a windows form.I want a popup message to be shown whenever I login to my system or a pop-up is shown whenever the reminder time is equal to my system clock.
Please help me.
Live life to the fullest
|
|
|
|
|
what coding do i do so that my textbox take values only between two integers say 0 to 45, any value other than this range gives error..
thanks
|
|
|
|