Search:

Type: Posts; User: peterst

Page 1 of 13 1 2 3 4

Search: Search took 0.59 seconds; generated 14 minute(s) ago.

  1. Re: Adding System.Windows.Forms to .Net 8 dll

    Create new project as Windows Forms Class Library and you will have all that you need. Check the created .vbproj as it contains required settings. For example:


    <Project Sdk="Microsoft.NET.Sdk">...
  2. Thread: Dapper

    by peterst
    Replies
    9
    Views
    1,451

    Re: Dapper

    For joins check these tutorials:
    https://www.learndapper.com/relationships
    https://dappertutorial.net/result-multi-mapping

    For more Dapper tutorials visit these sites:...
  3. Thread: Dapper

    by peterst
    Replies
    9
    Views
    1,451

    Re: Dapper

    Sometimes simple data layer is just enough for many applications and EF (Core) is overkill.

    Small example with product definition and small data access layer:

    Product definition as MSSQL table...
  4. Thread: Dapper

    by peterst
    Replies
    9
    Views
    1,451

    Re: Dapper

    The mentioned Dapper is StackOverflow's database micro-ORM and is tested by everyone that used SO during the years. There is no relation to microservices, web, etc.
  5. Thread: Dapper

    by peterst
    Replies
    9
    Views
    1,451

    Re: Dapper

    I am using Dapper for many years - both in VB.NET and C#. Also wrote here in some posts small examples using it but there was little or no interest on the topic.

    Dapper is fantastic ORM for people...
  6. Replies
    5
    Views
    541

    VS 2019 Re: Newtonsoft json help - remove a value

    It is list, just do whatever you will do with list to find a value. Last hint: LINQ
  7. Replies
    5
    Views
    541

    VS 2019 Re: Newtonsoft json help - remove a value

    Deserialize the whole JSON to object (e.g. named MasterSettings) that contains Favorites as List(Of Favorite) or just list of strings as in your example. Then use the root object to reach the...
  8. Replies
    5
    Views
    541

    VS 2019 Re: Newtonsoft json help - remove a value

    Deserialize to object with List(Of Favorite) inside, remove from list the desired item, serialize to JSON
  9. Re: Visual Basic for Applications Language Specification [pdf]

    Eduardo, I have missed that with all changes to MS docs sites during years. Its great resource!
  10. Re: Visual Basic for Applications Language Specification [pdf]

    This is probably the most comprehensive documentation for VBA I've ever seen. Hope Wayne already has this spec or will have good value for his work on TwinBasic compatibility with VB6/VBA.
  11. Visual Basic for Applications Language Specification [pdf]

    Visual Basic for Applications Language Specification - link to PDF:
    https://msopenspecs.azureedge.net/files/MS-VBAL/%5bMS-VBAL%5d.pdf

    Discussion on Hacker News:...
  12. Replies
    6
    Views
    863

    Re: VB NET->VB6 functions

    If you have created .NET Framework class library, then you will find "Register for COM interop" checkbox in Compile tab of project properties.

    If you used class library project for .NET 5 (as last...
  13. Replies
    18
    Views
    1,526

    Re: vertical monitors for coding?

    All my desktop monitors support 90 degrees rotation but I only tested it once and never tried again.

    But last year I bought two 16" portable monitors for my laptop (with tiny 13.3" display) and...
  14. Re: What version of .Net Framework to choose for a new project

    4.7.2 appears as default because... you used it in your last project. If you create project using 4.8, then when you create new project 4.8 will be selected as "default". Simple reason is to have...
  15. Replies
    7
    Views
    1,048

    VS 2022 Re: Program accessing an .xlsx file

    ClosedXML - available as NuGet library that you can use to read and modify Excel files (xlsx format, not the old xls one) without the need to have Excel installed.
  16. Replies
    3
    Views
    1,088

    Re: Getting Value from d JSON format

    The problem is following:

    // d is of type object
    var d = JsonConvert.DeserializeObject(json, typeof(LoggedInDetails));


    Pass the type to the generic version of DeserializeObject:

    // d is...
  17. Replies
    10
    Views
    1,170

    VS 2022 Re: Error using My.Computer

    Just forget all those My.* helpers and use the real classes. For your case it is System.IO.File.WriteAllText().
  18. Replies
    9
    Views
    1,111

    Re: Simple Questions?

    The use of Environment.NewLine was already discussed in this forum, but here is short explanation:

    - Developing library, app or service that will run on different platforms and the generated...
  19. Thread: UI VB6 App

    by peterst
    Replies
    35
    Views
    2,407

    Re: UI VB6 App

    Just forget about all greyish default colors and 3d look.

    There are color related sites where you can generate color palette for your applications. One example is Adobe Color Wheel:...
  20. Re: Reading a pswd protected word file

    I don't have MS Word for many years, but according docs it should be something like this:


    Set doc = wrd.Documents.Open(strDirectory & strFileName, PasswordDocument := "the password")
  21. Replies
    8
    Views
    907

    Re: Nz() Replacement?

    For extensions add new module, e.g. Extensions.vb and put this code inside:

    Imports System.Runtime.CompilerServices

    Friend Module Extensions
    <Extension()>
    Public Function...
  22. Replies
    8
    Views
    907

    Re: Nz() Replacement?

    Use this directly, no need of extra method:

    String.IsNullOrEmpty(variable)
    String.IsNullOrWhiteSpace(variable)

    Or learn how to create extension methods so you can do If variable.IsNullOrEmpty...
  23. Replies
    10
    Views
    3,543

    Re: Create maths document

    With Markdown you can use Pandoc to convert to many other formats. Or as OptionBase1 wrote - use LaTeX and then convert it with Pandoc to whatever you want.
  24. Re: Any change of getting an object property not yet created?

    Quick hint: dynamic objects, expando object
    Link: https://learn.microsoft.com/en-us/dotnet/csharp/advanced-topics/interop/walkthrough-creating-and-using-dynamic-objects
  25. Replies
    5
    Views
    883

    Re: Connect apps together on Tcp

    Check NATS (www.nats.io) - it has pretty good support in .NET and you can use it as communication layer so all your apps will be just clients that talk using messages. There are different patterns to...
  26. Replies
    6
    Views
    4,188

    Re: Parse Json data with VB.NET using Newtonsoft

    These utils - Paste JSON as Classes in VS or JsonUtils.net site, are made to help, not to replace the developer. Everyone can create the classes manually but it is much easier with a helper utility....
  27. Replies
    6
    Views
    4,188

    Re: Parse Json data with VB.NET using Newtonsoft

    There is a site https://jsonutils.com/ that do the creation of classes for C# and VB.NET from JSON. The generated arrays are correct (just checked).

    Last year I've migrated JsonUtils code (it is...
  28. Replies
    6
    Views
    4,188

    Re: Parse Json data with VB.NET using Newtonsoft

    It was repeated many times in this forum, many examples were given, but always the same questions and same wrong attempts.

    Use Edit|Paste Special|Paste JSON As Classes. There is bug in the...
  29. Replies
    204
    Views
    34,502

    Re: twinBASIC programming - Beta releases

    Good job, VB6 Programming! That is how it should look like - all info visible and easy readable. tB contributions are leveling up :)
  30. Replies
    204
    Views
    34,502

    Re: twinBASIC programming - Beta releases

    Oops, sorry, but the italic looks like notes and everything is so similar; not important like how to download and install, which is more important.
  31. Replies
    204
    Views
    34,502

    Re: twinBASIC programming - Beta releases

    Still nothing new and changed in 300+ releases?

    j/k, we know it is hard to copy/paste another 5-10 lines from the changelog
  32. Thread: TwinBasic

    by peterst
    Replies
    1,809
    Views
    871,789

    Re: TwinBasic

    VB6 Programming, please post only in dedicated thread about tB releases. And please post some real "update" information like the change log as all your posts can be considered pure spam with useless...
  33. Replies
    48
    Views
    5,513

    Re: Assembly in VB6: The Basics

    param2 <--- +0ch bytes
    param1 <--- +08h bytes
    return address <-- +04h bytes
    ebp saved value <-- ESP (+00h) points here after push ebp

    ESP goes "down" when push-ing and "up" when pop-ping values.
  34. Replies
    6
    Views
    2,937

    Re: .NET 6 Scaffold Identity Without UI

    I am the link :D And I described step by step (or line by line if it is translated to code) what I did for simple login management.
  35. Replies
    6
    Views
    2,937

    Re: .NET 6 Scaffold Identity Without UI

    You have to create List(Of Claim) that you can use in authorization attribute ("admin", "manager", "operations"), ClaimsIdentity with the claims list and ClaimsPrincipal that uses the claims...
  36. A TLS 1.3 stack written in Visual Basic 6 - wqweto on front page of Hacker News

    wqweto - the well known member of VBForums is on Hacker News front page with his TLS 1.3 stack!

    Congratulations, W!

    Hacker News discussion
    https://news.ycombinator.com/item?id=35882985

    The...
  37. VS 2022 Re: Process runs in VS2008 but not in VS2022

    You are using .NET 6 (.NET Core) where Process.Start works a bit different from .NET Framework. Use following code:



    ...
    OpenBrowser("https://google.com") ' Open URL in browser
    ...
    ...
  38. Re: Problem with video editors trying to trim videos

    Lossless Cut - find in the readme the link to 7Zip archive of the app for Windows or go to releases and find it there. It uses FFmpeg but with easy to use UI.
  39. VS 2022 Re: [RESOLVED] WebRequest to HTTPClient Odd Issue

    Well, just checked and the pattern with GetAwaiter().GetResult(), which was the "proper" way few years ago, now is rejected.

    Anyway, mixing UI with async routines could be done by using Async Sub*...
  40. VS 2022 Re: [RESOLVED] WebRequest to HTTPClient Odd Issue

    ConfigureAwait(True) will return in same thread, for example from UI call to retrieve data should return to the UI thread. To return back to the same thread is more costly as it requires explicit...
Results 1 to 40 of 497
Page 1 of 13 1 2 3 4



Click Here to Expand Forum to Full Width