|
Try reading the sticky post on top of the forum, that explains how to ask questions so that people can answer them.
For starters, add to cart implies ASP.NET, there's a forum for ASP.NET. If you ask in the VB forum, at least tell us it's ASP.NET.
newbie@vb wrote: if it is,whats the coding?
That's not a good question to ask. The articles on this site are here to give full code for things, the forums are for helping people with existing code.
newbie@vb wrote: it is necessarily to connect the features from access?
If you want to store your orders, then you'd have some database on the back end, yes.
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
Hi,
I have two forms, frm1 and frm2. If a specific event occurs, i want another form to be opened, and that frm1 passes the variable "Drive" on to frm2. How can i accomplish this?
Thanks in advance,
--Zaegra--
|
|
|
|
|
Public Sub frm1_Load(EventArgs e) Handles frm1.Load
Me.variable = frm2.Drive
End Sub
NOTE: make sure you add the "Drive variable" to frm2.
Good luck!
Code pre-built is code that you don't have to build later.
|
|
|
|
|
Hi Zaegra,
Best is to declare a property in the target form (frm2). You can then assign the property the value you want to pass on from the calling form (frm1):
Public Class frm1<br />
Dim DriveValue as String<br />
Public Property Drive() As String<br />
Get<br />
Return DriveValue<br />
End Get<br />
Set(ByVal Value As String)<br />
DriveValue = Value<br />
End Set<br />
End Property<br />
Private Sub frm1_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles MyBase.Load<br />
MsgBox(DriveValue.ToString)<br />
End Sub<br />
End Class<br />
<br />
Public Class frm2<br />
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click<br />
Dim frm As New frm1<br />
frm.Drive = "C:\"<br />
frm.Show()<br />
End Sub<br />
Dim <br />
End Class
or something like that...
Good luck,
Johan
My advice is free, and you may get what you paid for.
|
|
|
|
|
Sorry, but why doesn't this code sort my table by the variable DateValue?
ChartDataTable.Select("Datevalue > 0", "Datevalue")
ChartDataTable.AcceptChanges()
This code then prints the data in the unsorted order:
For Each dr As DataRow In ChartDataTable.Rows
Console.WriteLine(dr.Item("DateValue"))
Next
thanks
|
|
|
|
|
cstrader232 wrote: ChartDataTable.Select("Datevalue > 0", "Datevalue")
Because the Select method returns an array of DataRow object, which your code completly ignored. It does not make any changes to the existing DataTable.
You can get rid of the AcceptChanges line, it doesn't do anything here.
cstrader232 wrote: This code then prints the data in the unsorted order:
Like I said, you completely ignored, and dropped, the array of DataRow objects returned by the Select method. You're looking for something more like:
Dim sortedRows() As DataRow = ChartDataTable.Select("Datevalue > 0", "Datevalue DESC")
For Each dr As DataRow In sortedRows
Console.WriteLine(dr.Item("DateValue"))
Next
|
|
|
|
|
OK, sorry... but I would then think that you could put that row collection right back into the table it came out of.
Can you give me the best procedure for doing that?
This doesn't seem to work (input array longer than number of columns in the table):
Dim SortedRows() As DataRow = ChartDataTable.Select("DateValue > 0", "DateTimevalue")
ChartDataTable.Clear()
ChartDataTable.Rows.Add(SortedRows)
|
|
|
|
|
cstrader232 wrote: but I would then think that you could put that row collection right back into the table it came out of.
The rows weren't removed from the table. So, there's nothing to "put back".
Besides, you can't write them back to the database in a specific order anyway. Databases don't care about the order of records and do not guarantee the order in which the records are retrieved from the table unless the SELECT statement specifies an ORDER BY clause.
So, what you're doing is a complete waste of time.
|
|
|
|
|
Dave Kreskowiak wrote: So, what you're doing is a complete waste of time.
OK, on that I can agree!
...but I think now I can see that I want to operate on the row collection (which is sorted) rather than the datatable itself (which cannot be)
Thanks
|
|
|
|
|
How can i restrict the date and time picker to a year and month in vb 2005
I am picking the value of year from a combo and month from another...
I want the date and time picker should nor allow the user to move to another month or year
Regards
Nishkarsh
|
|
|
|
|
Set DateTimePicker.MinDate and DateTimePicker.MaxDate
Hope it works for you,
Johan
My advice is free, and you may get what you paid for.
|
|
|
|
|
I tried mindate and maxdate but the issue is that how will i select a month....
i think i have to give a better description
I am using the interface to get date of birth
I have 2 combo boxes one to select year and other to select month ... Once the user selects year... month combo box is enabled... on select of month date picker is enabled... now i want the user should not be in a position to move to any other month or year in the date picker... until he again changes from any of the two combo boxes
|
|
|
|
|
Why not catch the month change made by the user, and put back the month from your combobox with a messagebox saying he can't change that way?
|
|
|
|
|
What happened when you set the MinDate to the first day of the chosen month, and MaxDate to the last day of that same month? Can you still change the DateTimePicker to a date outside that month?
My advice is free, and you may get what you paid for.
|
|
|
|
|
In this case how do i find what will be the last date for the month??
|
|
|
|
|
You can use the possibilities of Date:
<br />
Dim MaximumDate As Date<br />
Dim MinimumDate as Date<br />
Dim ChosenYear As Integer = 2007 'or the year chosen by the user<br />
Dim ChosenMonth As Integer = ComboBox1.SelectedValue<br />
MinimumDate = ChosenYear & "/" & ChosenMonth & "/1"<br />
MaximumDate = ChosenYear & "/" & ChosenMonth & "/" & Date.DaysInMonth(MinimumDate.Year, MinimumDate.Month)<br />
Try it.
My advice is free, and you may get what you paid for.
|
|
|
|
|
Hi,
I could tell you that Smart FieldPackEditor.Net allows you to set individual fields as readonly (well, I said it, sorry for the plug), however, why do you make it so difficult for the user to select a birth date ? Why not a single DateTimePicker ? Or if for a reason I ignore you absolutely need comboboxes, why not 3 comboboxes ? If the users acts on the 2 comboboxes, then he has to edit the DateTimePicker, he will feel like he can change the month and year in the dtp until he actually tries it and see no modification... Think usability first.
|
|
|
|
|
Hai,
Can u give me idea to do certification in dot net like MCP. I am well in VB.Net & ASP.Net with sql. Pls refer me which help to seek jobs.
If it can done in online it is good for me??????????
Senthil S
Software Engineer
|
|
|
|
|
Senthil S wrote: If it can done in online it is good for me??????????
MCPs must be completed at authorised test centres.
Senthil S wrote: Pls refer me which help to seek jobs.
The ones that relate to the job you are going for. It would be stupid to get an MCP in Windows Server 2003 administration if you want to write software.
|
|
|
|
|
|
hi frnd,
better to do MCTS and MCPD just collect the information of MCTS and MCPD from internet
best luck
regards,
koolprasad2003
If the message is useful for U then please Rate This message...
Be a good listener...Because Opprtunity knoughts softly...N-Joy
|
|
|
|
|
Hi Friends,
I need to bind a picture to a picture box control at run time in Vb.net.
How to do..?
someone help in this regard as early as possible..
Regards,
Balagurunathan S
Balaguru
|
|
|
|
|
Hello,
You can use the following code to bind the picture in an Picture box on a button click.
<br />
Dim fod As New OpenFileDialog<br />
fod.Filter = "JPG|*.jpg|BMP|*.bmp|All Files|*.*"<br />
Dim dr As DialogResult<br />
dr = fod.ShowDialog()<br />
If dr = Windows.Forms.DialogResult.OK Then<br />
<br />
PictureBox1.SizeMode = PictureBoxSizeMode.StretchImage<br />
PictureBox1.Load(fod.FileName)<br />
<br />
End If<br />
If you have path of the picture in a string variable, you can pass the file name to the Load()
method of the PictureBox.
I hope this helps.
Regards,
Allen
Allen Smith
Software Engineer
ComponentOne LLC
www.componentone.com
|
|
|
|
|
Thanks Allen..
I got it..
Regards,
Balagurunathan S
Balaguru
|
|
|
|
|
How can i set day notes in calender using vb.net.which control i want to use.
|
|
|
|