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.

36 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
8
votes
1answer
693 views

Function that recursively downloads entire directory is slow

I created this function to recursively copy an entire directory from an FTP server. It works just fine except that it is about 4 times slower than using FileZilla to do the same operation. It takes ...
4
votes
0answers
141 views

Comparing two instances of a class

I have a Calculation class. It is persisted in the DB and users can modify it. The aim of the CompareWith function is to ...
4
votes
0answers
66 views

Implementing a StringEnum

This is to be used like an Enum (as parameter mostly), but for string (Using .NET 3.5) Actual implementation: ...
4
votes
0answers
207 views

Swapping Tab Order

The code I have below swaps two tabs around. This is done through creating an array, deleting all tabs and then recreating them which seems very inefficient to me. ...
4
votes
0answers
737 views

Wrapping a GridView with custom controls

My aim is to create a server control which inherits from a GridView and outputs the basic output wrapped in external markup, including other controls. For example, the output will look something like:...
3
votes
0answers
77 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 ...
3
votes
0answers
30 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 ...
3
votes
0answers
319 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 ...
3
votes
0answers
49 views

TextFileConvert - dos2ux and ux2dos in VB.NET

This provides text file conversion capabilities like the common Unix utilities "ux2dos" and "dos2ux". I needed the capability to perform Unix text file conversions, round trip, within a VB.NET ...
3
votes
0answers
145 views

Custom task timer

This code (Windows Forms) shows a series of timers so that the user can manually time a series of tasks. I decided to put this together today because next weekend I want to go through an activity (...
3
votes
0answers
468 views

Event-driven UDP listener wrapper

I wrote this wrapper around the UdpClient,using events for new datagrams: ...
2
votes
0answers
148 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 ...
2
votes
0answers
48 views

vb.net Create textfile from template

What is the best approach for creating textfiles from/with a template ? Currently I just read the template from a textfile and Replace all values needed, but I don't think that this is the most solid ...
2
votes
0answers
71 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: ...
2
votes
0answers
90 views

Recursive/traversal search of items using EWS managed API in subfolders too

I would like to know if there's a more efficient way of querying items than this (that works, though): ...
2
votes
0answers
41 views

Interface approach of logging channel and exclude of specific log channels

I have library which sending/logging information by diffrent log channels like by email, sms or save to file. It works fine but i would like to get your opinion and get code review regarding my ...
2
votes
0answers
187 views

Draw a panel control with a sunken look

I am relatively new to visual studio. I am in the process of creating a custom control and the same time learning. I have put together the beginning of this control and will love to get some input. ...
2
votes
0answers
260 views

Binary addition in VB.net

It starts by taking two user input from the console and putting them into strings. I then pad them to get them to the same length. I get the length of the num1 and assign it to the integer len. I then ...
2
votes
0answers
263 views

Passing a form reference for accessing control in other class

I have a form and one other class that basically maintains initialization state of the form (in this case, loading data from Json file to controls in form). My form code: ...
2
votes
0answers
55 views

Updating Excel sheet with information from a DataTable

Basically, I'm trying to update an excel sheet using a DataTable (The columns structure between the two are not the same) with respect to the following rules: ...
2
votes
0answers
72 views

LightsOut - A homework framework for teaching CS to non-engineers

This provides a fill-in-the-blanks homework framework to implement the game "LightsOut". LightsOut is a game with a grid of lights. When you touch a light, it toggles it’s state; it ALSO toggles the ...
2
votes
0answers
895 views

Find and replace text inside text boxes in MS Word

I have this procedure to realise a find and replace on a word document. Since I have text boxes, using this way to do this is a bit a slower than what I'd like it to be, if it were just text on a ...
2
votes
0answers
53 views

Requesting information about people from a web API

I'm requesting from a web API information about 20,000 people that I need to update continuously at lightning speed (the web server doesn't throttle the number of requests). I can request an update on ...
2
votes
0answers
42 views

Creating an Excel sheet and appending namings for a matrix

I'm working on some VB.Net code to generate data sheets for giving user rights on a per folder level. I came up with this code but it's very slow and I feel like it could be improved. ...
2
votes
0answers
124 views

Multithreaded download of images from a spreadsheet

I've been wanting to go async with my HTTP calls but all the methods I tried have not worked, so I resolved to implement this as a task and then improve upon it. This is what I've come up with so far....
2
votes
0answers
27 views

Validate User By Comparing against SQL Data

I'm currently building a Windows Form Application using Visual Studio 2015 and the Visual Basic.NET programming language. On the main form there is a Tab Control and an ActiveX PDf viewer control. ...
2
votes
0answers
222 views

Web API 2 Controller for third party services for multiple organizations

I'm putting together some RESTful services using ASP.NET Web API. This is the first time I have done this, so I'm looking for general feedback on this controller to make sure I'm not doing anything ...
1
vote
0answers
37 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 ...
1
vote
0answers
26 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 ...
1
vote
0answers
209 views

Read data from Google Sheets API and populate a class

I have data stored in a Google Sheet. The aim of this program controller is to read this data from an MVC controller, and populate a class (Model) with it. I will skip most of the intermediate ...
1
vote
0answers
29 views

Copy / paste special excel row

This is part of Invoice. If I have 20 items of it I need to copy nth row (because end user set format only on few cells in nth row) so to keep it formated I need to copy entire row and paste it ...
1
vote
0answers
191 views

Optimizing Levenshtein Distance with nested loop

Brief illustration: I have 2 classes - tbCustomer and tbDHN which is stored inside a list....
1
vote
0answers
717 views

SSRS: code function to sanitise HTML for rendering in RDLC report

Background I have an RDLC that among other things displays text coming in that is captured in SharePoint, using a custom control (TinyMCE) that exposes limited formatting options to users. The SSRS ...
1
vote
0answers
219 views

Business Access Layer and Data Access Layer for a database application

Would like to get your opinion and any advice regarding my current approach of creating database applications. Below find my current approach. Counting on your opinion and comments including examples ...
1
vote
0answers
29 views

Get percentage on the fly with AND and LIKE

Aim: Get percentage based on if field is blank or not Issue: Unknown amount of variables based on search and thus speed Solution: Dynamic SQL build up Looking for: Tips to speed up even more/spot ...
0
votes
0answers
51 views

Extract value from a database and populate objects

I have a database, with some history data for a lot of tags (ie. measurement points in the plant). Users supply a calculation script, and get the result of the calculation as a result. The main ...