|
Hi, dear all,
I am alway confused by the terms of Visual Basic 2005 and VB.NET 2005, are they same? if not, what's the difference?
I installed Visual Studio 2005 in my compuer, when I create vb project from Visual Studio 2005, is it VB 2005 of VB.NET 2005?
Thanks!
|
|
|
|
|
'Traditional' VB died with VB6, but unfortunately it appears to be still kicking out a few death throes still. Anything VB since then is VB.NET.
|
|
|
|
|
Chirs,
Thanks for your clarification.
These terms are very confused.
|
|
|
|
|
Hot fix:
Andraw Tang wrote: These terms are very confused confusing.
|
|
|
|
|
What makes it confusing is that Microsoft, since 2008, has referred to the latest .NET version of VB as simply "VB" - you won't see any mention on the product pages of Microsoft's site of "VB.NET".
So, the current and correct terms are "VB", "Visual Basic", "VB9" (VS 2008), and "VB10" (VS 2010).
David Anton
Convert between VB, C#, C++, & Java
www.tangiblesoftwaresolutions.com
|
|
|
|
|
Experts,
Why can i not create a setup wizard?
I have VB.net 2005 (express edition) but i don't seem to have a setup wizard pack. When i click file, add new project, i am given like only 4 choices. On google it says go on to "other" and then select setup wizard........ I havent got an other tab??
Can any body help??
Cheers
Dan
|
|
|
|
|
When you install VS, I guess you select "Custom installation". Run VS setup and check required checkboxs. Or install professional edition
|
|
|
|
|
This is why:
VB.net 2005 (Express Edition)
The Professional versions and above can create installers. AFAIK, Express Editions use ClickOnce and don't come with the other installer projects.
|
|
|
|
|
I am currently developing an application for displaying history/statistics of a persons bowling games. I also am very new to vb.net, but have coded in a number of languages through out my IT carrier.
What I am looking for is a suggestion on how to display multiple lines in a list box type of control for every history event there is. Example>
"Date Bowled" "Name of Place Bowled" "Name of League" "Game Number" "Score of Game"
"Lane # Bowled On" "Oil Pattern on lane" "Oil condition on lane" "Ball Used" "Surface of Ball"
What I listed above would be 2 lines of information for every game played. This is a history listing, so there would be 1 to many of this information displayed.
I looked at examples of groups in list view, but I don't think that would do it. And I just am not proficient enough in the various controls you can use on a form to know which would be the best for this type of displaying information.
Any and all help is always appreciated.
Thank you in advance.
Dan
|
|
|
|
|
I think you would be able to use a listview control, there are probably a couple of ways you could do this;
1) Use listview, and set alternate row styles so the first start row of a row pair is bold or something
2) Use listview, and split the data into 2 rows as above and assign each row pair to a unique GroupID and then use grouping
3) Use listview, and only have 1 row of data with each column containing 2 parts of the data, e.g. DateBowled and Lane# would appear in the same cell. I think you can force a wrap by injecting a CRLF into the combined string. (would need to try this as i haven't do that before).
4) Create a new class that inherits from Panel and has all the data for each game in the relevant other controls within, e.g. text boxes, then for each row add this new class to a parent container e.g. flowlayout
5) Use a DataRepeater control from the VisualBasic PowerPack
Probably other ways also, but thats a starter for you to think about.
|
|
|
|
|
I never thought about doing a line break character. Funny, I have used that same logic when coding in vbscript.
The idea of the grouping I thought about, I just had the feeling it would um... klunky??? Use up alot of form retail space?
I thought about just using two physical rows for every line of detail history, with a blank row between them. Still kicking that around in the back of my head.
Chuckle, to make this even more complicated. I plan on allowing them to select what they wish to see in the detail history. So, this will be a dynamic build of the view with regard to what is shown and what isn't.
I think I'm going to just play with the different ways, to see what appears to work best.
Thank you for your feed back, it gives me more to think about. And try to see what looks the best.
Dan
|
|
|
|
|
Hi,
Iam using VS2008. I want to learn to write the programs for mobiles...
Is it possible?
Any Video or links ?
Thanks
|
|
|
|
|
|
Thanks
|
|
|
|
|
Can any one explain me please how to get one or more selected value(s) from the datagrid.
If i select one row or click in a cell i get the value i need.
|
|
|
|
|
The code below is what I am using to provide Find functionality (including Match Case or Match Exact options) on a datagrid.
In it you will see how it iterates all rows and columns and reads the cell values to allow the compare etc. Think it shows you everything you need;
Private Sub searchForm_FindNext(ByVal SearchText As String, ByVal MatchCase As Boolean, ByVal MatchExact As Boolean) Handles searchForm.FindNext
If (DataResults.RowCount > 0) AndAlso (SearchText.Length > 0) Then
Dim offset As Integer = 1
Dim rowIndex As Integer
If DataResults.CurrentRow.Index = DataResults.Rows.Count - 1 Then
If MessageBox.Show("You are on the last row, go back to the start?", "Find In Results", MessageBoxButtons.YesNo) = vbYes Then
DataResults.Rows.Item(0).Selected = True
BindingNavigatorMoveFirstItem.PerformClick()
offset = 0
Else
Exit Sub
End If
End If
For rowIndex = DataResults.CurrentRow.Index + offset To DataResults.Rows.Count - 1
For Each cell As DataGridViewCell In DataResults.Rows.Item(rowIndex).Cells
If cell.ValueType.Equals(GetType(String)) Then
If MatchCase AndAlso MatchExact Then
If cell.Value.ToString.Equals(SearchText) Then
FindNextMatched(rowIndex)
Exit Sub
End If
ElseIf MatchCase Then
If cell.Value.ToString.Contains(SearchText) Then
FindNextMatched(rowIndex)
Exit Sub
End If
ElseIf MatchExact Then
If cell.Value.ToString.ToUpper.Equals(SearchText.ToUpper) Then
FindNextMatched(rowIndex)
Exit Sub
End If
Else
If cell.Value.ToString.ToUpper.Contains(SearchText.ToUpper) Then
FindNextMatched(rowIndex)
Exit Sub
End If
End If
End If
Next
If rowIndex = DataResults.Rows.Count - 1 Then
If MessageBox.Show("End of results reached, do you want to search from the start again?", "End of Results Reached", MessageBoxButtons.YesNo) = Windows.Forms.DialogResult.Yes Then
rowIndex = 0
End If
End If
Next
End If
End Sub
Hope that helps!
|
|
|
|
|
That code is no dought very good but if you or any one else has ever used in the past with vb 6.0 sheridan grid then definately you will understand what i want to do here.
I simply want to extract the cell value and use it for displaying data on the other form. I have learn one different approach very new to me. However i am still looking if some one is able to extract either the value of the cell or its index number.
You are close but not enough close.
If i explain to you what i am developing may be u understand it better.
I have a main form say a Product form. This form has a search button to search the products i call it list because it displays a list but on the top of this form there is a search textbox which helps in searching the product code wise. for example
0010209
Here 001 is the code for lets say the main product 02 is the code for its type 09 is the colour and so on and so forth.
(the above portion i hav completed successfully but this is what still remaing in the end
when donot want to search from the form and you want to select from the grid and when you click on the grid the specific code displayed on the grid should be passed to a variable.
this is all i want if any one can help me please.
modified on Saturday, June 26, 2010 12:46 PM
|
|
|
|
|
Ah, Well there lies a problem, the code above is .Net not VB6, you should have stated this in your original post.
Good luck, i'm not going backwards to VB6 anymore.........
|
|
|
|
|
You donot need to go back to vb 6.0 technology, i am developing in vb.net 2008, its an update of an application from vb 6.0 to vb.net 2008 with different functionalities.
just follow the idea only.
Regards
Mirza
|
|
|
|
|
ok, catch your drift, the user clicks a cell in the grid and it is passed to a control e.g. a text box?
|
|
|
|
|
The example code below will create an internal data object to bind some test data to a datagridview, and then allow the user to click a cell and transfer the cells value to a textbox.
The DataGridView is named DataGridView1 TheDGV and the textbox is named TextBox1
Public Class Form1
Private _ProductList As List(Of Product) = New List(Of Product)
Private Class Products
Private _ProductList As List(Of Product)
Public Sub AddProduct(ByVal NewProduct As Product)
_ProductList.Add(NewProduct)
End Sub
End Class
Private Class Product
Private _ProductID As String
Private _Price As Double
Public Sub New(ByVal ProductID As String, ByVal Price As Double)
_ProductID = ProductID
_Price = Price
End Sub
Public ReadOnly Property ProductID() As String
Get
Return _ProductID
End Get
End Property
Public ReadOnly Property Price() As Double
Get
Return _Price
End Get
End Property
End Class
Private Sub Form1_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
_ProductList.Add(New Product("Product1", 100))
_ProductList.Add(New Product("Product2", 200))
_ProductList.Add(New Product("Product3", 300))
_ProductList.Add(New Product("Product4", 400))
_ProductList.Add(New Product("Product5", 500))
TheDGV.DataSource = _ProductList
End Sub
Private Sub TheDGV_CellClick(ByVal sender As Object, ByVal e As System.Windows.Forms.DataGridViewCellEventArgs) Handles TheDGV.CellClick
TextBox1.Text = TheDGV.Rows(e.RowIndex).Cells(e.ColumnIndex).Value.ToString()
End Sub
Private Sub TheDGV_CellContentClick(ByVal sender As System.Object, ByVal e As System.Windows.Forms.DataGridViewCellEventArgs) Handles TheDGV.CellContentClick
TextBox1.Text = TheDGV.Rows(e.RowIndex).Cells(e.ColumnIndex).Value.ToString()
End Sub
End Class
[Edit: I had the wrong name of the DataGridView]
Dave
Don't forget to rate messages!Find Me On: Web| Facebook| Twitter| LinkedInWaving? dave.m.auld[at]googlewave.com
modified on Sunday, June 27, 2010 2:38 AM
|
|
|
|
|
Great job, that is really great code, i have been looking for something of this type for long time, thanks
|
|
|
|
|
the followind code is used for search items from a column cell
For Each row As Windows.Forms.DataGridViewRow In Me.DataGridView1.Rows()
Dim id as integer
id = row.cell(0).value
cmd.Parameters.Add("@id", SqlDbType.int).Value = id
next row
when i enter a value in the Column cell(0) on first row works fine but the problem is when i enter a value in second,third ... row it doesn't work as it should be.
can anyone help me to find out what i am missing ?
thanks !!!
so much of happy ending...
|
|
|
|
|
For v = 0 To DataGridView1.Rows.Count - 1
id = DataGridView1.Rows(v).Cells(0).value
'Do your thing'
Next v
|
|
|
|
|
i used ur code working same as mine, only first row cell it works not for rest !
what i am missing ?
thanks for your reply any more ideas ?
so much of happy ending...
|
|
|
|