Search:
Type: Posts; User: kareninstructor
Search:
Search took 0.26 seconds.
-
Here is a simple asynchronous method to load a DataTable from SQL-Server, no frill. Make sure to read the readme.md file.
https://github.com/karenpayneoregon/forum-questions/tree/master/SqlSamples
-
If you happen to be using VS2019 I have a code sample that shows how to keep an application responsive.
There are two projects, a class project and a forms project on GitHub.
The objective for...
-
Have you considered using a timeout for the task? The following code default timeout is 3.5 seconds.
Public Class AddressDetail
Public Property Host() As String
Public Property...
-
Hello,
Totally agree with jmcilhinney in regards to thinking through the task by not coding, instead open a document (like Microsoft Word) and writing out requirements. Now write out pseudocode...
-
Entity Framework is not for everyone while it seems that for reverse engineering an existing database VB.NET takes a backseat to C# where there are Visual Studio extensions (like EF Power Tools) and...
-
Hello,
Without seeing what you have coded so far we can't assist you as there are many ways you may have coded this task. More details and a sample of code goes along way.
-
Visual Basic, along with its Application Framework, is supported in .NET 5 and Visual Studio 16.8! Visual Studio 16.8 includes the Windows Forms Designer, so Visual Basic is ready for you to migrate...
-
Microsoft usually provides decent code samples when it comes to new language features although sometimes the code samples provided are not relevant to real world usage. For this reason i have started...
-
Try the following
Imports System.IO
'
' NuGet package below
'
Imports System.Text.Json
Public Class Form1
-
These forums are not about payable services but instead to assist developer. The code I suggested for a non programmer is a challenge but that is what developers do, work through task and many times...
-
See the following.
https://github.com/karenpayneoregon/visual-basic-getting-started/tree/master/DataGridViewComboBoxes
179306
-
Although you have a solution, a better way is shown in the following code sample which takes more code yet is a better solution and only touches the DataGridView with DefaultValuesNeeded event.
...
-
First off, here the class where the class is created here.
If you remove
If _cts.IsCancellationRequested = True Then
_cts.Dispose()
_cts = New CancellationTokenSource()
End If
-
Hello,
This happens because ThrowIfCancellationRequested throws an exception which you are not checking for which can be done by wrapping the caller code in a try/catch.
Check out the...
-
Blog entry with code samples in a personal GitHub repository.
From hobbyist to seasoned developers delegates are avoided or attempts are made to understand them, which in many cases is met with...
-
I code in ASP.NET Core/Entity Framework Core and WPF/Entity Framework Core applications, doubt that Visual Basic classic can even come close to matching what can be done with ASP.NET Core/Entity...
-
Never, ever touched VB6 and never will.
The code samples are not to impress but for learning.
-
Developers, novice and hobbyist can avoid performance bottlenecks and enhance the overall responsiveness of your application by using asynchronous programming. Asynchrony is essential for activities...
-
Simply declarate the method StarDownLoad with async and the Task needs await. Here is a simple example, does no downloading. The form remains responsive.
Two buttons, one ProgressBar.
Imports...
-
Enter this into a Google search with quotes "wpf mvvm github example" as there are plenty over on GitHub.
-
All you need is the following
Public Class RectArea
Public ReadOnly Property Area() As Double
get
Return Length * Width
End get
End Property
Public...
-
The following should work
Select Case RuntimeInformation.ProcessArchitecture
Case Architecture.X64
'
Case Architecture.X86
'
Case Else
'
-
The following focuses on getting a Entity Framework connection string from app.config, note you can't change it only get it while Entity Framework code first we have compete control over the...
-
Here is a simple example for IsDbNull
Dim query = DataGridView1.Rows.OfType(Of DataGridViewRow)().
Where(Function(row) Not row.IsNewRow).
GroupBy(Function(row)
Return New With {...
-
If you need a decent database model to learn SQL which is not too complex check out the following link for a modified version of Microsoft NorthWind database. Included are several SQL SELECT...
-
The following GitHub repository shows how to use Windows-API-Code-Pack 1.1 as all code samples on the web are in C#. Also there are several tricks not easily learned within the code samples.
...
-
If you want to export all columns excluding the check column see the following.
https://gist.github.com/karenpayneoregon/7e7cb619b46ddb1e57aae17bdbce33b7
This will not handle partial column...
-
Hello,
Install SSMS (SQL-Server Management Studio), it's free. Create a database followed by tables then for relationships right click on Database Diagrams and setup the relations. To get the SQL...
-
An alternative is to use constraints that when a duplicate is inserted a known exception is thrown.
Dim dt = New DataTable()
dt.Columns.Add(New DataColumn() With {
...
-
The following provides rank the sort and note as is will not permit sorting in the DataGridView but replace the list with a DataTable it will be sortable in the DataGridView but if you want the rank...
-
Try the following with Visual Studio "Output" window open.
http://www.systemnetmail.com/faq/4.6.aspx
Sub SendAsync()
'create the mail message
Dim mail As New...
-
I'm writing code samples in a GitHub repository for basic, intermediate to advance asynchronous operations for VB.NET as most code samples on the web are for C# and would like to see what VB.NET...
-
In regards to documenting code you can look at Sandcastle which produces documentation from you XML documentation.
-
Several items to consider
I agree with understanding design pattern then when it's appropriate to use a specific pattern.
Have a solid understanding on local and remote debugging coupled with...
-
Have you looked at DataTable events? Or working with a BindingSource and subscribe to ListChanged event?
-
Hello George,
What is sender in this case? For example
Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
CType(sender, Button).BackColor =...
-
Have you seen my reply over in the Microsoft forum for the same question?
-
Install the following package
https://www.nuget.org/packages/AutoClosingMessageBox/
Usage for one second delay
AutoClosingMessageBox.Show("Hello, World!")
2 seconds...
-
If the Excel type is .xlsx look at SpreadSheetLight installed via NuGet Package Manager.
''' <summary>
''' Extremely simply import.
''' </summary>
''' <param name="pFileName">Excel file to...
-
Here you go...
175769
Imports System.Data.OleDb
Public Class Form1
Private bsCategories As New BindingSource
''' <summary>
|
Click Here to Expand Forum to Full Width
|