Questions tagged [vb.net]

Visual Basic.NET (VB.NET) is a multi-paradigm, managed, type-safe, object-oriented computer programming language. Along with C# and F#, it is one of the main languages targeting the .NET Framework. VB.NET can be viewed as an evolution of Microsoft's Visual Basic 6 (VB6) but implemented on the Microsoft .NET Framework. DO NOT USE this tag for VB6, VBA or VBScript questions.

Microsoft's Visual Basic .NET (VB.NET) is a multi-paradigm, managed, type-safe, object-oriented computer programming language. Along with C# and F#, it is one of the main languages targeting the .NET Framework. VB.NET can be viewed as an evolution of Microsoft's Visual Basic 6, but implemented on the Microsoft .NET Framework. This is reflected in VB.NET's version numbering, which continues from VB6. Although Microsoft decided to drop the ".NET" portion of the language's name in 2005, it is still often referred to that way in order to distinguish it from its predecessors.

This tag should only be used for questions that relate to .NET versions of VB. It should not be confused with , , or . Although those languages share a similar syntax with VB.NET, they are entirely different technologies.

To date, the following versions of VB.NET have been released:

VB.NET is supported on a wide range of platforms:

Popular VB.NET questions on Stack Overflow

Resources

139808 questions
11
votes
5 answers

How to prevent Visual Studio from "publishing" XML documentation files in web projects?

Note: This question is similar to How to prevent the copy of XML documentation files in a release mode build?, but it's not the same and the answers there don't apply. Read on to find out why. (Please ask in the comments or in chat if you disagree,…
Heinzi
  • 167,459
  • 57
  • 363
  • 519
11
votes
2 answers

Is the c# compiler smarter than the VB.NET compiler?

If I look at the IL that is created in Linqpad for the two following code snippets, I wonder what happens here. In c# int i = 42; results in the following IL code IL_0000: ret whereas in VB Dim i As Integer = 42 it is IL_0000: ldc.i4.s 2A…
Olaf
  • 10,049
  • 8
  • 38
  • 54
11
votes
1 answer

How to get an image from mshtml.htmlimg to hard disk

Without using API? I know there are several way. I am using mshtml library by the way, which is better than webbrowser control. I am effectively automating internet explorer straight. Basically I prefer a way to take the image straight without…
user4951
  • 32,206
  • 53
  • 172
  • 282
11
votes
4 answers

ReadOnly Property or property with private set I should use in vb.net?

I Like .NET automatic properties, in C# it so easy to declare readonly property by declaring its set section as private like this: public String Name{ get; private set; } But when I tried that in VB.NET I was shocked that it is not supported as…
Amir Ismail
  • 3,865
  • 3
  • 20
  • 33
11
votes
8 answers

Button disable and enable

I have a vb.net based windows application, where when "GO" button is clicked a bunch of data is loaded into DB. So in my application as soon as "GO" button is clicked I want to just disable it and would like to enable it back when the uploading has…
Justin Samuel
  • 1,063
  • 4
  • 16
  • 30
11
votes
5 answers

Action(Of T) in Visual Basic in List(Of T).ForEach

I have searched high and low for documentation on how to use this feature. While the loop I could write would be simple and take no time, I really would like to learn how to use this. Basically I have a class, say, Widget, with a Save() sub that…
Jason
  • 51,583
  • 38
  • 133
  • 185
11
votes
2 answers

Is there a simple way to implement a Checked Combobox in WinForms

Does anyone know of a simple implementation of a checked combobox in WinForms? I haven't been able to find anything when googling. I want something that behaves like this windows scheduled task trigger edit:
Matt Wilko
  • 26,994
  • 10
  • 93
  • 143
11
votes
2 answers

get value from DataTable

I want to get all column value from DataTable and store it to the ListBox. Here is my code If myTableData.Rows.Count > 0 Then For i As Integer = 0 To myTableData.Rows.Count Dim DataType() As String =…
Flashidkz
  • 313
  • 4
  • 5
  • 13
11
votes
7 answers

Mathematical analysis of a sound sample (as an array of numbers)

I need to find the frequency of a sample, stored (in vb) as an array of byte. Sample is a sine wave, known frequency, so I can check), but the numbers are a bit odd, and my maths-foo is weak. Full range of values 0-255. 99% of numbers are in range…
David Shields
  • 596
  • 1
  • 12
  • 34
11
votes
1 answer

How to Pass MethodName as Parameter of a Procedure in VBNET

I want to create a Procedure that its parameter is also a procedure. Is it possible? I created some procedures to be used as parameters below: Private Sub Jump(xStr as string) Msgbox xStr & " is jumping." End Sub Private Sub Run(xStr as…
John Woo
  • 258,903
  • 69
  • 498
  • 492
11
votes
5 answers

What's the best way to change the namespace of a highly referenced class?

I am attempting to move a highly referenced class from one namespace to another. Simply moving the file into the new project which has a different root namespace results in over 1100 errors throughout my solution. Some references to the class…
Llyle
  • 5,980
  • 6
  • 39
  • 56
11
votes
3 answers

How to create a windows registry watcher?

How to create a windows registry watcher application using .Net, I want this application to watch all the registry hooks and fire an event when a value change, this event will tell the old and new value for that value. Thats possible? how? need just…
Amr Elgarhy
  • 66,568
  • 69
  • 184
  • 301
11
votes
2 answers

RDLC making call to obsolete SecurityAction Enumeration

I'm using Microsoft.Reporting.Webforms version 10 in order to parse an RDLC file and produce a PDF. The RDLC is a simple invoice with a couple of embedded expressions. When I run the application I get an exception that a call to the obsoleted…
m.edmondson
  • 30,382
  • 27
  • 123
  • 206
11
votes
5 answers

DoEvents in .NET

What's the equivalent of the VB6's DoEvents in .NET? EDIT: I have a Sub that takes a long time to do its work. (it has a do-while) when I call it, The form turns white. in VB6 I used to put a DoEvents in the method (inside its do-while) to prevent…
Godfather
11
votes
3 answers

Binary Shift Differences between VB.NET and C#

I just found an interesting problem between translating some data: VB.NET: CByte(4) << 8 Returns 4 But C#: (byte)4 << 8 Returns 1024 Namely, why does VB.NET: (CByte(4) << 8).GetType() return type {Name = "Byte" FullName = "System.Byte"} Yet C#:…
Seph
  • 8,472
  • 10
  • 63
  • 94
1 2 3
99
100