Search:

Type: Posts; User: kareninstructor

Page 1 of 13 1 2 3 4

Search: Search took 0.89 seconds.

  1. Re: How to prevent CancellationToken from being cancelled during downloadstring

    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
  2. Re: How to prevent CancellationToken from being cancelled during downloadstring

    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...
  3. VB .NET Working with Delegate and Events

    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...
  4. Replies
    5
    Views
    293

    Re: Basic asynchronous operations

    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...
  5. Replies
    5
    Views
    293

    Re: Basic asynchronous operations

    Never, ever touched VB6 and never will.

    The code samples are not to impress but for learning.
  6. Replies
    5
    Views
    293

    Basic asynchronous operations

    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...
  7. Re: [vb.net] How to use a progress bar while downloading through HttpClient

    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...
  8. Re: MVVM (Model-View-ViewModel) Example ?

    Enter this into a Google search with quotes "wpf mvvm github example" as there are plenty over on GitHub.
  9. Re: Problem in class defination

    All you need is the following


    Public Class RectArea
    Public ReadOnly Property Area() As Double
    get
    Return Length * Width
    End get
    End Property
    Public...
  10. Re: Determine Target CPU | Microsoft Access OleDB

    The following should work


    Select Case RuntimeInformation.ProcessArchitecture
    Case Architecture.X64
    '
    Case Architecture.X86
    '
    Case Else
    '
  11. VS 2017 Re: Error trying to connect Entiry Framework in code using EntityConnectionStringBuil

    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...
  12. Re: Mistake with DGV Operator '' is not defined for type 'DBNull' and string

    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 {...
  13. Replies
    0
    Views
    1,815

    Microsoft NorthWind 2020

    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...
  14. Custom Window Forms dialog for VB.NET

    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.

    ...
  15. Replies
    4
    Views
    382

    Re: export datagrid to csv

    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...
  16. VS 2019 Re: VB.NET SQL Syntax Error

    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...
  17. VS 2010 Re: How to check duplicate records before inserting from one database to another ?

    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 {
    ...
  18. VS 2017 Re: [HELP PLEASE] datagridview add rank number column then my data (pictures or text)

    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...
  19. VS 2017 Re: How To Send SMTP Email (Not Gmail)

    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...
  20. Asynchronous operations with VB.NET

    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...
  21. Re: List all procedures, functions, subs, etc.

    In regards to documenting code you can look at Sandcastle which produces documentation from you XML documentation.
  22. Replies
    8
    Views
    438

    Re: Practical Knowledge

    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...
  23. VS 2015 Re: Datagridview - 3 days of banging head against a wall

    Have you looked at DataTable events? Or working with a BindingSource and subscribe to ListChanged event?
  24. VS 2010 Re: option strict disallows late binding

    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 =...
  25. VS 2015 Re: Controlling Color of some Combobox Items by Another Combobox Choice

    Have you seen my reply over in the Microsoft forum for the same question?
  26. Replies
    10
    Views
    496

    Re: Automatic Message Box

    Install the following package

    https://www.nuget.org/packages/AutoClosingMessageBox/

    Usage for one second delay

    AutoClosingMessageBox.Show("Hello, World!")

    2 seconds...
  27. Replies
    4
    Views
    342

    VS 2015 Re: Slow Export of SQL View to Excel

    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...
  28. VS 2017 Re: How to keep column of GridView hidden but still get the data ?

    Here you go...

    175769



    Imports System.Data.OleDb
    Public Class Form1
    Private bsCategories As New BindingSource
    ''' <summary>
  29. Re: VB Out of Range Error in CalendarColumn by Karen Payne.

    For the record I can't get into this now as I'm on the front lines of CORVID-19. When I get a break (unsure when) I will fix this but could be days or weeks.
  30. VS Code Re: Problem with extract string from an expression

    1. your image is unreadable as presented.
    2. what I provided works with and without line breaks.



    Dim lines = "Name: Lucas Lion Age: 48 TaxID: R935279 Nationality: Germany"

    Dim match =...
  31. VS Code Re: Problem with extract string from an expression

    Have you considered regular expressions ?



    Dim lines As String =
    "Name: Lucas Lion" & ControlChars.CrLf &
    "Age: 48" & ControlChars.CrLf &
    "TaxID: R935279" &...
  32. Re: How to detect if an item added or removed from a ListBox

    The amount of code to provide additional functionality outweighs the benefits, besides it's doing exactly what it's suppose to do, fire off on each action add delete. Also, a better idea is to look...
  33. Re: How to detect if an item added or removed from a ListBox

    This might work for you by overriding WindProc, check for adding or deleting an item to the Items collection.



    Public Class AnotherListBox
    Inherits ListBox

    Public Sub New()
    End...
  34. VS 2019 Re: connection.ServerVersion' threw an exception of type 'System.InvalidOperationExce

    Hello,

    Under Project properties, compile tab, is Target CPU "AnyCPU" and "Prefer 32 bit" checked ? If not then try those settings.
  35. Replies
    64
    Views
    1,759

    Re: What was your last purchase?

    Last thing I purchased was a new holster last night, why? because my old primary holster of 20 years looks horrible from wearing it all the time.
  36. Entity Framework 6 basics code samples

    There are plenty of articles and code sample on the web while many of them are shown with C# code. In the following article I've taken bits and pieces from code samples on Microsoft Docs site and...
  37. Announcement - Visual Basic support planned for .NET 5.0

    https://devblogs.microsoft.com/vbteam/visual-basic-support-planned-for-net-5-0/

    We’ve heard your feedback that you want Visual Basic on .NET Core. Earlier versions of .NET Core supported Class...
  38. VS 2019 Re: Getting DataGridView Currentrow.index when filter applied

    Use a BindingSource, get the current row via .Position property, filter via .Filter, get current row data by casting .Current to the row type in the DataGridView e.g....
  39. Replies
    8
    Views
    443

    VS 2017 Re: VS to GitHub

    For personal work I prefer GitHub while for work it's TFS all the way. With TFS one of the nice features is shelving/suspending which allows flip-flopping between task, sharing without checking in...
  40. Re: Help with converting few lines of C# to VB.NET

    I agree with JMC but if you truly want it in VB.NET


    ''' <summary>
    ''' Utility methods related to CLR Types for SQL Server
    ''' </summary>
    Public Class Utilities
    ...
Results 1 to 40 of 500
Page 1 of 13 1 2 3 4



Click Here to Expand Forum to Full Width