Structure member name conflict rules
Hello When using Structures: Public Structure Blah Public Name As String Public Home As String End Structure I have 2 strings: Name and Home, does it matter for the variable names inside the Structure to be unique? ie if I have another string…
Rename mdb column
Hello I use Access Database Engine and OleDbReader to work with mdb and accdb files, need to rename a column: "ALTER TABLE xc RENAME Column old new LONG" Searched and found ADE might not support it, what if I add a new column and drop the old…
WebClient Timeout
Hello, I used many WebClient : OpenRead, UploadValues, DownloadString, DownloadStringAsync, DownloadFileAsync in my app. Need to set a timeout for each one and found this code, added the Dispose sub myself, needed to check if it's fine to use it? A class…
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…
How to automatically jump to another cell after hitting enter
Hello All, is there a way to automatically move from the current cell to a specified cell after pressing enter or tab? For example: After entering data in cell H2 and pressing enter, cell H3 is selected. If I press tab, then cell I2 is selected. …
DirectoryInfo GetDirectories Reverse
Hello, Using this code and need to reverse the list returned by GetDirectories: Dim di As New DirectoryInfo(path) Dim di2 As DirectoryInfo() = di.GetDirectories How to reverse di2 list? Thanks :)
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 …
How to get the handle of the mouse cursor icon with API (GetCursorInfo)
hi I need a function to put in the timer and check the status of the mouse cursor every 500 milliseconds. Private Declare Function GetCursorInfo Lib "user32" (ByRef pCI As cursorInfo) As Integer Public Structure POINTAPI Dim x…
How to create the Left/Right MouseDown And MouseUp click event of Global type(Anywhere from Windows with API)
hi .Require mouse events via API functions
ComboBox before drop down event?
Hello I'm looking for an event in ComboBox in .net framework WinForms which fires before the drop down menu is going to drop, when DropDownStyle is set to DropDown, so when user clicks on the far button, I add some items to the list on the fly and then…
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)…
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…
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…
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.
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…