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
2
votes
1 answer

Crystal Reports 2010 (V.13) shows no data in Visual Studio 2010

I'm a newbie to VS and CR, and been struggling with this issue for days: I've installed CR 2010 and tried creating a report on my VB.Net project - the report loads, shows the headers but there is no data. When browsing each field in Field Explorer…
Gil
  • 33
  • 1
  • 11
2
votes
1 answer

Check if an item is already exist in listbox1

In form1 I have two listboxs: listbox1, listbox2; loadbutton and savebutton This code will write listbox1.selecteditem into a txt file and loadbutton will load the info. But in listbox2 I want loadbutton to check if that item already exist in…
gmb Mc
  • 23
  • 2
  • 6
2
votes
2 answers

Converting JSON data to VB.NET multidimensional array

I have a multidimensional array converted to JSON data in this format. "[[null,null,null,null,null,null],[null,null,null,1,1,null],[null,null,null,null,1,1],[null,null,null,null,null,null],[null,null,null,null,null,null]]" I am trying to conver…
Rohith Nair
  • 1,080
  • 1
  • 17
  • 33
2
votes
1 answer

Awesomium with .NET VS2010 (ObjectForScripting)

I'm having some issues finding examples of how to use the Awesomium web browser control in vb.net with objectforscripting. I know that objectforscripting isn't the same for the webcontrol used with awesomium since its HTML5 and not the traditional…
Shane
  • 379
  • 2
  • 3
  • 12
2
votes
1 answer

Dynamic Linq using Data Objects. How to convert Int32 to String for purpose of calling String.Contains()

I am using Dynamic Linq to execute a T-SQL where clause against LINQ. This works great except when trying to convert the LIKE statement which I have manually attempted to convert with a function that I have included at the end of the post. The code…
DNapoleon
  • 41
  • 4
2
votes
2 answers

VB.net adding parent and child records to MySQL db

I was asked to create a program that inserts records into one parent table and multiple child tables. My question is, how do I know what the PK is for the parent table, so that I may add it as a FK in the child? The PK for the parent is an auto…
jason
  • 3,821
  • 10
  • 63
  • 120
2
votes
3 answers

What does "R"c mean when mapping a network drive using this function

I copied code to map a network drive from http://www.vbforums.com/showthread.php?t=616519 to map the drive and http://cjwdev.wordpress.com/2010/05/30/delete-network-drive/ to delete the drive. I want to know what "R"c means in this code: …
pulsar27
  • 43
  • 3
2
votes
1 answer

IO/File In VB.NET 2010

I'm working with text files. Actually one file, where I have to copy information to it. I'm using streamReader and streamWriter. But I'm having an error whenver I close the file and try to open it again. I can't open it again to start writing from…
l3_08
  • 191
  • 1
  • 4
  • 13
2
votes
2 answers

Free deployment for Visual Basic 2010 Express application that requires admin rights

I'm using VB.Net and Visual Basic Express 2010. I'm looking to create a single .exe install file to distribute my application. But in order for my application to work, I need to mark my app. as requiring admin rights. Click Once is not really an…
2
votes
2 answers

VB.NET, Classes & Modules Vs Functions

I have started learning VB.NET lately and have read 1 Step-By-Step beginners book and am now moving onto an Advanced book and both have failed to really explain what the point in modules and classes are. Are modules and classes simply ways to…
Chris
  • 512
  • 1
  • 16
  • 33
2
votes
1 answer

How to set the title for the first column of DataGridView (RowHeaders column) in VB.NET

How to give title in RowHeaders datagridview in VB.NET? by that I mean circled the color in yellow in the screenshot below. note : I use vb.net 2010 Thanks roy
roy
  • 693
  • 2
  • 11
2
votes
6 answers

Split a string into 2 different substrings vb.net

I'm trying to split a string into 2 subs. The first contains the first 236 (0 to 235) chars and the second one from 237 to the end of the string. firststr = str.Substring(0, 235) secondstr = str.Substring(235, strLength) 'strLength is the total…
l3_08
  • 191
  • 1
  • 4
  • 13
2
votes
1 answer

how to if combobox selection then directly checkbox unchecked in vb.net

How if ComboBox selection then directly CheckBox unchecked? Private Sub ComboBox1_SelectionChangeCommitted(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ComboBox1.SelectionChangeCommitted Me.TextBox1.Text = "" …
roy
  • 693
  • 2
  • 11
2
votes
3 answers

Querying SQL Server repeatedly (loop) is taking up memory that doesn't release back into the system

I have a VB web application that reads from a CSV file which contains about 300,000++ lines. The application will read line-by-line and for each line, it will query a table in a sql server database which contains about 100,000++ records and based on…
Twisted Whisper
  • 1,166
  • 2
  • 15
  • 27
2
votes
2 answers

System.Data.SqlClient.SqlException: 'Incorrect syntax near '​'.'

I get this SQL Server error and I can't figure out where the trouble is: Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it…
Mr Khan
  • 21
  • 3