Questions tagged [vb.net-2010]

The version of Visual Basic .NET used in Visual Studio/Visual Basic 2010. Use VB.NET and Visual Studio 2010 tags instead unless the question is specifically about language features added in VB.NET 2010.

The version of Visual Basic .NET used in Visual Studio/Visual Basic 2010. New features include:

  • Less-strict line continuation; for example, this syntax is allowed:

    Dim lines() As String = {
        "I am line number one",
        "and I am line number two."
    }
    
  • Auto-implemented properties. This:

    Public Property Hello() As String = "World"
    

    is compiled like this:

    Private _hello As String = "World"
    
    Public Property Hello() As String
        Get
            Return _hello
        End Get
        Set(ByVal value As String)
            _hello = value
        End Set
    End Property
    
  • Collection initializers using From:

    Dim l As New List(Of String) From {"Hello", "World"}
    
  • Multi-line lambdas:

    Call New Thread(Sub()
                        Console.WriteLine("Hello, world!")
                    End Sub).Start()
    
  • Support for dynamic types

  • Support for contravariance and covariance

The full list of changes can be found here.

2117 questions
0
votes
1 answer

Error : Conversion from string "serial" to type 'Integer' is not valid

I have this code: Dim dv As New DataView(_DataSet.Tables(0)) ' select deleted rows dv.RowStateFilter = DataViewRowState.Deleted For _irow As Long = 0 To dv.Table.Rows.Count - 1 If Not IsDBNull(dv!serial) Then …
0
votes
2 answers

There's any way to know if a VB.NET application is being debugged?

I have an application developed on VB.NET2010 and I need to enable some objects only when is in debug mode. The application can know when is being debugged?
E_Blue
  • 1,021
  • 1
  • 20
  • 45
0
votes
2 answers

Improving VB.NET Chart Label Values

It works out that when using the autofit of axis labels, the label values take on unappealing values. Has anyone developed code to evaluate range and scale of axis values and then show for example label values at intervals of 1, 5, 10, 20, etc?…
user1493382
0
votes
1 answer

Simple app: comma delimiter with input and output text boxes

All, I'm looking to create a simple app that takes text entered by the user and splits it up, based on what line the text is entered on (it's a multiline textbox) using a comma. It inserts this new comma-delimited value into an output textbox for…
Sev09
  • 883
  • 2
  • 12
  • 27
0
votes
1 answer

Set registry key OUTSIDE of HKEY_CURRENT_USER

How do I set a value to the registry that is NOT in HKEY_CURRENT_USER? My.Computer.Registry.CurrentUser.CreateSubKey("..\HKEY_CLASSES_ROOT\") This above only puts it in a folder named ..
Visual Magic
  • 479
  • 6
  • 13
0
votes
1 answer

Filter Dictionary from list in vb.net

I got stuck up with the problem that I have a Dictionary (dictData [String,XElement]) and a list (lstData [String]). So now I want to filter the dictionary with all the elements in dictionary Key other than list items. So basically compare list…
0
votes
0 answers

VB.NET Getting twitch viewers from webbrowser into a string

Okay so I'm using a web browser to navigate to a stream and I want to get the viewers amount into a label. I've searched around a lot on google and such but no luck. Some help would be very much appreciated, thank you.
ElementalTree
  • 121
  • 1
  • 2
  • 8
0
votes
1 answer

Update a column when closing a window in asp.net

I have a table of records that has a column processed. In my web page i'm using sessions.. because every user that opens the page should see different data from the table.. so i initially have processed=0 and when i'm selecting my data i'm updating…
User7291
  • 1,095
  • 3
  • 29
  • 71
0
votes
2 answers

sqldatabase variable declaration from a listbox in Vb.net 2010

I'm trying to save the selected Item from the listbox to the database but when i choose the item from the listbox I get a Runtime error that the variable(RomID) is not declared. Here's the code. What am I missing?! If (con.State =…
0
votes
1 answer

Errors calling WriteFile from visual basic .net 2010 on a named pipe

I've been banging my head on this one all day, and I just can't make sense of the various (sometimes conflicting) documentation on this. To add to the confusion, at some point during the day, this did (sort of) work - i.e. didn't throw an access…
dsl101
  • 1,715
  • 16
  • 36
0
votes
0 answers

How can I make the second form follow whatever happens in the main form?

I have a two forms. The main form, and the other is where I put the background image. I set the main form transparent so you can see the background. I created another form for the background because I want only the contents in the main form to be…
0
votes
1 answer

update database when user add a row in datagridview

I'm having an issue with using a datagridview for a user entering data that's saved to a database. Basically, I just want them to throw stuff into a row and then my code will insert the data. I tried LeavingRow event, but the problem with this…
user2194838
  • 337
  • 2
  • 8
  • 24
0
votes
4 answers

displaying all rows of a specific column in a textbox

i am using visual studio 2010 with sql server 2008 as back end, i have a problem in displaying all the rows of a particular column in a textbox. i have tried this, cmd.CommandText = "select article_no from main where name='" & TextBox1.Text &…
Jigar patel
  • 215
  • 2
  • 11
  • 23
0
votes
1 answer

Updating Data in Database MS Access vb.net

Private Sub Exe1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load txtScore.Enabled = False con.ConnectionString = "Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\Users\SJMI.Alfie\Documents\Visual Studio…
Aouie
  • 119
  • 2
  • 8
  • 17
0
votes
3 answers

How to convert string to date or datetime vb.net

How can I convert my strings into a date or datetime datatype in vb.net? These are my strings that are date and time with this format: Dim sDate,sTime String Dim myDate,myTime,dateToSave as Date sDate = '11/25/13' sTime = '16:30:05' I wanted to…
ImTheBoss
  • 337
  • 1
  • 2
  • 13
1 2 3
99
100