Saturday, July 23, 2022

datagridview to datatable

create datagridview to datatable

    Most Important

  1. How do I remove the empty row from the bottom of a DataGridView control?
  2. When I fill a DataGridView with data, there is always an empty row at the bottom. How do I disable this?

    Answer: myDataGridView.AllowUserToAddRows = false;

    Research

  3. How to make a DataTable from DataGridView without any Datasource?
  4. I want to get a DataTable from DataGridView of the Grid values. In other words DataTable same as DataGridView Values

  5. How to add a new row to datagridview programmatically
  6. if add row to DataTable DataRow row = datatable1.NewRow(); row["column2"]="column2"; row["column6"]="column6"; datatable1.Rows.Add(row); How about DataGridView??

  7. How to add a new row to datagridview programmatically
  8. How about DataGridView??

  9. How to generate a random string, and specify the length you want, or better generate unique string on specification you want
  10. How to generate a random string, and specify the length you want, or better generate unique string on specification you want

Friday, July 15, 2022

LiteDB application and Windows Form Basics

LiteDB

    datagridview to datatable to PDF file

  1. Convert string to packed ascii byte array
  2. Most important one for my project. it blows up in convert ASCII string to byte array.

    Convert string to packed ascii byte array

  3. Encoding.ASCII vs. new ASCIIEncoding()
  4. Are there any preferred scenarios and/or advantages/disadvantages when to use A or B?

  5. In C#, how can I detect if a character is a non-ASCII character?
  6. I would like to check, in C#, if a char contains a non-ASCII character. What is the best way to check for special characters such as 志 or Ω?

  7. The Absolute Minimum Every Software Developer Absolutely, Positively Must Know About Unicode and Character Sets (No Excuses!)
  8. Ever wonder about that mysterious Content-Type tag? You know, the one you’re supposed to put in HTML and you never quite know what it should be?

  9. ASCIIEncoding.ASCII.GetBytes() Returning Unexpected Value
  10. Why is the output not C0?

  11. How do I get Bin Path?
  12. Answer Path.GetDirectoryName(Application.ExecutablePath)

  13. How to make a DataTable from DataGridView without any Datasource?
  14. I want to get a DataTable from DataGridView of the Grid values. In other words DataTable same as DataGridView Values

    DatagridView Binding Basics

  15. Bind Objects to a DataGridView Control
  16. This article describes a simple approach to displaying object property data within a data grid view control. The example includes a test application comprised of a simple data container class and a sample application used to bind and display object data within a data grid view control. The value of the approach is to permit a developer to quickly display object data in tabular format, or to provide a convenient method for editing object data.

  17. Different Methods of Data Binding to a DataGridView
  18. This code explains different ways of generating data sets to be used as data sources for a DataGridView.

  19. Basic File IO and the DataGridView
  20. Create a versatile line reading application using the .NET StreamReader and the DataGridView.

  21. Exporting DataGridview To Excel
  22. How to export DataGridView data to Excel.

  23. DataGridView Class
  24. Displays data in a customizable grid.

    LiteDB

  25. LiteDB - download site
  26. LiteDB is a serverless database delivered in a single small DLL (< 450kb) fully written in .NET C# managed code (compatible with .NET 4.5 and NETStandard 2.0). Install it via NuGet or just copy the DLL to your bin project folder. LiteDB is a simple and fast NoSQL database solution. Ideal for mobile apps (Xamarin ready), desktop/local applications, application file format, web applications, and one database per account/user data store. Portable UWP and Xamarin iOS/Android, ACID transactions, single datafile (like SQLite), recovery data in writing failure (WAL mode), map your POCO class to BsonDocument, fluent API for custom mapping. Cross collections references (DbRef), store files and stream data (like GridFS in MongoDB), LINQ query support, free for everyone, including commercial use. LiteDB supports SQL-like language for data and structure manipulations. You can insert, update, delete or query your database using a very similar SQL relational language.
  27. My work with LiteDB
  28. Recently I was looking for a storage system for my program. This is a desktop application that creates many objects and searches for text in them. So I thought: "Why don't I try something new." Instead of an SQL database, I could use some kind of document database. But I didn't want to have a separate server, I wanted this database to work with a simple file. Search the Internet for this kind of databases for .NET applications quickly led me to LiteDB. And here I want to share my experience with this database.

  29. How to create .NET Standard library in Visual Studio 2015
  30. In this article I'll show how you can create in Visual Studio 2015 library compliant with some version of .NET Standard.

  31. LiteDB - A .NET NoSQL Document Store in a single data file
  32. A simple, fast and free embedded .NET NoSQL Document Store in a single data file. Inspired on MongoDB, supports collections, POCO classes, Bson Documents, indexes, stream data and LINQ expressions.

  33. LiteDb Review
  34. In this post, we will cover some use cases of LiteDB that I personally encountered to give you some perspective as to how and for what it can be used for.

  35. Embedded NoSQL database for .NET
  36. An open source MongoDB-like database with zero configuration - mobile ready

  37. Getting Started
  38. LiteDB is a simple, fast and lightweight embedded .NET document database. LiteDB was inspired by the MongoDB database and its API is very similar to the official MongoDB .NET API.

  39. falahati / LiteDBViewer
  40. LiteDB v5 contains an internal database browser and editor named LiteDB Studio.

    Therefore, this project will not continue into version 5 of LiteDB and if you need a viewer for your database please consider using LiteDB Studio.

  41. LiteDB Studio
  42. Update to LiteDB v5.0.8

  43. fastBinaryJSON
  44. A binary JSON serializer based on fastJSON (support for MonoDroid, netcore)

  45. Displaying JSON from PHP into a DataGridView using Json.NET
  46. Explaination of how to use JSON to get data from a remote server in C#.

    DataGridView Basics

  47. DataGridView Helper Class
  48. DataGridView Helper Class for Winforms

  49. DataGridView Event Sequences
  50. A useful tool to help you understand DataGridView events as you navigate the DataGridView

  51. Excel export from DatagridView
  52. A way to export data to native excel (xls) from a Datagridview with any data source

  53. DataGridView with hierarchical data binding
  54. The TreeGridView by Mark Rideout with data binding and sorting

    Windows Form Basics

  55. Windows Forms Events Lifecycle
  56. Today there are a large number of books covering .NET and Windows Forms. While most of these books discuss the essentials of working with Windows Forms and guide you well on your way to becoming proficient in developing Windows Forms applications, very few books cover a vital and much needed topic. And this topic is: the sequence of events that are triggered for a Form. Knowing the lifecycle of a Form can help you place important bits of code in relevant events.

  57. Top 10 Windows Forms Articles You Must Read
  58. Abstract: If you have missed on some top articles of Windows Forms on dotnetcurry.com, then this is a must read for you. The Top 10 articles have been decided by our editorial panel based on the popularity of the article, user rating and top views of the articles.

  59. Windows Form Programming Using C#
  60. Windows Form Programming for Begginers Using C#

    More Encoding stuff

  61. Strings and Encoding
  62. String is a type from the System namespace that is used for most of text related operations.

  63. We just launched a new site – Online List Tools – utilities for working with lists. Check it out!
  64. online ascii to bytes

  65. Convert from string to us-ascii in c#
  66. Strings in .NET already are Unicode, so there's no need to convert them from Unicode to Unicode. If you want to output a unicode escaped string, then try this:

  67. System.Text.Encoding Class
  68. Represents a character encoding.

  69. Encoding.Default Property
  70. Gets the default encoding for this .NET implementation.

  71. Correctly reading encoded text with the StreamReader in .NET
  72. I’ve got a list of my team members in a text file which I need to parse and process in .NET. The file is pretty simple – it’s called MyTeamNames.txt and it contains the following names:

  73. Does c# use ascii or unicode?
  74. Does c# use ascii or unicode?

  75. Convert String to ByteArray
  76. A String can be converted to Byte Array in few different ways. In .Net, every string has a character set and encoding. Encoding is the process of transforming a set of Unicode characters into a sequence of bytes.

  77. Character Encoding and Usage in .NET
  78. Understanding character encoding with the help of simple examples

  79. UTF-8 Character Encoding in .NET
  80. Every year or so I manage to uncover a gap in my knowledge as it relates to strings, character sets, and encoding. I have just started embracing this as part of the cycle of mastering (or attempting to master) any given topic. Whenever I feel the need I resort to the most fundamental mechanisms of learning. It is a simple act of reading, practice and memorization.

Wednesday, July 13, 2022

Project: Chart Engine

Project: Chart Engine

ellipse

  1. Working With Absolute Positions in .NET Graphics
  2. An absolute set of coordinates to simplify graphics in .NET.

  3. GraphicsDoubleBuffer
  4. This is a simple class designed to remove flickering from painting controls with gdi+

  5. How to Add Graphics to a C# Windows Form Application
  6. See how you can draw shapes, use colors, and render images in a WinForms app.

  7. 2D Poligon Drawer-Animator
  8. Draw poligons, manipulate them, and animate them.

  9. Drawing and Editing Lines with GDI+
  10. Here's the code to implement a basic graphic user interface to paint, and then edit, lines on a PictureBox.

  11. The myUML Project.
  12. This article explains the myUML project that provides a set of tools for the creation and manipulation of UML diagrams.

  13. The CFGLite Project
  14. The CFGLite Project, for managing configuration files in .NET

  15. Aqua Gauge
  16. A Gauge Control Developed using GDI+ with Aqua Skin

  17. Charts for Windows Application using C#
  18. Create charts using inbuilt functions of .NET Framework in window application and C#

  19. A rotating gauge
  20. An article on a custom control in the form of a rotating gauge.

  21. Two-Way Progress Bar
  22. A Progress Bar User Control that uses a couple of intermediate level ComponentModel properties

  23. Border Container
  24. A collapsable container control with complete header, border, and color customization. Also has the ability to utilize an 'Activation' button (like the 'Active Files' button you'll find at the top of every form in the Visual Studio IDE).

  25. Things to do in Graphics Land
  26. Basic and advanced graphics via C#.

  27. Elliptical/Circular Button
  28. Learn how to draw an Elliptical/Circular button with 3D or popup styles.

  29. C# Rubber Rectangle
  30. Implements a Rubber Rectangle in C#.

  31. Combining GDI and GDI+ to Draw Rubber Band Rectangles
  32. Demonstrates drawng rubber band rectangles using GDI in a .NET GDI app

  33. Resize form using GraphicsPath
  34. This code will help us to reshape our Windows form.

Monday, July 11, 2022

C# class vs. object video series

C# class vs. object video series

  1. C# - How to create a class, objects and add members to the class.
  2. C# - How to create a class, objects and add members to the class.

  3. Design Patterns: Single Responsibility Principle Explained Practically in C# (The S in SOLID)
  4. When you are writing code, are you doing it right? That is a question that worries a lot of people, and it should probably at least be something every developer thinks through. Design patterns are best-practice concepts that we can implement into our code to make it better in some way. Think of them as guardrails that keep our code safe. In this video, we are going to look at the first entry in the famous SOLID principle. The S stands for Single Responsibility Principle. We are going to dive into what it means, how it should change our programming practices, and how far we should take it.

  5. SOLID Principles In C#
  6. SOLID design principles in C# are basic design principles. SOLID stands for Single Responsibility Principle (SRP), Open closed Principle (OSP), Liskov substitution Principle (LSP), Interface Segregation Principle (ISP), and Dependency Inversion Principle (DIP).

MyClass keyword understanding

MyClass keyword understanding

    Must Read

  1. What .NET Developers Must Know about C++ Classes
  2. C++ does things differently than C# or Visual Basic, especially when it comes to class construction. Take this tour to learn about the differences.

  3. Chapter 4. Classes and Objects
  4. Chapter 3 discussed the myriad primitive types built into the C# language, such as int, long, and char. The heart and soul of C#, however, is the ability to create new, complex, programmer-defined types that map cleanly to the objects that make up the problem you are trying to solve.

    More Details

  5. MyClass equivalent in C#
  6. In looking at this question, commenter @Jon Egerton mentioned that MyClass was a keyword in VB.Net. Having never used it, I went and found the documentation on it:

    The MyClass keyword behaves like an object variable referring to the current instance of a class as originally implemented. MyClass is similar to Me, but all method calls on it are treated as if the method were NotOverridable.

    I can see how that could kind of be useful, in some specific scenarios. What I can't think of is, how would you obtain the same behaviour in C# - that is, to ensure that a call to a virtual method myMethod is actually invoked against myMethod in the current class, and not a derived myMethod (a.k.a in the IL, invoking call rather than callvirt)?

  7. Me, My, MyBase, and MyClass in Visual Basic
  8. Me, My, MyBase, and MyClass in Visual Basic have similar names, but different purposes. This topic describes each of these entities in order to distinguish them.

  9. Comparison of C Sharp and Visual Basic .NET
  10. C# and Visual Basic .NET are the two primary languages used to program on the .NET Framework.

  11. C# equivalent of the vb isNothing
  12. VB.Net IsNothing Function returns a Boolean value indicating whether an expression has no object assigned to it. There is no direct, 100% equivalent of the Vb.Net function IsNothing, but the test against null accomplishes the same thing.

    IsNothing is intended to work on reference types. It returns True if the expression represents an object variable that currently has no object assigned to it; otherwise, it returns False.

    The null keyword is specific design feature in the C# language. It is a literal that represents a null reference, one that does not refer to any object. null is the default value of reference-type variables

  13. What is the C# equivalent to VB's Handles?
  14. I assume you mean for handling an event here. There are other Handles such as when discussing Windows API … Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load End Sub

    What is the C# equivalent to VB's friend?

    Assembly level class member visibility in C# is ‘internal' I believe.

  15. What is the C# equivalent to the VB Left function and right function?
  16. The Right function doesn’t exist in C#. However, you can create one, as well as a Left and a mid and make them work just like they do in VB.

    What you need to use is the SubString command and counters that dictate where to start and stop in a string of text. just remember to trap for errors such as the user sending values that would exceed the length of the string or trying to use negative numbers. Remember, Users are stupid.

  17. What is the C# equivalent to VB's InStr?
  18. You can use

    1. IndexOf(int, string, string) … This returns the offset of the first match after the integer value.
    2. IndexOf(string,string) … This returns the offset of the string.
    3. LastIndexOf(string,string) … This returns the last offset of your search value.
    All these methods have several overloads…. Refer to the manual for more help.

  19. What is the C# equivalent of with in VB.NET?
  20. Q:What is the C# equivalent of with in VB Dot thing

    A: Hmmm…….. I will assume the correct question is:

    What is the C# equivalent of “With” in VB dot thing?

  21. What is the new keyword for in this C# code?
  22. This is an Anonymous Type. Well, not truly anonymous, the compiler will assign an auto generated name for such class. It's said to be anonymous because the developer does not have to bother to give such class a name because the compiler will automatically create a random one.

  23. What is the C# equivalent to VB's exit sub?
  24. in C# return;

  25. What is the C# equivalent to VB's friend?
  26. Assembly level class member visibility in C# is ‘internal' I believe.

  27. Me, MyBase and MyClass…
  28. Me is what really symbolizes VB.NET isn’t it? Where is it really applicable ? Lets see:

    Many good examples...

  29. C# Equivalent of VB.NET MyClass???
  30. In otherwords, how do I force a method in my class to call the method implementations in the SAME class and not use any potentially overriden methods in derived classes?

  31. What's difference between f(const MyClass & in) and f(MyClass in)
  32. The equivalent of Global constants in VB
  33. but can anyone tell me how to simulate the concept of a global constant in a C# Windows app? The app in question contains several forms, each of which need to interrogate the value of a "global" constant. Do I have to create a class with a public constant declaration and instantiate that class from each form?

  34. C# equivalent of VB.NET Redim Preserve
  35. Does C# have an equivalent for VB.NET's Redim Preserve ? ReDim Preserve increases the final dimension of any array while preserving the array's contents (however, the type of the array may not be changed).

  36. Me vs. MyClass
  37. What is the difference between the Me and the MyClass keywords? I understand Me that it represents the specific instance of the class. When you're inside the object instance, it refers to itself using the Me keyword. What is the MyClass keyword used for?

  38. translate static in C# to VB.NET
  39. very good examples

  40. VB.Net program to demonstrate the 'MyClass' keyword
  41. Here, we will demonstrate the MyClass keyword. The MyClass keyword is used to refer to the current class name.

  42. Curious case of typeof in C# and VB.NET
  43. In this article one of the operator keyword which every .NET developer encounters named as typeof. But the purpose it servers in both of the languages is different.

    If you are the curious one to know how C# and vb.net treats typeof, continue reading the article.

  44. With End Block - VB.Net
  45. There is no direct equivalent to this in C#

  46. The My namespace
  47. One of the great new feature in Visual Basic 2005 is the My namespace.

    The My namespace doesn’t bring anything new to the language. It simply offers a clearer path to methods and properties already existing in the .Net Framework. You can see it as a shortcut to quickly access features that are sometime hard to find.

    This is the first article of a series of 2. Next month, I will show you how to extend this namespace with your own methods.

  48. Extending the My namespace
  49. This is the second (and last) article on the My namespace. Last month, I showed you what is the My namespace and how to use it. This month, I will show you how to extend it with your own methods. As you will soon discover, it is as simple as adding 2 lines to a class that you might already have written.

    Why extend this class? You surely built many helper functions over the years. Most of those functions are probably declared as static so that you don’t have to create an instance of the class to use them.

    The good news is that the My namespace can be extended so that your own classes can sit beside My.Application, My.Computer, My.User and so on.

  50. Distinguishing Visual Basic Me, My, MyBase, and MyClass
  51. I have been providing C# code for my articles for a long time now but not this month. The reason is that MyClass has no equivalent in that language. MyClass is purely VB.

    The easy one: My Let’s start with the easy one: My. The My keyword was introduced in the VB language with the .Net Framework 2.0 (TODO) and is simply a shortcut to often used .Net Framework classes. I have already covered this keyword in June 2007.

    The obvious one: Me This is the most often used keyword even if you don’t even always write it yourself because it is implicit from within an instance. In theory, the Me keyword is used to access the current instance.

    The common one: MyBase Sometimes, you don’t want to access to the current instance but you would prefer to refer to the base instance when you have overridden or shadowed a member. We very often see this keyword in constructors. We want to do everything the base constructor is doing and add something specific to the current instance in the derived class.

    Notice that if your classes inherits many levels deep, MyBase will call the members of the immediate base class (the one just above) and won’t go until the root.

    The obscure one: MyClass MyClass behaves mostly like Me. The only exception is that it will force to use the current instance of the class (and not any of its overrides) as if the members were declared as NotOverridable. In other words, MyClass makes sure that the member of the current class is dispatched and not the overridden member.

  52. Use Shared Keyword In VB.NET
  53. Shared keyword A shared method is not accessed via an object instance like a regular method, but rather is accessed directly from the class. The shared keyword in VB.NET is the equivalent of the static keyword in C#. In VB.NET, the shared keyword can only be applied to methods within a class, however, in C#, the static keyword can be applied to both methods within a normal class, and also at the class level to make the entire class static.

    Shared Variables When we share a value across all instances of a class when every object of a given type should share the same variable. This is accomplished through the use of shared variables.

    GDI+ in VB.NET

  54. Transformation In GDI+ In VB.NET
  55. A transformation is a process that changes graphics objects from one state to another. Rotation, scaling, reflection, translation, and shearing are some examples of transformation. Transformation can be applied not only to graphics shapes, curves, and images, but even to image colors.

  56. GDI+ IN VB.NET ARTICLES
  57. GDI+ IN VB.NET ARTICLES

Sunday, July 10, 2022

Resource file in C#

  1. How to create and use resources in .NET
  2. How do I create a resource that I can reference and use in various parts of my program easily?

    My specific problem is that I have a NotifyIcon that I want to change the icon of depending on the state of the program. A common problem, but one I've been struggling with for a long time.

  3. C#.net - Read the Resource file (.resx)
  4. Resource files are used to hold files associated with the application, such as String,images, sounds and other data objects. Resource files can also be used to localise applications to specific cultures.

  5. [C#] How to add and use images from resources
  6. very short, but very useful and simple...

  7. Resource Manager, C# (ENGLISH)
  8. Resource Manager, C# (ENGLISH)

  9. How to add image to resource in windows form in c#
  10. How to add image to resource in windows form in c#

  11. How To Add And Use Images From Resources In C# - Visual Studio 2010
  12. How To Add And Use Images From Resources In C# - Visual Studio 2010

  13. C# Winforms Resources add, modify and delete
  14. When developing a Windows application, you can import images and icons into the Resource and package them together with the application into an exe file, so that others cannot get the images and icons used in the program, and at the same time reduce the number of files.

    There are usually two ways to import a file into a resource file. One is to import the background image into the control, which can be imported in the properties; the other is like the icon of an exe file, but it cannot be imported directly. You need to import the image into the resource file before referencing it.

  15. Adding Images In C# .Net
  16. You have seen the Open File dialogue box countless times. It's the one that appears whenever you click File > Open on a Windows machine. You then navigate through folders, searching for the file you want to open. For our View Images menu, we'll do something slightly more complex - we'll have our own Open File dialogue box that allows you to select images from your computer. When you select an image, it will then appear in a new control on your form.

Saturday, July 9, 2022

string format

string format

  1. Standard numeric format strings
  2. Standard numeric format strings are used to format common numeric types. A standard numeric format string takes the form [format specifier][precision specifier], where:

  3. Overview: How to format numbers, dates, enums, and other types in .NET
  4. Formatting is the process of converting an instance of a class or structure, or an enumeration value, to a string representation. The purpose is to display the resulting string to users or to deserialize it later to restore the original data type. This article introduces the formatting mechanisms that .NET provides.

  5. String.Format Method
  6. Converts the value of objects to strings based on the formats specified and inserts them into another string.

    If you are new to the String.Format method, see the Get started with the String.Format method section for a quick overview.

  7. What is ToString("N0") format?
  8. This code is from Charles Pettzold's "Programming Windows Sixth Edition" book:

    public object Convert(object value, Type targetType, object parameter, string language) { return ((double)value).ToString("N0"); }
  9. Numeric ("N") Format Specifier In C#
  10. The numeric format specifier "N" converts a number to a string format as, "-d,ddd,ddd.ddd…" where the "-" sign denotes the negative number symbol, "," denotes a separator between these groups, "d" denotes any number (0-9), and "." represents the decimal point in the number. For this we use the properties of the NumberFormatInfo class. First of all the following example shows how we convert the number into the string format:

Replicate your project quickly

Replicate your project quickly

  1. How do you count the lines of code in a Visual Studio solution?
  2. Is it possible to find the number of lines of code in an entire solution? I've heard of MZ-Tools, but is there an open source equivalent?

    You can use [^\n\s]\r\n to skip blank and space-only lines (credits to Zach in the comments).

    I used Ctrl+Shift+F. Next, put a \n in the search box and enable regular expressions box. Then in the find results, in the end of the screen are the number of files searched and lines of code found.

  3. CopyWiz: Copy and Rename Visual Studio Projects
  4. Copy and Rename Visual Studio Projects

    1. Copy Microsoft Visual Studio, Embarcadero Delphi, C++Builder, RAD Studio, SQL Server Management Studio, VSTO, Intel C++ and Visual Fortran, and other Visual Studio Shell projects and solutions
    2. Rename an existing project
    3. Fix up directories and filenames in your projects
    4. Replace GUIDs in projects

  5. What is the fastest way / script to duplicate visual studio project?
  6. Hello I have setup visual studio express c++ project, with paths to included headers and libs Now I like to duplicate this project to be with the same paths to included headers and libs But with different name , I don’t what to go manually into .vcproj file and start to changes names Is there better way?

  7. If i want to make a copy of my c# project in the same workspace how can i do it?
  8. In other words lets say i have already completed a project using visual studio. Now i want to make a separate project that is identical to the already completed project(except for some future changes).

    How can i do this while keeping the new project in the same workspace as the original without:

    1. creating a new project and copy pasting code over
    2. copy-pasting the folder that holds the project and changing the name of the folder

  9. Line Counter
  10. Easily count source code lines in your Visual Studio projects.

  11. SourceMonitor Information
  12. The developer of SourceMonitor, Jim Wanner, is retiring from software development. The software will become open source and a new home at GitHub.

    The repository is not public at the moment because of licensed code. This is required until the licensed code is replaced. Then we're able to start with a clean and public repository without the licensed code.

  13. SourceMonitor
  14. The program SourceMonitor was developed by Jim Wanner of Campwood Software. He has retired from software development. Then he decided to make this software available to the community. Many thanks for this.

  15. Project Line Counter Add-In v2.10 for VS.NET and VC6
  16. Get statistics about your source code with a click of a button

Thursday, July 7, 2022

Git tutorials

Git tutorials

  1. Git Tutorial for Beginners: Command-Line Fundamentals
  2. Git is the most popular version control system out there and for good reason. In this video, we'll go over the basics of what git is and how to use it within the command-line. There are several GUI tools out there to help you get started with git, but it can be extremely beneficial to learn git from the command-line as early as possible.

  3. Git Book
  4. The entire Pro Git book, written by Scott Chacon and Ben Straub and published by Apress, is available here. All content is licensed under the Creative Commons Attribution Non Commercial Share Alike 3.0 license. Print versions of the book are available on Amazon.com.

  5. Download for Windows
  6. Click here to download the latest (2.37.0) 64-bit version of Git for Windows. This is the most recent maintained build. It was released 10 days ago, on 2022-06-27.

  7. GUI Clients
  8. Git comes with built-in GUI tools for committing (git-gui) and browsing (gitk), but there are several third-party tools for users looking for platform-specific experience.

  9. TortoiseGIT Download
  10. TortoiseGIT Download

Wednesday, July 6, 2022

C# variable name __

C# variable name __

  1. C# Variable Name "_" (underscore) only
  2. I was just hit with a minor issue in C#, it was just a copy-paste mistake but don't know how C# accept it.

  3. C# Hidden Gems - Discards Variable (_)
  4. From version 7.0, C# introduced a new feature called discards to create dummy variables, defined by the underscore character _. Discards are equal to unassigned variables. The purpose of this feature is to use this variable when you want to intentionally skip the value by not creating a variable explicitly.

    For example - this is when you are calling a method that returns the object but the caller is only interested in calling the method but not in the returned object. In such cases, we can use a discards variable so that it can reduce the memory allocation and make your code clear as well.

  5. C# Naming Conventions
  6. C# naming conventions are an important part of C# coding standards and best practice when you are developing a .NET applications. .NET naming conventions are standards how the naming of variables, methods, classes, and other code elements should be defined. In this article, let us learn C# naming conventions.

Win32 application to C#

Win32 application to C#

  1. Converting C++ Data Types to C#
  2. If you've ever had to write any interop code to use an unmanaged library in your C# application, you know how tricky it can be to get the data types correct. I often find myself scouring the internet looking for the correct conversions, so I thought I would document everything I have learned so far. This is by no means a comprehensive list of all C++ data types, just the ones I find myself frequently writing interop code for.

  3. Is it possible to convert a Win32 application project into a console application?
  4. Is it possible to convert an existing visual studio project file that creates a Win32 application into a project file that creates a Win32 "Console" application? If so, how is this done? I've googled and found plenty of people doing the opposite, but none this way.

  5. Converting and Compiling 32-bit to 64-bit Visual Studio 2008 Projects
  6. The average lifespan of a typical computer is about 3-5 years. Today, the majority of users are running 32-bit architecture PCs. However, as users begin upgrading to faster computers, they will be moving to the newer 64-bit platforms, requiring some software developers to port their Win32 x32 Visual Studio projects over to the x64 platform. This is particularly important for Windows applications which deal with system processes, hardware, or system architecture. For the developer, converting an application from 32-bit to 64-bit is often a straight forward process in Visual Studio 2008, although there can be subtle issues that may arise.

  7. Converting console application to windows application – C++/CLI
  8. Have you ever needed to convert a console application to windows application?

  9. Microsoft Opens Up Old Win32 APIs to C# and Rust, More Languages to Come
  10. Microsoft is opening up old Win32 APIs long used for 32-bit Windows programming, letting coders use languages of their choice instead of the default C/C++ option or individual workarounds.

Monday, July 4, 2022

user control project

user control project

    Must Read

  1. A rotated ellipse from three points
  2. good link to another github site

  3. Pitteway's algorithm for drawing conic curves
  4. In 1967, just a couple of years after Jack Bresenham published his well known line-drawing algorithm [1], M.L.V. Pitteway published a more general version of the algorithm [2]. Pitteway's algorithm is based on similar principles, but can draw conic curves — ellipses, parabolas, and hyperbolas.

  5. jvanaken1 / conic-draw
  6. In 1967, just a couple of years after Jack Bresenham published his well known line-drawing algorithm [1], M.L.V. Pitteway published a more general version of the algorithm [2]. Pitteway's algorithm is based on similar principles, but can draw conic curves — ellipses, parabolas, and hyperbolas.

  7. Three Points (Two Opposing) Define an Ellipse
  8. Update on 2021-06-21: three (or even four) points in general do not define an ellipse. But the additional information that the first and last of the three points are at opposite ends do define an ellipse. Equivalently, two on-curve points and the center point define an ellipse.

    This blog post also primarily discusses a 4-piece cubic Bézier approximation to that ellipse. That ellipse (not just its approximation) is still well-defined, but this blog post does not derive a closed form for it. For vector graphic rasterization, the Bézier approximation is good enough.

  9. Working With Absolute Positions in .NET Graphics
  10. An absolute set of coordinates to simplify graphics in .NET.

    More User controls

  11. Ellipse drawing algorithm
  12. A basic algorithm for drawing ellipses on a window

  13. The Spiral TrackBar Control
  14. In this article, you will learn about the SpiralTrackBar class. This class is a replacement for the .NET 2.0 TrackBar control, which displays the track line as a spiral.

  15. The Amazing ProgressBar Control
  16. A progress bar which displays progress as passage through a simple maze.

  17. Proper Resizing of SplitterContainer Controls at any DPI
  18. A method of ensuring that SplitterContainer controls with fixed panels are properly resized when AutoScaleMode is ScaleMode.DPI

  19. CircleControl - A Circular Motion Control
  20. A circular motion control

  21. Best-fitting line, circle and ellipse
  22. Library for least-squares best-fitting of lines, circles and rotated ellipses

  23. Work with bitmaps faster in C#
  24. You can increase the speed of both SetPixel and GetPixel by doing the following:Add the line 'int step = 0' at the LockBitmap class level.Remove 'int' declation of 'step' in the LockBits method and calculate as is.In both SetPixel and GetPixel, remove the line:int cCount = Depth /...

  25. Bitmap.SetPixel(Int32, Int32, Color) Method
  26. Sets the color of the specified pixel in this Bitmap.

  27. Bitmap.LockBits Method
  28. Locks a Bitmap into system memory.

  29. Fast work with Bitmaps in C#
  30. I need to access each pixel of a Bitmap, work with them, then save them to a Bitmap. Using Bitmap.GetPixel() and Bitmap.SetPixel(), my program runs slowly.

  31. A thermometer control
  32. Elliptical Rotating Picture Tray and Editor
  33. A picture tray that rotates around an ellipse of flexible size and angle, with an editor for C#.

  34. Introduction to Numerical Methods
  35. Introduction to Numerical Methods and Updated Polynomial Class

  36. Orbital Mechanics Introduction
  37. Introduction to Orbital Mechanics - 2 Body Problem

  38. Drawing Gears - Circular and Non Circular
  39. Learn about gears and by using the jpg's be able to cut working gears in wood and other materials

  40. Clock
  41. Simple clock using line transform

  42. Rubberband Lines
  43. Using the rubberband line as a ruler.

  44. Magic Graphics
  45. A library that lets you easily manipulate your drawings

  46. Extensions to DrawTools
  47. DrawTools library extended to include Layers, Zoom, Pan, Rotation

  48. Shape Control for .NET
  49. Implementing shape control that supports transparency, custom design-time editors and simple animation

  50. Handling Touch, Pen, or Mouse Digitizer input in your .NET Application
  51. A simple application that shows how you can determine whether user input is from a mouse, tablet digitizer, or touch.

  52. CCanvas - A Reusable Class to Draw a Simple Graph
  53. A reusable class for drawing a simple graph

  54. Introduction to GDI+ in .NET
  55. In this article, we’ll see basics of GDI+ and how GDI+ is much better interface than its predecessor GDI.

  56. Custom ProgressBar Control
  57. Easy to use ProgressBar Control with many properties

  58. gTrackBar - A Custom TrackBar UserControl (VB.NET)
  59. TrackBar with custom coloring, value display, label, and increment buttons.

  60. RoundButton Windows Control - Ever Decreasing Circles
  61. A Windows round button control in C# with designer support

  62. Rytz's construction
  63. The Rytz’s axis construction is a basic method of descriptive Geometry to find the axes, the semi-major axis and semi-minor axis and the vertices of an ellipse, starting from two conjugated half-diameters. If the center and the semi axis of an ellipse are determined the ellipse can be drawn using an ellipsograph or by hand (see ellipse).

  64. Steiner Ellipse, Minimal Area Through Three Points
  65. The Steiner ellipse has the minimal area surrounding a triangle. It is characterized by having its center coincident with the triangle's centroid.

  66. Finding the ellipse center from three points.
  67. Fig 7 - uploaded by Dong Joong Kang

  68. Elliptical Pizza Theorem
  69. very good one

  70. Ellipse from 3 points
  71. I found these equations I call the Eliptical Pizza theorem because it looks like a pizza under perspective adjustments, I thought maybe they could be useful for a possible new feature of geogebra to calculate an ellipse from 3 points, once you calculate 2 other points using these equations you can then use the conic from 5 points to get the ellipse from three given points..http://benpaulthurstonblog....

  72. Elliptical Pizza Theorem
  73. Elliptical Pizza Theorem

  74. Passing an ellipse through 3 points (where 2 two points lie on the ellipse axes)? [Updated with alternative statement of problem and new picture]
  75. Passing an ellipse through 3 points (where 2 two points lie on the ellipse axes)? [Updated with alternative statement of problem and new picture]

  76. How to find the equation for an ellipse from 3 points using python
  77. I am bulding a game and I need to creat a map for it. in order to do it i have to use two kinds of elipse: one that is found using 2 points and one that found using 3 points (and go through them). I have found a way to find the equation with 2 points but now I have not found a way to do with 3 point. So I am looking to find the equation for an ellipse given 3 point. that is how i have done 2 points (it is not elegant but it does the job great):

  78. How many points does it take to define…
  79. You know how it is. One moment you are relaxing on the grass with some friends discussing the weather, the next you start stretching your mind as to how many points it takes to define various shapes: ellipses, ellipsoids, triangles, what not. Let’s take a peek at this sort of problem. We’ll start with circles. One of the first things that you learn in school about circles, is that any three noncollinear points define the circumference of one circle, and one circle only. Lets see how that is. First we show that we can indeed construct a circle that will pass through all three points. Let’s label our points A, B, and C.

Saturday, July 2, 2022

Zoom

Zoom

  1. Click to Drag, Zoom, and Copy - PictureBox
  2. A picture box with built-in click to drag, zoom, and copy.

graphical grid component

graphical grid component

  1. Graphical grid component
  2. Easy manipulation of graphical grids

  3. Using BitBlt to Copy and Paste Graphics
  4. This article will demonstrate how to use BitBlt. and provide some technical pointers

copy /constructor vs. clone

copy vs. clone

constructor

    Basics - Must Read

  1. Constructor And Destructors In C#
  2. A constructor can be used, where every time an object gets created and if we want some code to be executed automatically. The code that we want to execute must be put in the constructor. The general form of a C# constructor is as follows

  3. Working With Constructor in C#
  4. A constructor is used to initialize class fields. A class constructor is automatically called when an instance of a class is created. Whenever a class or struct is created, its constructor is called.

    A class or struct may have multiple constructors that take different arguments. Constructors enable the programmer to set default values, limit instantiation and write code that is flexible and easy to read.

    If you do not provide a constructor for your object, C# will create one by default that instantiates the object and sets member variables to the default values as listed in Default Values Table (C# Reference).

    1. A constructor has the same name of the class or struct.
    2. Contructors do not have a return type.
    3. C# will create one by default that instantiates the object and sets the member variables to the default values as listed.
    4. Constructors can be overloaded by the number and type of parameter.

  5. C# This Constructor Initializer
  6. This C# example uses the this keyword in constructor initializers.

  7. When initializing in C# constructors what's better: initializer lists or assignment?
  8. Class A uses an initializer list to set the member to the paramter value, while Class B uses assignment within the constructor's body.

  9. Constructors In C#
  10. Many good points to note: Base constructor without parameter call sequenceL\:

    A constructor in C# is a member of a class. It is a method in the class which gets executed when a class object is created. Usually we put the initialization code in the constructor. The name of the constructor is always is the same name as the class. A C# constructor can be public or private. A class can have multiple overloaded constructors.

    Note: that only this and base (we will see it further) keywords are allowed in initializers, other method calls will raise the error.

    Very first of all let us see what is this syntax:

    public mySampleClass(): this(10)

    Here this refers to same class, so when we say this(10), we actually mean execute the public mySampleClass(int Age) method.The above way of calling the method is called initializer. We can have at the most one initializer in this way in the method.

    Now what will be the execution sequence here: If I create the object of the Derived class as

    myDerivedClass obj = new myDerivedClass();

    Then the sequence of execution will be,
    1. public myBaseClass() method
    2. and then public myDerivedClass() method.

    Note: If we do not provide initializer referring to the base class constructor then it executes the no parameter constructor of the base class.

    Note one thing here: We are not making any explicit call to the constructor of base class neither by initializer nor by the base() keyword, but it is still executing. This is the normal behavior of the constructor.

    Notes for Static Constructors,

    1. There can be only one static constructor in the class.
    2. The static constructor should be without parameters.
    3. It can only access the static members of the class.
    4. There should be no access modifier in static constructor definition.
  11. CONSTRUCTOR AND THIS KEYWORD 2020
  12. Constructor The class type is the most fundamental programming construct in the .NET platform.

    A class is a user-defined type that is composed of field data (member variables and members that operate on this data such as constructors, properties, method, events, and so forth. The set of field data represents the state of a class instance (object). By grouping data and related functionality in a class definition, we are able to model our software after entities in the real world.

    Constructor

  13. base() and this() constructors best practices
  14. Under what conditions am I supposed to make the :base() and :this() constructor calls following my constructor's parentheses (or even in other places in the code). When are these calls good practices and when are they mandatory?

  15. Constructors and Its Types in C#
  16. What is a constructor in C#? A special method of the class that is automatically invoked when an instance of the class is created is called a constructor. The main use of constructors is to initialize the private fields of the class while creating an instance for the class. When you have not created a constructor in the class, the compiler will automatically create a default constructor of the class. The default constructor initializes all numeric fields in the class to zero and all string and object fields to null.

    Constructor Some of the key points regarding constructor are
    1. A class can have any number of constructors.
    2. A constructor doesn't have any return type, not even void.
    3. A static constructor can not be a parametrized constructor.
    4. Within a class, you can create one static constructor only.
    static constructor: Some key points of a static constructor are:
    1. A static constructor does not take access modifiers or have parameters.
    2. A static constructor is called automatically to initialize the class before the first instance is created or any static members are referenced.
    3. A static constructor cannot be called directly.
    4. The user has no control over when the static constructor is executed in the program.
    5. A typical use of static constructors is when the class is using a log file and the constructor is used to write entries to this file.
    Private Constructor in C# When a constructor is created with a private specifier, it is not possible for other classes to derive from this class, neither is it possible to create an instance of this class. They are usually used in classes that contain static members only. Some key points of a private constructor are:
    1. One use of a private constructor is when we have only static members.
    2. It provides an implementation of a singleton class pattern
    3. Once we provide a constructor that is either private or public or any, the compiler will not add the parameter-less public constructor to the class.
  17. Copy constructor versus Clone()
  18. In C#, what is the preferred way to add (deep) copy functionality to a class? Should one implement the copy constructor, or rather derive from ICloneable and implement the Clone() method?

  19. Private Constructors in C#
  20. Private Constructor is a special instance constructor present in C# language. Basically, private constructors are used in class that contains only static members. The private constructor is always declared by using a private keyword.

    Important points:

    1. It is the implementation of a singleton class pattern.
    2. Use private constructor when class have only static members.
    3. Using private constructor, prevents the creation of the instances of that class.
    4. If a class contains only private constructor without parameter, then it prevents the automatic generation of default constructor.
    5. If a class contains only private constructors and does not contain public constructor, then other classes are not allowed to create instances of that class except nested class.

    Copy Constructor

  21. Base class for cloning an object in C#
  22. This class implements the ICloneable for you.

  23. C# | Copy Constructor
  24. A constructor that creates an object by copying variables from another object or that copies the data of one object into another object is termed as the Copy Constructor. It is a parameterized constructor that contains a parameter of the same class type. The main use of copy constructor is to initialize a new instance to the values of an existing instance. Normally, C# does not provide a copy constructor for objects, but if you want to create a copy constructor in your program you can create according to your requirement.

  25. Constructors in C# - A Tutorial
  26. Pros and Cons of Different Constructor Usage in C#

  27. An Intro to Constructors in C#
  28. This is an article on Constructors in C#, for the beginner level programmers. It covers simple constructors, constructors overloading, behaviour of constructors in inheritance, constructor chaining and static constructors. At the end, it contains the general FAQs about constructors.

  29. Structs in C#, Structs vs. Classes, Heap or Stack? Structs Constructors
  30. This article describes Structs in C#, Structs vs. Classes, Heap or Stack? Structs Constructors

  31. Generating constructors at compile time
  32. This is an alternative for "C# Convert DataTable to List of Objects Dynamically"

  33. Shallow Copy vs. Deep Copy in .NET
  34. Shallow and deep copy are used for copying data between objects.

  35. Static constructors and way forward (.NET optimized Singleton pattern)
  36. A simple guide to static constructors in C# and its uses in the >NET optimized Singleton pattern.

    Good tips

  37. Protecting an Application's Unauthorized Copy
  38. To protect your application's unauthorized copy by using image integrity functions (Platform SDK's ImageHlp APIs) and to manage certificates in a portable executable (PE) image file.

  39. Static Constructor and Performance
  40. .Net Performance Tip - 1

  41. Refactoring Tips - Tip 2
  42. Refactoring Tips - Tip 2Tip 2Avoid temporary variable declaration, if the variable is just a place holder as shown below.Bad practiceprivate string GetData(){ string temp; temp = expression + ( var1 * var2).ToString();//Some expression which calculate the desired...

  43. Constructor .NET
  44. Types of constructors available in C#

Friday, July 1, 2022

resource file - understanding

  1. Understanding Embedded Resources in Visual Studio .NET
  2. A short article to guide you through how to use embedded resources in .NET projects using Visual Studio .NET

  3. Image Rotation in .NET
  4. Rotates an image without having to worry about cropping the edges.

data binding

data binding

    Must Read

  1. Bind Better with INotifyPropertyChanged
  2. Data bind using INotifyPropertyChanged

  3. Hosting Simple Data Binding
  4. Shows how to participate in data binding both as a data source and as a binding host

  5. Asynchronous data loading and data binding with Windows Forms
  6. This article introduces a reusable library that contains two utility components for data binding and asynchronous data loading.

    Good Details

  7. Databinding - Bindinglist, BindingSource and BusinessObjects - Part 1
  8. Databinding - Bindinglist, BindingSource and BusinessObjects

  9. Databinding - BindingList, BindingSource, and BusinessObjects: Part 2
  10. Databinding - Searching and sorting BindingList.

  11. Data Binding Concepts in .NET Windows Forms
  12. A detailed look at the concepts involved in data binding and controlling data binding

  13. Understanding Simple Data Binding
  14. Tricks, pitfalls, and work arounds to .NET's data binding.

  15. Postulate.WinForms: A New Look at Data Binding
  16. A new alternative to CRUD data binding in WinForms

  17. Implementing complex data binding in custom controls
  18. An article on implementing complex data binding (DataSource and DataMember) on a custom control.

  19. Deep Binding
  20. Binding Complex objects to Windows Forms controls

  21. Complex Data Binding a Collection Implementing IBindingList and ITypedList
  22. Complex Data Binding a collection implementing IBindingList and ITypedList

  23. Best Practice for Binding WinForms ListControls
  24. This article demonstrates the best technique for databinding the ListBox and ComboBox controls in .NET Windows Forms

    Update control

  25. A Simple Alternative to Windows Forms Data Binding
  26. An open source library of Windows Forms controls that update themselves automatically.

  27. A Simple Alternative to Windows Forms Data Binding
  28. An open source library of Windows Forms controls that update themselves automatically.

  29. Update Controls
  30. I've felt for a long time that something was wrong with the way we do GUI development. For instance, suppose we have a form with a list of people and some information about them:

  31. Update Controls .NET
  32. This set of articles walks you through the most common scenarios of using Update Controls in a XAML-based application. These basics are applicable to WPF, Silverlight, Windows Phone, and Win RT development.

  33. Data binding without INotifyPropertyChanged
  34. Update Controls does not require that you implement INotifyPropertyChanged or declare a DependencyProperty. It connects controls directly to CLR properties. It discovers dependencies upon data through layers of intermediate code. This makes it perfect for the Model/View/ViewModel pattern; no extra code is needed in the ViewModel, which sits between the Model and the View.

  35. A Helper Class to Bind a DataTable to a Class
  36. Binding to the DataTable without the System.Windows.Forms namespace.

attribute research

attribute

  1. Custom Attributes in .NET
  2. How custom attributes are used in .NET

  3. Creating and Using Attributes in your .NET application
  4. Shows how to use existing attributes and how to create and use your own attributes

  5. Have Fun Again With Custom Attributes (Part 1)
  6. If you think you know everything there is to know about custom attributes, read this article. PostSharp will let you to take your custom attributes to the next level and let them actually add new behaviors to your code.

  7. Referenced Description Attribute
  8. An article on how to call an existing description in the designer

  9. DefaultValue Attribute Based Approach to Property Initializaton
  10. Various approaches to implementation of property initialization with DefaultValue attributes

  11. The PropertyGrid: Overriding Class Attributes
  12. Dynamically control any attribute, including DefaultValues, Categories, Descriptions, DisplayNames, ReadOnly attributes, Property sort order and more.