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
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
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
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

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
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
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
Connect VB6 IDE to TFS
VB
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

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


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
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 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
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
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
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
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
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
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
Highlight and Unhighlight in record navigation
Wasted my time here. No help offered so request withdrawn.