Skip to main content
Share Your Experience: Take the 2024 Developer Survey

Questions tagged [vb.net]

Visual Basic .NET (VB.NET) is an object-oriented computer programming language that can be viewed as an evolution of Microsoft's Visual Basic 6 (VB6) but implemented on the Microsoft .NET Framework.

Filter by
Sorted by
Tagged with
2 votes
1 answer
24 views

An enhanced ExecuteReader method in VB.NET

The idea was creating and preparing a SqlCommand, and call ExecuteReader with the appropriate command behavior. If we created and opened the connection, we want the connection to be closed when the ...
user10191234's user avatar
8 votes
2 answers
208 views

The Never-Ending IFs

Note: the answer can come in either VB.NET or C#. I have no preference for this Q&A. I'd like to tame the monstrosity I've created below. The requirement is to obtain some input from the user and ...
InteXX's user avatar
  • 211
0 votes
0 answers
57 views

Play simultaneously to multiple soundcards with NAudio

I am working on an audio player application on .NET and am using NAudio as the base class. I need this app to be able to play one file simultaneously to more than one soundcard. I've read about it ...
ZP142's user avatar
  • 1
1 vote
1 answer
72 views

Increment sequence value for multiple styles

I've found several examples of code to increment various sequence values but they are usually specific to either alpha characters or numeric characters. I wanted something that could increment a ...
G_Hosa_Phat's user avatar
0 votes
1 answer
58 views

Avoid Boolean as parameter for constructor | Complex Number Calculator

I have written a class in VB.NET that has the task of applying various arithmetic operations to two complex numbers. The class can also determine the magnitude and phase of a complex number. The ...
Daniel's user avatar
  • 229
0 votes
1 answer
98 views

Fill TextBox from ListBox on click

I have a form in a WinForms application that has a Textbox called txtSupplier, a button called btnSrchSuppliers, a label called <...
user10191234's user avatar
-2 votes
1 answer
98 views

Splitting array into smaller arrays with maximum "chunks" [closed]

I wonder if there is a nuget that can do this already Anyway, here is my code ...
obfuscated's user avatar
0 votes
1 answer
114 views

Validate 10 digits on a few conditions

I want to write a function that validates the German tax identification number (Steuer-ID). The identification number consists of eleven digits. The last digit is ...
Daniel's user avatar
  • 229
3 votes
0 answers
83 views

Convert different address formats to German one

I would like to find out which address format is input and convert it to the German format. Examples: 5, Rue de l'exemple is luxembourgish. ...
Daniel's user avatar
  • 229
1 vote
1 answer
247 views

Serial port class wrapper for serial port object VB.NET

I've been reviewing some code that I maintain recently, and I came across this wrapper object for the serial port class. I'm trying to understand the advantage of this seemingly redundant object: <...
Pslice's user avatar
  • 162
4 votes
1 answer
172 views

Parse floats to a custom numeric format string

I'm working to implement a custom string format. These are the float values to convert into a string: ...
jms2505's user avatar
  • 43
1 vote
1 answer
85 views

Reliably setting keys in Windows Registry for a VBA addin

We have a PowerPoint VBA addin which is installed using an MSI installer written with WIX (Windows Installer XML). For the addin to be picked up (for all users) by PowerPoint, name-value pairs need to ...
neilt17's user avatar
  • 205
2 votes
0 answers
152 views

Creating a simple one-dimension Sobol sequence generator

A Sobol sequence, a series of low-discrepancy quasi-random numbers in range [0,1], can be generated by first initializing a vector of direction numbers: ...
user avatar
5 votes
1 answer
719 views

Read an image file as greyscale byte array

I use the Emgu.CV wrapper to create a grayscale image. The data of this image are to be copied into a 2D byte array. Is there a more elegant solution than mine? I'm asking here at CodeReview because ...
Daniel's user avatar
  • 229
1 vote
0 answers
60 views

Showing synced lyrics of mp3 music in vb.net

I wrote a program that syncs the lyric of an MP3 song and displays the text as a subtitle when playing the song, but my code for this is too Unprofessional and weak. Is there a way to display it more ...
vahid Araghi's user avatar
1 vote
1 answer
185 views

My 3D to 2D graphics algorithm is being a bit slow

With my VB.Net Windows Forms application, I would like to rotate and project a 3D object. The program works so far, which is why I'm reporting here and not Stack Overflow, but it's slow. I've already ...
Daniel's user avatar
  • 229
0 votes
1 answer
23 views

Rotation Management Application

My code works just fine but it seems like I have too many variables which could confuse people from what the code does. Any ideas? Or does this look fine. Feel free to add any other tips to make my ...
madine816's user avatar
2 votes
1 answer
60 views

String formatting

My requirement is to format the input values to a particular format as "##.###/##.###" Example - My input value can have alphabets, alphanumeric, numeric Expired -- > if alphabet, output ...
user241512's user avatar
2 votes
1 answer
261 views

Reading from a text file into a structure and posting to list boxes

I am trying to stay ahead of my Year 12 Software class. Starting to work with records and arrays. I have answered the question, but the solution feels very clunky. I am hoping someone has suggestions/...
Damian Perry's user avatar
3 votes
0 answers
42 views

Organizing and accessing data in xml database - VB.Net

So I made an XML database for my music player where I store songs data (title,artist,album,genre,year) the code for generating the database is working but slow as heck, the code works as following ...
Anes Hamdani's user avatar
3 votes
0 answers
71 views

I want to clean up this console app calculator (VB.net)

Getting started in VB.net I've written this console calculator based heavily off Nicholas Dingle youtube channel (in case it looks familiar). What I want to do is have a separate sub called ...
wesley delk's user avatar
2 votes
1 answer
201 views

VB.net SQL match against Excel data to datagridview

I am importing an Excel sheet where the first column will contain product numbers. I match those numbers to my SQL database and display the product number and description of the matching products to a ...
Nick's user avatar
  • 23
-4 votes
2 answers
66 views

Returning employee balances

Here is the code for balance retrieval from EMPLOYEES record. Please simplify and improve it accordingly. It is working fine and I have no problem with it but I believe that's not the correct way to ...
Adil Numan's user avatar
1 vote
1 answer
54 views

String Concatenation and Comparison

I have the below code. I have list of status which contain may contain 4 values. R,UR,DO,NDO based on this list. i need to convert to Y,N values If list contains R the Readstatus="Y" If list ...
Avinash Reddy's user avatar
-2 votes
1 answer
85 views

Calculate draws faster in VB.Net [closed]

I created this calculation algorithm, unfortunately, it works a little hard for more combinations. How should it be improved for faster operation? ...
Norisor Marius's user avatar
3 votes
0 answers
431 views

Creating SQL Server Database Users Dynamically from User Input

The Application I have an application in testing that runs off of an MS SQL Server database. The app allows users to authenticate using Windows authentication (that is, using the Windows username the ...
Keith Stein's user avatar
3 votes
0 answers
41 views

Retrieving Registry nodes for HKLM

I am using the below code to retrieve nodes and values. It is taking 20 mins to retrieve the nodes and values of HKLM. I'm expecting to reduce the retrieving time ...
Sankar S's user avatar
2 votes
1 answer
66 views

Retrieving HKLM nodes of Windows10 Registry

I have used below code, code is working fine, also retrieved the data, but there are performance issues. Retrieving the HKLM registry nodes is taking around 6 mins time. Please suggest any solution. <...
Sankar S's user avatar
2 votes
1 answer
151 views

Cookie value to enum

Users can have a Cookie called lang that contains either the value "default=1" (English) or "default=2" (French). This cookie is used to determine their preferred ...
Word Rearranger's user avatar
2 votes
0 answers
393 views

Is this an acceptable MVVM Model with IEditableObject implementation?

I'm trying to follow MVVM pattern in a VB.net WPF application, and I would like to implement IEditableObject. Is this code acceptable for an MVVM application? In ...
Notts90's user avatar
  • 141
0 votes
1 answer
170 views

Inizialize an Jarray wih n JObject that contain an progressive index

I need to inizialize an JArray with a JObject that contain a property areaNum that is an incremental integer. Right now I wrote the below code, which works ok if I have a small number of JObjects, ...
Luca Ruggeri's user avatar
2 votes
0 answers
77 views

Inherited class calls initialization code in base class [closed]

I am interested in hearing your opinion on the approach I have taken to have inherited classes initialize their base class. Here's a Machines collection class from that maintains a list of Machine ...
Étienne Laneville's user avatar
2 votes
1 answer
380 views

Validate (Possible) File/Directory Path

I am working on a "comprehensive" library for use in my internal applications and I have created a working method (as far as all of my testing has shown thus far) to ensure that a file/directory path ...
G_Hosa_Phat's user avatar
1 vote
1 answer
48 views

Cascading interfaces for wrapping VSTO Microsoft.Office.Interop

I have created my own wrapping framework for the COM interfaces exposed via Microsoft.Office.Interop. MIRRORING WRAPPERS The first purpose is to be able to unit ...
Ama's user avatar
  • 265
1 vote
1 answer
41 views

Assigned a System resource to an image based on variable

I have a mapping application and the marker I'm using is based on the field rep assigned to that visit. My code is just a Select Case based on the rep's name and then it sets the bitmap for that ...
Elwood472's user avatar
4 votes
1 answer
74 views

Use a delegate to assess equality

I have built my own generic class to implement IEqualityComparer(Of T), which takes a delegate as an input for the constructor. This delegate takes two objects of ...
Ama's user avatar
  • 265
1 vote
0 answers
37 views

Console app to get XML from API and save to database

I am making a small console app to get XML from an API and then save the data to a database. While this project was not created via test-driven-development, I have tried to make it such that tests can ...
Michael Brandon Morris's user avatar
8 votes
2 answers
1k views

ROT13 encoder/decoder

This is a simple utility, intended to sit on the desktop for when needed, that does the simple ROT13 encoding and decoding. I am used to coding in VBA, and I am interested in more .Net idiomatic ...
AJD's user avatar
  • 2,346
7 votes
3 answers
2k views

Convert integer to full text string duration

I have a function I have written in VB for use in SSRS 2012. It takes an integer and converts it to full text duration - for example 900 becomes "15 minutes", 9000 becomes "2 hours 30 minutes", and ...
BishNaboB's user avatar
  • 173
2 votes
1 answer
577 views

Encrypts using AES GCM for data with limited visibility and long rest

This is the third iteration of my venture on creating an encryption/decryption solution. I asked a question here, which led to this question here, which led to this answer here, which led me to ...
user1447679's user avatar
1 vote
1 answer
884 views

Encrypts using AES with random initialization vector meant for data with limited visibility and then long rest

I've done some research, reviewed countless SO questions that appeared similar, leading me to endless rabbit holes. My solution is working, but I don't like it. I want to create a random IV for AES ...
user1447679's user avatar
1 vote
1 answer
368 views

Optimization - open excel file from VB.NET using interop

I have a simple app, which is something like a launcher for my macro enabled excel workbook. I made it for easier distribution, to be able to check if excel installed and also to make it look and ...
Martin Krejčí's user avatar
3 votes
1 answer
372 views

Interactive auction board

An exam requires me to create a program for an interactive board for an auction: An auction company has an interactive auction board at their sale rooms, which allows buyers to place bids at any ...
abdullah ahmad's user avatar
0 votes
1 answer
23 views

Efficiently centralise and manage Groups of Features (aka "lines of services")

I mostly develop AddIns for Office. In the example of MS Word, I have an AddIn which allows to review drafting style, another AddIn which allows to monitor cross-references, another Addin which allows ...
Ama's user avatar
  • 265
3 votes
0 answers
692 views

Verify OpenSSL RSA signature (PHP) with .NET (VB)

I would like to achieve something I believe is pretty standard: A) My VB.NET client (ideally targetting Framework 4.0) sends a text string to my Apache/PHP Server via an HTTPS POST request. B) My ...
Ama's user avatar
  • 265
4 votes
1 answer
925 views

Iterating over combinations

Background The following describes the real world problem that my code is intended to solve. It is may help you understand what the code is doing and why. I don't think this is strictly necessary in ...
Blackwood's user avatar
  • 209
1 vote
1 answer
1k views

Function to return the closest Date to Today (inclusive) from Ordered list

The way I've written this feels clunky. Particularly, it feels like I shouldn't need to have both a 'dateToCheck' and 'selectedDate' variables. The objective is to find the Date in a list that is the ...
JTech's user avatar
  • 143
4 votes
2 answers
737 views

Detect file type using file signatures

My program has to detect the real file type of a given file using signatures. For now I'm just checking JPG, but I want to add more. ...
Milton Cardoso's user avatar
1 vote
2 answers
167 views

Outlook VSTO: Fastening email loop on a large pst file

In a Outlook VSTO Addin I needed to loop through a large pst file (e.g 30GB containing 50k+ mails). Following code block loop the pst file folder by folder recursively. It takes huge time (1hour+) to ...
Hayat Hasan's user avatar
2 votes
0 answers
83 views

One class for MySQL and MSSQL Queries

EDIT BELOW I am trying to create resusable classes for MSSQL and MySQL queries (later also Update and Delete queries). I tried it doing the OOP-way. Here is my result: Einstellungen.vb: ...
PRCV1's user avatar
  • 21

1
2 3 4 5
7