Visual Studio 2022 - VB.Net Desktop application error message hindering functionality
My desktop application developed with Visual Studio 2022 - VB.Net codes, generated an error message that is hindering the functionality of the application. Please see the message below: Severity Code Description Project File Line Suppression…
ToUpper and ToLower first char and first word
Hello, Going to convert the first letter of each word to upper and lower case, to upper is simple, but to lower? System.Globalization.CultureInfo.CurrentCulture.TextInfo.ToTitleCase(---) And to convert the first word of string to upper and lower case, no…
Hold IP and Port
Hello Is there any property/class in vb.net that can be used to hold an IP address and Port number? In vb.net , .net framework 4.0, thanks.
Create accdb or mdb from code
Hello I can create a new xls or xlsx Excel file with this: "Provider=Microsoft.ACE.OLEDB.12.0;Data Source=D:\x.xls;Extended Properties=""Excel 8.0""" Using ExcelConnection As New OleDbConnection(AboveString) But how to…
Get enum string from integer
Hello I have this enum: Friend Enum Blah As Integer Zero = 0 One = 1 Two = 2 End Enum I will get an integer and need to return the related string. ie will need to convert 1 to One. Select Case InputInteger Case 0 …
Can't locate and add the System.Management.Automation into my project
Dear All, I trying to search and add the System.Management.Automation and System.Management.Automation.RunSpace that available in VS 2019 and using NuGet as well. Unfortunately, no luck. How to add this reference to my VB.Net 2019 (.NET Framework 4.7.2)…
String to Enum?
Hello, How to assign a string to an enum in vb.net? DirectCast([Enum].Parse(GetType(Blah), "Second"), Integer) Option Strict On disallows implicit conversions from 'Integer' to blah. Public Enum Blah First Second Thirds End Enum
Why is Copy / Cut / Paste NOT working in RichTextBox? It works my previous projects.
Hi All, I am unable to "Copy" the text output in a RichTextBox in a project created in Visual Studio 2013. In my previous projects, I can "Copy" text from RichTextBox. I found out on Googling that for RichTextBox, it is necessary to…
Add a row to a TableLayoutPanel at runtime with a textbox in each cell of the row
I've tried and tried to add a row to a TableLayoutPanel but I can't. Can anyone tell me a tutorial to do this? Thank you Fabrizio
Simple Math Opertation
Hello I need to calculate how many parts an SMS text is, the text is US Ascii so here's the long code with minimum of 15 lines: .Length > 0 AndAlso .Length <= 160 Then Return 1 .Length > 160 AndAlso .Length <= 320 Then Return 2 .Length >…
Why drawing 2 Rectangles on a PictureBox by calling twice a "Function for Drawing" shows only the 2nd Rectangle?
Hi All, Given below is my Function (a Sub) for drawing a "Rectangle" on a "PictureBox". I wanted to draw 2 Rectangles side by side. When I called the function for each Rectangle, only the 2nd Rectangle was drawn, the 1st Rectangle was…
How to disable "the attachment is open. don't forget to save the file if you made any changes" error in outlook auto save macro. Every time any new attachment received i got this error
I have a remote system which was working fine for last 3 years but suddenly i am started to received attached error when any new item received in Outlook. My outlook have macro which save all the attachement in specified folders but this error have…
How to extract part of the text from the line with a special format
hi Bolded areas need to be extracted. I don't know how to use Regex library. my Format [One of the tags] is Sample '10LBA04CT004-XQ01' Start text with 150,000 lines and have different tags. thank { N 3-SH 3-sh 3-sh 3-SH N 10LBB09 EQUIPMENT =…
Select Delete commands
Hello, I've been given this samples for insert into and update: Using command As New OleDbCommand("INSERT INTO Table (Column1) VALUES (?)", connection) command.Parameters.AddWithValue("@param1", field1) …
Can I put a cell into the subject line of an auto email from excel?
My job has an excel sheet for employee attendance tracking that send out an email when an edit has been made. However, currently the email subject just shows the name of the sheet (ex. 05-10-24 attendance infraction) and then the email prompts you to…
Define Thread
Hello, In this code: Dim ThreadBlah As New Thread(AddressOf BlahThread) vs Dim ThreadBlah As New Thread(New ParameterizedThreadStart(AddressOf BlahThread)) ThreadBlah.Start Private Sub BlahThread(ByVal InParam As Object) ... End Sub I can define…
How to get the index of duplicate elements along with the range of empty elements after it. LINQ
hi Dim ComplexArray As String() = Split("A C A B C A B A B C") Dim Arr3D = {({"A", ({"0-2", "5-9", "16-16", "19-20"})}), ({"B", ({"10-12",…
How to get the range index of repeated elements. LINQ
Thank Dim MyArray as String()={"A","A","A","B","B","C","A","A"} 'Need Result as Array 0-2 3-4 5-5 6-7
How do I stop an MDI parent form from being resized when moved ?
I have an MDI form (VB.net) which contains about 10 child forms which are permanent and fixed in place and which take up nearly all the whole parent form except for a small margin around the edges and between child forms of about 2px. When I move the…
How do I add a CAPTCHA to a web site written with ASP.NET/VB
A bot seems to be using my web site to send out emails via AmazonSES. I want to add a CAPTCHA to it to prevent this. I came across https://stackoverflow.com/questions/71515717/how-to-add-captcha-in-asp-net-project which appears to be what I want, but…