2,882 questions with VB-related tags

Sort by: Updated
2 answers

p/invoke usage

Hi Anyone can confirm if my p/invoke definition and usage is correct? <DllImport("dwmapi.dll", CharSet:=CharSet.Unicode)> Private Function DwmSetWindowAttribute(ByVal hwnd As IntPtr, ByVal attribute As UInteger, ByRef pvAttribute As…

VB
VB
An object-oriented programming language developed by Microsoft that is implemented on the .NET Framework. Previously known as Visual Basic .NET.
2,882 questions
asked 2025-06-15T09:20:08.06+00:00
StewartBW 1,700 Reputation points
edited an answer 2025-06-15T15:12:23.4766667+00:00
RLWA32 49,301 Reputation points
1 answer One of the answers was accepted by the question author.

Close service handle

Hi, I'm using this code to change the service start type, I think not possible in .NET 4.8 natively? <DllImport("advapi32.dll", SetLastError:=True, CharSet:=CharSet.Unicode)> Private Shared Function ChangeServiceConfig(<[In]()>…

VB
VB
An object-oriented programming language developed by Microsoft that is implemented on the .NET Framework. Previously known as Visual Basic .NET.
2,882 questions
asked 2025-06-14T13:12:50.3866667+00:00
StewartBW 1,700 Reputation points
commented 2025-06-15T09:05:09.6233333+00:00
RLWA32 49,301 Reputation points
1 answer One of the answers was accepted by the question author.

Before calling Service.Stop

Hi experts, Using MyService As New ServiceController("BlahService") If MyService.CanStop = True AndAlso MyService.Status = ServiceControllerStatus.Running Then MyService.Stop() MyService.Close() End Using Is my usage correct? I mean before…

VB
VB
An object-oriented programming language developed by Microsoft that is implemented on the .NET Framework. Previously known as Visual Basic .NET.
2,882 questions
asked 2025-06-14T14:41:11.9066667+00:00
StewartBW 1,700 Reputation points
accepted 2025-06-14T14:52:08.5333333+00:00
StewartBW 1,700 Reputation points
1 answer

Button.Image issue with high dpi

Hi experts, WinForms .NET Framework 4.8 app, Button.Image property is not handled correctly when the app runs in 100% dpi or larger dpis. The image is only shown correctly in dpi 150% (app is also designed in dpi 150%) Monitor is 4K and default dpi is…

VB
VB
An object-oriented programming language developed by Microsoft that is implemented on the .NET Framework. Previously known as Visual Basic .NET.
2,882 questions
asked 2025-06-09T20:05:21.6+00:00
StewartBW 1,700 Reputation points
answered 2025-06-12T07:21:49.0533333+00:00
Castorix31 90,191 Reputation points
0 answers

How do i install a click-once application from the browser

For many years I have been developing and updating an application in VB.Net using 'click-once' in VS. I have only been able to install it using FireFox. Recently (since about a week ago) I have been unable to install or upgrade the application. There…

VB
VB
An object-oriented programming language developed by Microsoft that is implemented on the .NET Framework. Previously known as Visual Basic .NET.
2,882 questions
asked 2025-06-12T05:19:50.35+00:00
Harry Meadows 0 Reputation points
2 answers

Why Microsoft.net uses 100% of my gpu?

High gpu and cpu usage. This trigger only when i plugged in and use the internet. How can i fix this?

VB
VB
An object-oriented programming language developed by Microsoft that is implemented on the .NET Framework. Previously known as Visual Basic .NET.
2,882 questions
asked 2023-01-19T08:12:53.5233333+00:00
Arnold 0 Reputation points
edited a comment 2025-06-12T00:02:52.88+00:00
William Springer 0 Reputation points
2 answers One of the answers was accepted by the question author.

Detect Target CPU

Hi experts, I asked AI to write a code to detect different PE executable types, ie x64 x86 Itanium Arm etc... Here's the code which seems to be fine with one exception, for processor neutral apps (like if in Visual Studio we select Target CPU: Any CPU)…

VB
VB
An object-oriented programming language developed by Microsoft that is implemented on the .NET Framework. Previously known as Visual Basic .NET.
2,882 questions
asked 2025-06-09T13:34:03.0666667+00:00
StewartBW 1,700 Reputation points
commented 2025-06-11T18:03:49.1166667+00:00
StewartBW 1,700 Reputation points
1 answer

Connect VB6 IDE to TFS

VB
VB
An object-oriented programming language developed by Microsoft that is implemented on the .NET Framework. Previously known as Visual Basic .NET.
2,882 questions
asked 2020-12-23T17:26:41.117+00:00
udi kiany 1 Reputation point
commented 2025-06-10T18:52:40.6333333+00:00
Martin Krohn 0 Reputation points
1 answer

High CPU usage for Classic ASP application - 99% and above

Hello, I need help on understanding how to avoid 99% and above CPU usage? Based web suggestion checked multiple things like DB server, long running query, application new deployment. However not found any help within, could you please help on…

VB
VB
An object-oriented programming language developed by Microsoft that is implemented on the .NET Framework. Previously known as Visual Basic .NET.
2,882 questions
asked 2025-06-10T16:42:48.5933333+00:00
Shivani Vyas 0 Reputation points
answered 2025-06-10T18:50:44.45+00:00
Jose Benjamin Solis Nolasco 3,336 Reputation points
0 answers

Expression in RDLC row group to sort on other field

Hi Gurus, I have a rdlc report that has a group on one of the fields. I pass a parameter to the report which is used to specify sorting on another field but keeping the current grouping. Under Group Properties> Sorting I entered the following…

VB
VB
An object-oriented programming language developed by Microsoft that is implemented on the .NET Framework. Previously known as Visual Basic .NET.
2,882 questions
asked 2025-06-09T15:07:44.3766667+00:00
Hugh Self Taught 101 Reputation points
commented 2025-06-10T15:53:26.0933333+00:00
Hugh Self Taught 101 Reputation points
0 answers

How to write an entry to the Windows Security log shown by Event Viewer

A customer has engaged us to write a piece of software for them that can post entries to the Windows Security log in the Event Viewer (as opposed to the Application log). They're mostly a VB shop. With VB writing to the Windows Application log is…

VB
VB
An object-oriented programming language developed by Microsoft that is implemented on the .NET Framework. Previously known as Visual Basic .NET.
2,882 questions
asked 2025-06-02T17:52:19.64+00:00
dcoup 0 Reputation points
commented 2025-06-10T13:42:26.5533333+00:00
RLWA32 49,301 Reputation points
1 answer

How do I download Visual Basic 6.0?

Hi! I am currently working on a project for one of my classes that involves VBA coding and this specific assignment is asking to create a user form to capture user data. One of the data points to collect is birthdate. I know that I can code a list in the…

VB
VB
An object-oriented programming language developed by Microsoft that is implemented on the .NET Framework. Previously known as Visual Basic .NET.
2,882 questions
asked 2025-06-09T20:46:01.9933333+00:00
Golden, Marcus Caleb 0 Reputation points
answered 2025-06-09T22:16:42.7566667+00:00
Michael Taylor 59,991 Reputation points
0 answers

VB Anonymous Delegate

Hi My app has a new item when seen in IL DASM: VB$AnonymousDelegate_0 The older builds didn't have this; how can I find which code caused this entry to be added inside assembly that is shown in IL DASM? Thanks :)

VB
VB
An object-oriented programming language developed by Microsoft that is implemented on the .NET Framework. Previously known as Visual Basic .NET.
2,882 questions
asked 2025-06-09T14:02:01.5733333+00:00
StewartBW 1,700 Reputation points
1 answer One of the answers was accepted by the question author.

BinaryReader in .Net Framework 4.0

Hi experts, In .NET Framework 4.8, I simply use: Using MyBinaryReader As New BinaryReader(InputStream, Encoding.ASCII, leaveOpen:=True) To leave the InputStream open afterward, however, in .NET Framework 4.0 there's no 3rd parameter so can't…

VB
VB
An object-oriented programming language developed by Microsoft that is implemented on the .NET Framework. Previously known as Visual Basic .NET.
2,882 questions
asked 2025-06-07T11:48:17.93+00:00
StewartBW 1,700 Reputation points
accepted 2025-06-09T10:17:44.6633333+00:00
StewartBW 1,700 Reputation points
2 answers One of the answers was accepted by the question author.

Leave input stream open

Hi After running this code, in VB.NET WinForms Framework 4.0 or 4.8, what happens to InputStream? It will be closed/disposed? I need to leave it open: Thanks. Using MyImage As Image = Image.FromStream(InputStream, False, False) End Using

VB
VB
An object-oriented programming language developed by Microsoft that is implemented on the .NET Framework. Previously known as Visual Basic .NET.
2,882 questions
asked 2025-06-07T09:08:18.6533333+00:00
StewartBW 1,700 Reputation points
accepted 2025-06-08T18:45:11.82+00:00
StewartBW 1,700 Reputation points
0 answers

VBA oledb open connection became slow

In my VBA project the opening of the OLEDB-connection has become really slow. (In the past it worked fast but since some months it has become slow.) It takes 13 seconds to just open the connection. I have tried this with only this coding in my project…

VB
VB
An object-oriented programming language developed by Microsoft that is implemented on the .NET Framework. Previously known as Visual Basic .NET.
2,882 questions
asked 2025-06-08T12:49:38.67+00:00
Nik Marien 0 Reputation points
4 answers

read the first 5 characters of file

hi, user might select any file type, with or without extension, need to get the 5 characters of file without opening and reading the whole file, like ReadAllText help please :)

VB
VB
An object-oriented programming language developed by Microsoft that is implemented on the .NET Framework. Previously known as Visual Basic .NET.
2,882 questions
asked 2022-11-13T19:23:43.683+00:00
S-Soft 666 Reputation points
answered 2025-06-08T07:42:01.65+00:00
milad nikoomanesh 0 Reputation points
0 answers

Why is a VB Project Running 3x Slower on Windows Server 2019 Compared to Windows Server 2008 R2?

I have a 64bit project, created using VS2022 and VB, which used to run on a Windows 2008 R2 server accessing a database on a different server. The project is now moving to run on a Windows 2019 Standard server, accessing that same database on the…

VB
VB
An object-oriented programming language developed by Microsoft that is implemented on the .NET Framework. Previously known as Visual Basic .NET.
2,882 questions
asked 2025-06-05T15:02:55.19+00:00
Rob Birney 21 Reputation points
edited the question 2025-06-07T15:46:03.1033333+00:00
Rob Birney 21 Reputation points
1 answer

How to insert two or more different values under one column name based on parent PK?

Greetings experts, We are designing internal ballot system that will be used to elect members into various positions based on election types.

VB
VB
An object-oriented programming language developed by Microsoft that is implemented on the .NET Framework. Previously known as Visual Basic .NET.
2,882 questions
asked 2025-06-02T16:04:54.6866667+00:00
Simflex 321 Reputation points
answered 2025-06-07T08:03:33.87+00:00
KOZ6.0 6,655 Reputation points
0 answers

Highlight and Unhighlight in record navigation

Wasted my time here. No help offered so request withdrawn.

VB
VB
An object-oriented programming language developed by Microsoft that is implemented on the .NET Framework. Previously known as Visual Basic .NET.
2,882 questions
asked 2025-06-04T13:35:32.8266667+00:00
Anonymous
edited the question 2025-06-06T12:56:13.9166667+00:00
Anonymous