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
0 votes
0 answers
32 views

Filing system post editor

I'm on holiday this week and wanted to have a look at my filing system. It is a WinForms application in VB.NET (.NET Framework 4.8). The idea is that, like in a classic internet forum, you have ...
4 votes
1 answer
148 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: ...
6 votes
2 answers
4k views

AES File Encryption / Decryption

I've been looking for a while for the right code to encrypt/decrypt files with AES in vb.net. I created the code below. Is this the right way doing AES encryption/decryption nowadays? ...
1 vote
1 answer
34 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 ...
2 votes
0 answers
73 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: ...
4 votes
1 answer
115 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 ...
0 votes
0 answers
18 views

Database operations classes and currencies class

I work on a project that is dealing with two databases (Mysql Db on Internet + Sqlite Local Db). I will explain what I do with my project to build the codes: firstly I have (Class "ClsMysql"...
1 vote
0 answers
31 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 ...
1 vote
1 answer
113 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 ...
0 votes
0 answers
67 views

Building an array of KeyboardButton objects in a ReplyKeyBoardMarkup for a Telegram Bot

I asked my original question and based on the answers got a version working. Essentially, I created a reply keyboard from the available product codes in my database table, with one button per row. ...
0 votes
0 answers
10 views

Data optionally observable

I have a controller whose role is to persist some data into an external resource (could be a file, database, or anything else). This class takes generic objects, which may implement ...
0 votes
1 answer
21 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 ...
2 votes
1 answer
52 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 ...
2 votes
1 answer
37 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/...
1 vote
2 answers
5k views

Selecting from a database into a DataGridView

I have a piece of code which grabs data from an SQL database and displays it in a DataGridView. This code works perfectly fine for me. It has been pointed out to me that the below code is bad ...
1 vote
0 answers
47 views

Addition/removal of entities in EF6 many-to-many architecture

Is there a way to do this many-to-many update with less code? It feels awfully bulky to me. I started out using AutoMapper to avoid the explicit value assignments, but then the mapped ...
6 votes
1 answer
4k views

VB.NET class for MySQL CRUD

I wrote this code for a few basic CRUD (Create, Read, Update, Delete) applications, but I think it can be improved and refactored. I have 3 SELECT type functions(return a table, return a value, return ...
3 votes
0 answers
27 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 ...
3 votes
0 answers
52 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 ...
2 votes
1 answer
92 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 ...
-4 votes
2 answers
57 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 ...
1 vote
1 answer
41 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 ...
5 votes
1 answer
7k views

Encrypt Using AES

I'm using Microsoft's example for encrypting/decripting a string. In their example, they are using Tripple DES. I'm trying to convert their code to use AES. The modified code, listed below, works. ...
1 vote
1 answer
35 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 ...
-2 votes
1 answer
73 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? ...
3 votes
0 answers
367 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 ...
6 votes
1 answer
609 views

HackerRank ACM ICPC Team

You are given a list of \$N\$ people who are attending ACM-ICPC World Finals. Each of them are either well versed in a topic or they are not. Find out the maximum number of topics a 2-person team can ...
1 vote
0 answers
42 views

Password validation class using database values

I have a password validation class that takes values from our database and depending on their values, checks if the password is valid. If it is not, I built an error message containing everything that ...
3 votes
0 answers
33 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 ...
2 votes
1 answer
55 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. <...
2 votes
1 answer
90 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 ...
1 vote
1 answer
1k views

Digital persona fingerprint verification takes a lot of time

I'm using Digital Persona U.are.U 4000b fingerprint reader and I have this function that verifies the fingerprint from SQL server My problem is the loop because it takes a lot of time to compare the ...
2 votes
0 answers
288 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 ...
0 votes
1 answer
52 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, ...
2 votes
1 answer
90 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 ...
1 vote
1 answer
28 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 ...
2 votes
0 answers
42 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 ...
4 votes
1 answer
727 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 ...
4 votes
1 answer
47 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 ...
1 vote
0 answers
28 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 ...
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 ...
7 votes
3 answers
1k 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 ...
1 vote
1 answer
263 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 ...
3 votes
1 answer
115 views

Unit test for a method that populates a dictionary from an API call

I am building a unit test for a method that populates a dictionary from an API call (responding with JSON): ...
2 votes
1 answer
289 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 ...
2 votes
1 answer
336 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 ...
1 vote
1 answer
435 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 ...
0 votes
1 answer
18 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 ...
6 votes
3 answers
701 views

Shutdown Delay Program

I wrote this program a while back that would allow me to set a delay, say 3 hours, and when the delay had expired, my PC would turn off. The purpose of it was so I didn't have to leave my PC on all ...
3 votes
0 answers
532 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 ...

1
2 3 4 5
7