Catch UnhandledException when Application Framework is off
Hello, When I disable Application Framework: AddHandler My.Application.UnhandledException, AddressOf MyUnhandledException Becomes invalid: UnhandledException is not an event of blah.My.MyApplication Using VB.net WinForms .NET FW 4.0 app, anyone can give…
Search with oledb
Hello I use Access Database Engine and OleDbReader to search within my mdb database: New OleDbCommand("SELECT * From Blah WHERE TheID = ?" + strCondition, conn) strCondition can vary based on the user input: strCondition = " AND…
VB Defaults - VS2022
My VB defaults in Visual Studio are set to Infer Off, Strict and Explicit On. I create a windows forms app in VS2022. It is .Net 8. The form has a button and a textbox and this code shows no errors and runs. Code: Public Class Form1 Private Sub…
![](https://techprofile.blob.core.windows.net/images/ofQD8GBS0U6YYGKocDXMyQ.png?8D8915)
How to run power toy in hidden window?
Dim p = New Process() p.StartInfo.WindowStyle = ProcessWindowStyle.Hidden p.StartInfo.CreateNoWindow = True p.Start("C:\Program Files\PowerToys\WinUI3Apps\PowerToys.Settings.exe") After running this code, the setup window still appears. Is…
how to fix Cannot send a content-body with this verb-type with a Post request
I have a VB.net app that is trying to send a post request to get a token. However, I get the error above. Below is a snipit of the code in question. Dim client = New RestClient(stTokenURL) Dim request = New RestRequest(Method.Post) Dim…
Select from table
Hello Using Access mdb with OleDbRader (Access Database Engine) to select all: "SELECT * FROM tabke WHERE clmn = 'blah'" This might return 100 items, how can I use select to read from number 5 to 50, for example? Possible? Thank you all
Limit the rows in Access table
Hello Is it possible to limit the number of rows in each Access mdb database table? Will need to apply the limitation via VB.NET OLEDB and using Access database engine. Thanks.
![](https://techprofile.blob.core.windows.net/images/oZy-DvHL5UC1mJTFG3q7Zw.png?8D8D1D)
Copy List Of String to another List Of String
Hello I need to know the difference between the 3 paths to my goal: Dim MyList as New List(Of String) MyList.Add(str1) ... and so on ... Dim NewList As New List(Of String) Now I have 3 ways: 1 NewList.AddRange(ResumeFailed) 2…
WebClient via EndPoint
Hello When using WebClient to send and/or receive data, how can I pass an EndPoint instance to the WebClient to connect via the specified IP and…
![](https://techprofile.blob.core.windows.net/images/J_TYKjg7AEiX7AvF9jc5sA.png?8D8651)
Make KeyChar Accept Decimal
Hi I am trying to build a custom calculator to make my data entry more efficient. I am trying to limit a textbox in Visual Basic to only accept one decimal point. So far this code only accepts integers and the Backspace button. Dim Ch As Char = e.KeyChar…
Make Class disposable
Hello, Here's a class I use to log off the user, etc, the usage: Dim IExitWindows As New WinExitClass IExitWindows.PowerOffWindows() How can I make this class disposable? Couldn't figure out how to add disposable so instead of: Dim IExitWindows As New…
![](https://techprofile.blob.core.windows.net/images/J_TYKjg7AEiX7AvF9jc5sA.png?8D8651)
Unable to set my 'Busy Status' in outlook when replying to a meeting invite?
I can't seem to set my 'busy status' (free, busy, out of office etc) during the 'response' screen when replying to meeting invites. Do I need to manually set this for each meeting by selecting from my calendar after responding to the email invite? I am…
.net framework forward compatibe?
Hello, my app in .net framework 4.6.1 runs on Windows 8.1 with .net 4.5.1, but why? On a new Win8.1 setup, .net framework 4.5.1 is pre-installed, but I have set my app to require minimum .net 4.6.1, so why it should run on lower .net versions? Very…
Get data with post method using webclient
Hello There's a POST sample at the bottom of this page: https://ws.interfax.net/admin.asmx?op=GetAccountPPCardsBalance2 Sample HTTP POST request and response. The placeholders shown need to be replaced with actual values. POST…
Show form from thread
Hello, How can I call / invoke this code from inside thread? Using F As New blahForm F.Text = "xyz" F.Tag = "abc" F.ShowDialog(Me) End Using I think Invoke(Sub() ...) is single line command? If InvokeRequired then... Thanks :)
How to get the text from the label by the handle with specific coordinates on any part of the desktop screen
I want to extract the text inside the label by giving certain coordinates from the screen, if the type of the coordinates is from the label, then extract the part of the obtained part.
![](https://techprofile.blob.core.windows.net/images/hBj0LQgf0UCJ70ENoTldCA.png?8DB7E4)
![](https://techprofile.blob.core.windows.net/images/bpqI_wINOUGg4BYYipkUVA.png?8D827C)
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",…
![](https://techprofile.blob.core.windows.net/images/hBj0LQgf0UCJ70ENoTldCA.png?8DB7E4)
How can I open Microsoft Excel in Visual Basic.NET
I am using Visual Studio 2023 for using Visual Basic. I have latest version of Microsoft Office. I want to open Excel using Visual Basic (not VBA). Please tell me how to go about it. It is very important for me.
Webrequest populate UserAgent and Headers
asp net version 2.0 asp.net forms with vb.net Dim strData As String = String.Empty Dim wr As HttpWebRequest = Nothing Dim wrRes As HttpWebResponse = Nothing wr = DirectCast(WebRequest.Create(URi),…
Query is too complex.
Hello To delete many selected records at once: In a loop I populate question marks: QuestionMarks = QuestionMarks + "?, " Then: "DELETE FROM table WHERE theID = ? AND fld IN (" + QuestionMarks + ")" And: For Each MyRow As…