Tuesday, May 31, 2022

angle calculation

angle calculation

    Visual Basic Comparison with C#

  1. VB.NET and C# Comparison
  2. This is a quick reference guide to highlight some key syntactical differences between VB.NET and C#. Hope you find this useful! Thank you to Tom Shelton, Fergus Cooney, Steven Swafford, Gjuro Kladaric, and others for your contributions. Also see Java and C# Comparison.

  3. Me, My, MyBase, and MyClass in Visual Basic
  4. 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.

    research

  5. How to calculate the angle between a line and the horizontal axis?
  6. In a programming language (Python, C#, etc) I need to determine how to calculate the angle between a line and the horizontal axis?

  7. How can I find the difference between two angles?
  8. Given 2 angles in the range -PI -> PI around a coordinate, what is the value of the smallest of the 2 angles between them?

  9. Calculating angle between two points - java
  10. I need to calculate the angle in degrees between two points, with a fixed point that is connected with the given two points by a line.

  11. Rotate a point around another point
  12. I have a task to draw a specific graphic. As part of this task I need to rotate some dot's on 45 degrees.

  13. How to: Use the My Namespace (C# Programming Guide)
  14. C# alternative to Visual Basic .NET namespace My
  15. I'm a VB.NET programmer, but I'm new to C# and now I'm working with C# project which uses local resource files (.resx).

  16. [RESOLVED] C# equivalent of Mybase.New()?
  17. What is the C# equivalent of VB.Net's

    VB Code: MyBase.New(...)
  18. MyClass equivalent in C#
  19. 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.

Error Resource file "Properties\Resources.resx" cannot be found

Error Resource file "Properties\Resources.resx" cannot be found

    Must Read

  1. A Resizable Graphical Rectangle
  2. An object associated with a pictureBox managing callback to manipulate the rectangle area.

    Compile this project and ran into this error message

  3. TdhMarchingAnts - A .NET component to select (and draw) a rectangle on the client-area of an attached control and return the co-ordinates
  4. This article describes a .NET component to draw a "rubber-band rectangle" as determined by the user mouse activity (which is replaced by "marching ants" after the selection is complete) on the surface of an attached control and return the rectangle co-ordinates via an event.

    Solution

  5. Visual Studio and Resource.resx missing
  6. To be more specific i had trouble building the Sample and Library Sources in C# from Forest Moon Productions. It concerns an API that i wanted to try out.

    Solution: Minutes later i tried this obvious and simple solution: removing the /Resource.resx files from the project. To be more specific those in AX12ArmSample and JoyStick sub projects. All other errors dissapeared.

  7. Running this C# project - `Resource file "Properties\Resources.resx" cannot be found`
  8. In solution explorer, open tree item Properties.

    Right click and Select remove from project for AssemblyInfo.cs, Resources.resx and Settings.settings.
    You can build.

  9. Resources.resx error?
  10. The custom tool 'PublicResXFileCodeGenerator' failed while processing the file 'Properties\Resources.resx'

  11. Vs之Resource file “Properties\Resources.resx” cannot be found
  12. 小伙伴们在使用vs编译项目时,可能会出现标题中的错误,这是因为我们项目的代码很可能是从哪里找来的,但是Resources.resx 文件丢失了

  13. C# 使用资源文件 Resource.resx 的方法
  14. 在写程序时, 可以把用到的 图标,图片,声音等外部资源,放在一个 .resx (资源文件)中. 这样的好处是不用考虑什么路径的问题.而且还对资源有保护的做用. 1.创建一个 ResourceFile.resx 文件. (ResourceFile 可以为自定义的任意名称) 2.向ResourceFile.resx 里添加资源文件 . 3.可以直接在C# 文件中这样使用:   比如:主窗体的图标:     this.Icon = (Icon)(ResouceFile.ResourceManager.GetObject("资料的名称无后缀"));

  15. Don't See Properties Folder in VS Project
  16. I have two projects. One where I can see the properties folder within the project and the other I can't. I have right-clicked on the solution and selected properties, but I see no way to add the folder.

    My Solution: 1. created a folder named as Properties. 2. added resource.resx file under project(select project name and then click add... 3. then drag the created resource.resx file into Properties item under this project... 4. the same as as other files...

Docker in C#

Docker in C#

  1. TMDock - Dockbar samples alpha blend
  2. Dockbar sample, shows many alpha blend functions.

  3. xDockManager - Per Pixel Alpha Blend
  4. Dock is a smoothly animated, per pixel alpha-blended application written in Vb.net 2003

  5. Convertion of Xdock VB to CS by C-Sharpener For VB.
  6. Convertion VB to CS by C-Sharpener For VB of the XDock projet

  7. A Resizable Graphical Rectangle
  8. study this control.

    An object associated with a pictureBox managing callback to manipulate the rectangle area.

  9. tartool
  10. A simple windows command line tool

slider control & other user control

slider control & other user control

  1. Anatomy of a UserControl (SliderControl)
  2. This article presents a step-by-step guide for the implementation of a UserControl named SliderControl.

  3. Canvas implementation for C#
  4. Design and implementation of canvas in C#

  5. Drawing Component to build GIS and CAM applications
  6. An object oriented drawing component for building GIS and CAM applications with multiple views of geometrical model, multiple resolution handling, layers, optimized graphics and more.

  7. Map component for building GIS applications (GisMap)
  8. Map component for building GIS and CAD/CAM applications. Reads most of the vector and raster formats, performs coordinate system transformations, accesses aerial photography via web services and more.

  9. Mapview
  10. Application is intended to create a 2D canvas from interactive, creating the vector graphics

  11. Draw a US Flag using C# and GDI+
  12. This article shows how to draw graphics objects using C# and GDI+

  13. Spherical Coordinates in C#
  14. This article shows how to create spherical graphics objects

  15. A Simple Pie Chart Control
  16. An article written in to describe a simple pie chart control implemented to be used in MFC applications.

  17. Analog Meter
  18. Analog meter control with the possibility to set a custom renderer

  19. GraphSheet Control for Windows
  20. A GraphSheet control in .NET, using GDI+ and the System.Drawing namespace

documentation tools in C/C++

documentation tools in C/C++

  1. A Graphical Documentation System for C/C++ projects
  2. A concept-tool to create interactive documentations for C/C++ projects

  3. Slickflow Coding Graphic Model User Manual
  4. Process diagram can be generated by C# code rather than GUI interface

  5. Building an oriented graph in a graphical application
  6. This article describes a simple way to build an oriented graph using controls.

  7. GtCalc: A C++ Spreadsheet Control for GT Graphical User Interface Library
  8. tCalc is a spreadsheet library for the GT Graphical User Interface Library

  9. GtProject: A C++ Project Management Control for GT Graphical User Interface Library
  10. GtProject is intended to provide the user a Microsoft Project equivalent control to use for scheduling tasks.

  11. GT: A C++ Graphical User Interface Library and System
  12. GT is a compact, efficient, and customizable graphical user interface (GUI) library for the Windows environment.

  13. qTimeLineEditor - A flexible graphical time line editor for your animations
  14. qTimeLineEditor - A flexible graphical time line editor for your animations

  15. SVGPad - Application and class library for editing SVG documents.
  16. simple C# application and a C# class library for editing SVG documents.

  17. Custom AntiAliasing with GDI+
  18. Alternate Antialiasing in GDI+

Graphics class

Graphics class

    Must-Read

  1. A Resizable Graphical Rectangle
  2. An object associated with a pictureBox managing callback to manipulate the rectangle area.

  3. Horizonal and Vertical Rules using System.Drawing Graphics Object
  4. This article discusses the implemenation of horizontal and vertical rules for Windows Forms by utilizing the System.Drawing Graphics object.

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

  7. [tut 3] Graphics Program using C# Drag & Drop & Delete Objects
  8. Part 3 of a tutorial to show a graphics program using C# using GDI and SVG drag and drop and delete objects

  9. rePaint in OnPaint - How to Clear graphics which has been painted before ( to effect new changes)
  10. clear graphis onpaint

    Graphics class

  11. Special 'Graphics' Objects to Draw Anywhere on Your Window
  12. Creating special 'Graphics' objects to draw anywhere on your window, including non-client area

  13. Graphics Debugger Visualizer
  14. A debugger visualizer for managed Graphics objects

  15. Magic Graphics
  16. A library that lets you easily manipulate your drawings

  17. Magic Graphics
  18. A library that lets you easily manipulate your drawings

  19. Professional C# - Graphics with GDI+
  20. An explanation and demonstration of the concepts behind GDI+.

  21. CNC Graphical Backplotter
  22. Article and source code for creating a CNC graphical backplotter

  23. AGE, Another Graphic Engine in .NET
  24. A library that allows some GDI+ manipulation at runtime in an easy way

  25. 3D Graphics - Cube with Shading
  26. Create a cube you can rotate and shade using only GDI+.

  27. Graphics Debugger Visualizer
  28. Graphics Debugger Visualizer

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

  31. UltraDynamo (Part 4) - Graphics and Fonts
  32. In this section, we will take a look at some of the graphic and font handling routines.

  33. UltraDynamo (Part 2) - It Is All About the Sensors
  34. In this section, we will take a look at the sensors, the sensor manager and the simulation

  35. UltraDynamo (Part 3) - Real Time Trends
  36. A look at achieving real time trends in UltraDynamo

  37. UltraDynamo (Part 5) - Building, Code Signing and Packaging
  38. In this section, we will take a look at what is required to build, sign and package the application.

  39. Age: The Scripted Graphic Item
  40. An introduction to ScriptedItem and ScriptAge for the AGE engine

  41. SimpleLine line and box graphics controls
  42. A line and container box control that support gradients

  43. Copying graphics with BitBlt (.NET Style)
  44. When Graphics.Clone() just won't do.

  45. Build My Own 3D Graphics Engine Step By Step
  46. How to build my own 3D graphics engine from ZERO step by step

  47. Create Pie Chart Using Graphics in C# .NET
  48. This article shows how to create a Pie chart using the Graphics class in C#.

  49. A Beginner’s Primer on Drawing Graphics using the .NET Framework
  50. A primer to help launch the beginner with drawing graphics.

  51. Many Questions Answered At Once: Interactive Animated Graphics with Forms
  52. Addresses questions on graphics, threading with UI, form development, printing and more

  53. AGE: write your custom Graphic library
  54. How to write a custom GraphicItem library for the AGE engine

  55. FlickerFree - Creating flicker-free graphics with GDI+
  56. Sample code on how to create flicker-free graphics with GDI+.

  57. Anti Flicker Graphics using Double Buffering and how to make simple graphic moves.
  58. This example will show you how to use doublebuffering and hopefully allows you to make images move across your screen.

  59. Simple Binary Clock using Graphics
  60. A simple binary clock snippet

  61. Simple Graphics Class
  62. A simple graphics class for 2D drawing

  63. Affine Transformations in Computer Graphics
  64. ome simple examples of how to apply affine transformations in computer graphics.

  65. Extended Graphics - Rounded rectangles, Font metrics and more for C# 3.0
  66. Adding missing functionality to the Graphics class with the use of Extension Methods in C# 3.0.

  67. Slickflow Coding Graphic Model User Manual
  68. Process diagram can be generated by C# code rather than GUI interface

Monday, May 30, 2022

draw library in C#

draw library in C#

  1. Drawing Library
  2. A library for creating shapes and developing tools.

  3. Graphical grid component
  4. Easy manipulation of graphical grids

    use it in my draw library

  5. Controlling scrolling with the API
  6. Scrolling with the API.

  7. A Simple Utility for Drawing Function Curves
  8. This is a small utility that takes a formula of f(x) function from a textbox, calculates points in background using VBS, and draws a graph based on this function in a PictureBox control, with gridline and coordinate system. The utility also enables the user to zoom in and out of the graph, to move it around, and also can show specific points of the curve using the mouse.

  9. Draw with Mouse
  10. An article showing how to draw on screen

  11. Symmetry Drawing Tool
  12. An article describing the development and use of the Symmetry Drawing Tool.

  13. A Graphics Drawing Tool by using C# and Winforms
  14. A Graphics Drawing Tool by using C# and Winforms

array in C#

array in C#

  1. Multidimensional Arrays (C# Programming Guide)
  2. Arrays can have more than one dimension. For example, the following declaration creates a two-dimensional array of four rows and two columns.

JSON tricks

JSON tricks

  1. Working with JSON in C# & VB
  2. Working with simple JSON objects and collections to Custom Converters and Transformations into .NET classes

Thursday, May 26, 2022

move a shape

move a shape

drawing a shape and moving it by mouse (using c#.net)

  1. How to draw and move shapes using mouse in C#
  2. I'm new to programming in C# and wanted to ask for a little bit of help. I'm currently trying to move a color-filled rectangle that I draw on a Windows Application form with my left mouse button, and I'm trying to drag-and-drop it to another location using my right mouse button. Currently I've managed to draw the rectangle, but the right click is dragging the entire form along.

  3. Drawing a shape and moving it by mouse (using C#.Net)
  4. Suppose we have an image or a shape drawn on a Picturebox control on a Windows Form. And we wanted to move the shape or image by mouse. The code is very quick to implement using C#.Net.

  5. How do I draw a rectangle in picturebox with mouse move , mouse up , mouse down , and picturebox.paint .
  6. How do I draw a rectangle in picturebox with mouse move , mouse up , mouse down , and picturebox.paint .

  7. Draw a rectangle on mouse click
  8. Can I draw a rectangle with mouseClick? My code is not working so far. Can you help me?

  9. How To Move A Line With Mouse In C#
  10. I want to try to make a pong game in c#.I already drew the line on the form, but I'm stucked at the point where I have to move it by mouse(or by arrows).Here is my code:

  11. C# – How to draw and move shapes using mouse in C#
  12. I'm new to programming in C# and wanted to ask for a little bit of help. I'm currently trying to move a color-filled rectangle that I draw on a Windows Application form with my left mouse button, and I'm trying to drag-and-drop it to another location using my right mouse button. Currently I've managed to draw the rectangle, but the right click is dragging the entire form along.

  13. winforms - How to drag and move shapes in C#
  14. In a C# WindoeFormsApplication, is it possible to select, hence to move or delete a plotted shape with mouse? Like the windows paint program. The shape plotting works totally fine, all points are stored in some array. As this line drawing example

  15. Drawing Shapes : Mouse Draw « 2D Graphics « C# / C Sharp
  16. Drawing Shapes

    the bottom section has 4 links.

  17. Drag and draw : Mouse Draw « 2D Graphics « C# / C Sharp
  18. Drag and draw : Mouse Draw « 2D Graphics « C# / C Sharp

Tuesday, May 24, 2022

DrawReversible method

DrawReversible method

  1. A question about ControlPaint.DrawReversibleFrame
  2. A question about ControlPaint.DrawReversibleFrame

  3. C# Rectangle Offset(System.Drawing.Point pos)
  4. C# Rectangle Offset(System.Drawing.Point pos) Adjusts the location of this rectangle by the specified amount.

  5. Why does ControlPaint.DrawReversibleFrame seem to be drawn at an offset to the mouse location
  6. Why does ControlPaint.DrawReversibleFrame seem to be drawn at an offset to the mouse location

  7. System.Windows.Forms.ControlPaint.DrawReversibleFrame(System.Drawing.Rectangle,

  8. ControlPaint.DrawReversibleFrame(Rectangle, Color, FrameStyle) Method
  9. Draws a reversible frame on the screen within the specified bounds, with the specified background color, and in the specified state.

  10. DrawReversibleFrame unwanted behavior (disappear, messy draw) when side controls Invalidates
  11. I'm using DrawReversibleFrame to draw a rectangle with inverse colors based on mouse position over a control called SelectionTest. The basic code to use DrawReversibleFrame was taken from this MSDN sample.

  12. How to draw a rubber band rectangle or a focus rectangle in Visual C#
  13. Microsoft KB Archive/314945: Famous article

  14. Crafting a C# Forms Editor from scratch / Applications / C#
  15. A Forms Editor allows you to add, move, resize, and delete controls on your form. The dialog editor of VC6 and the Forms Designer of VS.NET are Forms Editors we commonly use at design time.

  16. C# Rect Tracker
  17. C# Rect Tracker (like CRectTracker on C++).

  18. Visual Studio Editor Clone V0.1a
  19. A clone of the Visual Studio .NET 2002 editor.

  20. CDiagramEditor - DIY vector and dialog editor
  21. A feature rich vector editor skeleton.

  22. Writing a fast formula interpreter / Computational Geometry / C#
  23. Have you ever wondered how Microsoft Excel solves its formulas? This here is your way to get your own, personal and fast formula interpreter. It is used in products such as: VariPlot - 2D Graph plotter VariPlot3D - 3D Surface plotter VariComplex - Fractals visualizer

  24. C# ControlPaint.DrawReversibleFrame方法代码示例
  25. 本文整理汇总了C#中System.Windows.Forms.ControlPaint.DrawReversibleFrame方法的典型用法代码示例。如果您正苦于以下问题:C# ControlPaint.DrawReversibleFrame方法的具体用法?C# ControlPaint.DrawReversibleFrame怎么用?C# ControlPaint.DrawReversibleFrame使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类System.Windows.Forms.ControlPaint的用法示例。

Saturday, May 21, 2022

TableLayoutPanel topics continued...

TableLayoutPanel topics continued...

    Examples

  1. Dynamically Generating A TableLayoutPanel
  2. The TableLayoutPanel in .NET is a great control for organizing other controls on a Windows form. We here at ImageSource use it all of the time. Most developers just generate all of the rows and columns from designer and never mess with the control again at runtime. Unlike the ListBox and ListView controls,changing the Rows and Columns at runtime is not immediately obvious in the TableLayoutPanel. The following set of code will demonstrate will demonstrate a way to accomplish this non-intuitive task.

  3. TableLayoutPanel In C#
  4. TableLayoutPanel control represents a panel that dynamically lays out its contents in a table format. You want to use a TableLayoutPanel in complex and sophisticated applications where you need to create dynamic layouts.

    Other Research

  5. C# – Winforms TableLayoutPanel adding rows programmatically
  6. I've been fighting with this for a while, and have found that a number of other people struggle with the TableLayoutPanel (.net 2.0 Winforms) as well.

  7. c# - Winforms TableLayoutPanel adding rows programmatically
  8. I've been fighting with this for a while, and have found that a number of other people struggle with the TableLayoutPanel (.net 2.0 Winforms) as well.

  9. Winforms TableLayoutPanel adding rows programmatically
  10. a good summary of all kinds of solutions: five

  11. How to add rows and columns dynamically for TableLayoutPanel in Windows Forms
  12. I'm using below code. with one row and three columns how can keep dynamically increasing my rows and columns for this table layout panel

  13. Add Row Dynamically in TableLayoutPanel
  14. a stackoverflow question...

  15. C# .NET - dynamically create Table Layout Panel
  16. I am creating Table Layout Panel dynamically. Now i want o create table cell and rows dynamically..The no. of columns and rows depends on my loo

Friday, May 20, 2022

rubber band

rubber band

ruler on cp.com

    Must download

  1. .Paul wiki page
  2. good links and need to absorb...

  3. [RESOLVED] Rubberband Lines
  4. I am using a modified version of chimeric69 Rubberband Lines example from CodeProject . I have posted there but then i released he hasn't visited since Jun '08 . chimeric69's example disposes of the drawlines/string in the mouse up event some how. I have tried to comment out various pieces of the code to stop the dimensions "label" from being disposed of with out any luck.

  5. Inspirational Visual Basic.Net
  6. Many good thoughts and need to absorb...

  7. Maths Revision V1.0
  8. This is a suite of 22 revision aid programs + tools I wrote... You can download the compiled version (msInstaller) here + the zipped source code for the 22 applications here.

  9. Maths Revision V2.0
  10. This is my second suite of 22 revision aid programs + tools I wrote...

  11. OOP - Transformations
  12. Mathematical transformations are usually drawn on hard copy graph paper. This application demonstrates simple transformations. There are four types of transformation shown here, which are Enlargement, which can be positive or negative, Reflection, with a variable line of symmetry, Rotation with a variable centre of rotation and positive and negative angles of rotation, and the fourth transformation is Translation. These are the type of transformations that you're often asked to draw in maths exams...

  13. Using Forms + Controls
  14. Forms in VB.Net are used as containers for Controls. Both Forms + Controls have Properties, Events, + Methods.

  15. Solving Triangles
  16. This is a wizard style app. that through a series of questions determines which type of Triangle Solver you need. The solution is given to your chosen number of Decimal Places or Significant Figures, both in the solver form and as an HTML page where step by step solutions are shown, along with a scale diagram and an area calculation.

  17. OOP Areas and Volumes
  18. This is an OOP Areas and Volumes Calculator. It consists of a core containing ten classes representing different geometric shapes. These shapes fall into two categories - 2D and 3D. All of the 2D Shape Classes implement the Shape2D Interface. All of the 3D Classes extend one of the 2D Classes, therefore, they indirectly implement the Shape2D Interface. Additionally, all of the 3D Classes implement the Shape3D Interface.

  19. OOP Statistical Functions
  20. This is an OOP example that focuses on Statistical Functions, with input via a NumericUpDown Control, and displaying output in a PropertyGrid Control. The OOP part is simple. There's a Class for each of these...

  21. VB.Net - Pascal's Pyramid
  22. Pascal's Pyramid is an original card game, played with an irregular deck of cards. The game board (or pyramid) is loosely based on Pascal's Triangle, which is a triangular array of the binomial coefficients. Each deck contains 20 aces, 4 each of numbers 2 to 10 inclusive, and 2 sets of face cards, which is 80 cards in total. The aim of the game is to build the pyramid with cards in a predefined order. It isn't possible to play an illegal move - the hexagon cells in the pyramid will only allow legal moves. Each deal from the deck gives you three new cards that you can either use or discard.

  23. VB.Net - Vertex (Game)
  24. This is an original strategy game, written in VB2008 (for wider platform compatibility).

  25. VB.Net - Random Maze Games
  26. This is a maze solving game, with a maze overlay drawn on an extended (restricted) DataGridView. The DataGridView only accepts arrow key input. The mazes are created in conjunction with a 2D array, and arrow key movement through the DataGridView is limited to clear paths. Navigation is blocked where walls are drawn. The solver part of the game finds and draws a path from the start cell to the end cell.

  27. C# - OOP Sudoku
  28. Sudoku is a number puzzle game, played on a nine by nine cell grid. Within that grid, there are nine sub-regions consisting of three cells by three cells. In this version, there are three levels of difficulty, which are Most clues, Medium clues, and Least clues.

    Good rubber band demo

  29. Rubberband Lines
  30. Using the rubberband line as a ruler.

  31. [RESOLVED] Rubberband Lines
  32. Some discussion on above article.

    the problem with the original program is that it draws directly to the form, which isn't persistent. as soon as the form is repainted, it erases the line. i changed it to draw to a bitmap that is then used as the forms backgroundimage.

    More Papers

  33. Resize and Rotate Shapes in GDI+
  34. Draw a shape-like editor implementing the use of anchors to resize and rotate a selection rectangle

  35. A Resizable Graphical Rectangle
  36. An object associated with a pictureBox managing callback to manipulate the rectangle area.

  37. GDI+ Basics
  38. The ControlPaint Class Technically, the ControlPaint class isn't a part of GDI+. However, it's an extremely useful tool for custom control developers who use GDI+. It is also a well kept .NET secret. Essentially, the ControlPaint class offers methods for drawing standard Windows interface elements, like scroll buttons, borders, focus rectangles, and check boxes.

    Best solution

  39. Bitmap.LockBits Method
  40. Locks a Bitmap into system memory.

  41. ControlPaint.DrawReversibleFrame(Rectangle, Color, FrameStyle) Method
  42. Draws a reversible frame on the screen within the specified bounds, with the specified background color, and in the specified state.

  43. Microsoft KB Archive/314945- How to draw a rubber band rectangle or a focus rectangle in Visual C#
  44. this is the authoritive information. I only need to use this technique.

    Tips:Note that this solution is available only for output on the screen. To draw reversible lines on a graphics object, you need to either interoperate with GDI or call Bitmap::LockBits() and manipulate the image bits directly.

  45. ControlPaint.DrawReversibleFrame - How am I supposed to erase drawn rectangle?
  46. good discussion

  47. a good example to use this ControlPaint.DrawReversibleFrame method
  48. System.Windows.Forms.ControlPaint.DrawReversibleFrame(System.Drawing.Rectangle, System.Drawing.Color, System.Windows.Forms.FrameStyle)

    More Examples

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

  51. C# Rubber Rectangle
  52. Implements a Rubber Rectangle in C#.

    Rubber Band

  53. Drawing rubber-band lines and shapes
  54. The lack of XOR Drawing feature in GDI+ was not certainly welcome in the programmer's community. I guess it will be hard to survive with this handicap.

  55. Rotate a point around another point
  56. I have a task to draw a specific graphic. As part of this task I need to rotate some dot's on 45 degrees.

  57. How to Draw a Rubber Band Selection Rectangle accurately on a Rotated Canvas?
  58. C# How to Draw a Rubber Band Selection Rectangle on Panel, like one used in Windows Explorer?
  59. I have one Flow Layout Panel with some User Controls in it. I Want to Select these controls using rectangle selection using Mouse,like one used in windows file explorer . I have tried these : https://support.microsoft.com/en-us/kb/314945 But it was very flickering and not useful (I might be wrong,please correct me). Any good examples please.

  60. Thursday, December 16, 2010 Draw Rubber Band like Explorer using C# .NET
  61. Drawing a Line Chart in GDI+
  62. Charts are useful for representing numeric data in a graphical way. There are several different types o charts, including pie, line, and bar charts. In this section we will learn how to use GDI+ and ASP.NET to draw a line chart from data entered by a user.

  63. Draw Line in C#
  64. The DrawLine method draws a line between two points specified by a pair of coordinates. DrawLines draws a series of lines using an array of points.

  65. Applied cryptography Part 2: a tool to encrypt files on your HDD
  66. C# ControlPaint Draws a reversible frame on the screen within the specified bounds, with the specified background color, and in the specified state.
  67. This tutorial shows how to use C# ControlPaint type DrawReversibleFrame(System.Drawing.Rectangle rectangle, System.Drawing.Color backColor, System.Windows.Forms.FrameStyle style) method.

  68. Control.PointToScreen(Point) Method
  69. Computes the location of the specified client point into screen coordinates.

  70. Control PointToClient() vs PointToScreen()
  71. The MSDN does not provide, IMHO, a clear difference between Control.PointToScreen(link) and Control.PointToClient(link) methods.

  72. c#: PointToClient与PointToScreen
  73. 很早就见过这两个方法,却未曾深入研究,偶尔一用,却纠结于其转换方法,遂写Demo以求验证,记录认知以做备忘。

  74. Customizing Windows Forms In C#
  75. I wanted to create Custom windows forms in C#. Before working on this code, i started to find any code that could help me to create custom windows forms in C# on internet. but unfortunately i couldn't find any simple and useful also looks good form code. I found some code but they all are complicated. I also found some codes that are simple but not useful. When i started working on solving this problem, i thought to use Custom Panel/Panel as a border of a Frame for change the size of Form such as Width, Height etc and use Custom Buttons as a Control Box of a Frame.

  76. WSSizer, a .NET re-size control
  77. A .NET control meant to accomplish a task similar to MFC’s CRectTacker().

  78. A C# Sample Code/Article Extending the Capabilities of GDI+ in C# (.NET) - Part I
  79. The article is about extending the capabilities of GDI+ in C# , When programmers look to develop serious imaging applications, a surprising shortcoming is noticed in GDI+. The shortcoming is the absence of an API which is useful in selecting regions within an image in a user interactive way.

  80. A C# Sample Code/Article Extending the Capabilities of GDI+ in C# (.NET) - Part II
  81. This article is a continuation to my previous article where I present two more methods to do the same

  82. Smooth Resize and Reposition
  83. A demo on how to smoothly change the size or position of a Windows Form while holding down a button.

  84. Drawing Lines And Rectangles Using the Mouse
  85. Simple program utilizing the mouse to draw lines and rectangles.

  86. Drawing Rich Text with GDI+
  87. GDI+ does not support rendering of Rich Text and this has always represented a challenge for developers. The approach described in this article offers a solution to such limitation by tapping into the power of API hooking.

  88. Introduction to Numerical Methods
  89. Introduction to Numerical Methods and Updated Polynomial Class

  90. An introduction to numerical programming in C#
  91. Some of the first things you need to know when writing numerical software in C#.

  92. Numerical Laplace Transforms and Inverse Transforms in C#
  93. Presents a C# class for calculating Laplace tranforms and inverse transforms.

  94. Maintenance and Updating of Legacy Code
  95. A collection of tips to help you maintain your legacy code more efficiently

Thursday, May 19, 2022

Point/Size/Rectangle struct

Point/Size/Rectangle struct anf Graphics class

  1. C# Application Programming
  2. All articles and source code are under the Visual C# Kicks license agreement

  3. Draw a single pixel on Windows Forms
  4. I'm stuck trying to turn on a single pixel on a Windows Form.

  5. Produce a random number in a range using C#
  6. How do I go about producing random numbers within a range?

  7. Hit Testing Lines and Curves
  8. Useful graphics applications, such as CAD or drawing programs, permit the user to select and manipulate graphics objects. This article describes three methods for detecting if the user has selected a line or a curve.

  9. GDI+ Line/Curve Drawing and Hit Test
  10. Demo application for developing a drawing application using GDI+. Featuring line/curve draw, hit test, and implementation of CObject/CObArray classes.

  11. Mathematics of 2D Hit-testing
  12. Computer games or graphical user interfaces often need to check if certain objects overlap, get selected or manipulated by the user. Using a pointing device like a mouse is therefore a very natural way of interacting with the world. Detecting if objects are hit, highly depends on the type of objects that interact with each other.

  13. how to map a square to a circle
  14. Create a circle out of three points
  15. A circle is a set of infinite points in two dimensions. However, a circle is clearly described by three of such points. The opposite direction is also correct as long as not all three points are on a straight line.

  16. How to plot a covariance error ellipse
  17. A typical way to visualize two-dimensional gaussian distributed data is plotting a confidence ellipse. Lets assume we have data D\sim\mathcal{N}(\mu, \Sigma)D∼N(μ,Σ) and want to plot an ellipse representing the confidence pp by calculating the radii of the ellipse, its center and rotation. The following plot shows randomly drawn data and the ellipses for p\in\{0.9, 0.95, 0.99\}p∈{0.9,0.95,0.99}:

  18. Graph Marker with Hit-Testing
  19. Hit Testing for Lines and Curves
  20. Hit Testing for Lines and Curves

  21. Hit Testing in the Visual Layer
  22. How to: Use Hit Testing with a Region
  23. Results 1 to 12 of 12 Thread: Hit testing on lines, (one for the more mathematically minded maybe)
  24. Graphics.ScaleTransform Method
  25. Applies the specified scaling operation to the transformation matrix of this Graphics by prepending it to the object's transformation matrix.

  26. The Contains Method and Hit Test in GDI+
  27. The Contains method is used to determining whether a rectangle or point is inside the current rectangle. If a point is inside the current rectangle, the Contains method returns true; otherwise it returns false. One of the common uses of Contains is to find out is a mouse button was clicked inside a rectangle.

  28. Understanding the SetStyle Method in GDI+
  29. Windows Forms and controls provide built-in support for double buffering, and the SetStyle method of the Control class plays a vital role in this process. Before we discuss how to use SetStyle, let's take a look at this method and its members.

  30. Adding Mouse Gesture Functionality to Your .NET Application Within Seconds
  31. Drawing Lines And Rectangles Using the Mouse
  32. Move Controls on a Form at Runtime
  33. Move and Resize Controls on a Form at Runtime (With Mouse)
  34. OAG Library (OpenGL) Part 2.1 - Drawing Objects 2D using the Mouse and Programatically
  35. Drawing a bounding box over an image with C#/.net and WinForms

Tuesday, May 17, 2022

user control tricks

create simple engine from Custom Control books.

Error Message "Code generation for property 'notchChanged' failed. Error was:'Type TimeSpanControl in Assembly... is not marked as serializable'.

    Solutions

  1. Code generation for property < xxx > failed
  2. Solution is the attribute:

    [DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]

  3. UserControl collection not marked as serializable
  4. I must be missing something really obvious. I'm quite new to C# but have been programming in C/C++ for years, so sorry if it IS something blindingly obvious ;)

    Solution - Step 1
    I believe that you have this problem because Designer automatically tries to serialize all public UserControl properties. If this property is not needed for your custom UserControl design time support, then you can Add "DesignerSerializationVisibility" attribute:

  5. How can i fix the error start with code generation for property controls failed when trying to save or rebuild the project ?
  6. Solution - Step 2
    find the solution here: basically need to clean up the corrupted code in designer.cs file. for my case, all index=0. it is not right...

    1. 1. Backup your project.
    2. 2. Comments InitializeComponent method.
    3. Sample:
      public Form() { //InitializeComponent(); }
    4. 3. Rebuild Solution.
    5. 4. Open the Form Designer.
    6. 5. Open the ‘Form.Designer.c’s and ‘Form.cs’, then remove the code about the labels which you want delete.
    7. 6. Uncomments InitializeComponent method and rebuild the solution.
    8. 7. Save the project and restart it.

    Research

  7. SerializableAttribute Class
  8. Indicates that a class can be serialized. This class cannot be inherited.

  9. Type in assembly is not marked as serializable
  10. Type in assembly is not marked as serializable
  11. DesignerSerializationVisibilityAttribute Class
  12. https://www.codeproject.com/Questions/1241809/Code-generation-for-property-failed-Error-was-type
  13. C# Application Detected By Kaspersky As Trojan Virus (VHO:Trojan.MSIL.Convagent.gen)
  14. 0 "VHO:Trojan-Ransom.MSIL.Convagent.gen" how is fix

  15. Advanced Build Settings dialog box (C#)
  16. Use the Advanced Build Settings dialog box of the Project Designer to specify the project's advanced build configuration properties. This dialog box applies to C# projects only.

Monday, May 16, 2022

IEnumerable vs. List

c# ienumerable to list

  1. IEnumerator Interface
  2. Supports a simple iteration over a non-generic collection.

  3. IEnumerable Interface
  4. Exposes an enumerator, which supports a simple iteration over a non-generic collection.

  5. List <T > Class
  6. Represents a strongly typed list of objects that can be accessed by index. Provides methods to search, sort, and manipulate lists.

  7. C# | List Class
  8. List <T > class represents the list of objects which can be accessed by index. It comes under the System.Collection.Generic namespace. List class can be used to create a collection of different types like integers, strings etc. List lt;T > class also provides the methods to search, sort, and manipulate lists.

  9. IEnumerable in C#
  10. Many times there is a need to loop through a collection of classes or lists which are anonymous types. IEnumerable interface is one of the best features of C# language which loops over the collection. Let us learn about it step by step so beginners also can understand.

    Examples

  11. Converting from IEnumerable to List [duplicate]
  12. Casting IEnumerable<T > to List <T >
  13. I was wondering if it is possible to cast an IEnumerable to a List. Is there any way to do it other than copying out each item into a list?

  14. Convert an IEnumerable to a List in C#
  15. C# IEnumerable Examples
  16. Use the IEnumerable interface. IEnumerable things can be looped over with foreach.

  17. Understanding and Implementing the Iterator Pattern in C#
  18. How to implement the Iterator pattern in C#

  19. A Beginner's Tutorial on Implementing IEnumerable Interface and Understanding yield Keyword
  20. This article discusses how to implement IEnumerable interface and using yield keyword.

  21. Implement a method returning an IEnumerable (Iterators in C#)
  22. Developers do not need to implement the IEnumerable and IEnumerator interfaces to return an IEnumerable. They can avoid writing all of that code by taking advantage of support for iterators in C#. This tutorial shows how.

  23. Split String

  24. Split a string by another string in C#
  25. I've been using the Split() method to split strings, but this only appears to work if you are splitting a string by a character. Is there a way to split a string, with another string being the split by parameter?

  26. C# Split String Examples
  27. Use the string.Split method. Call Split with arguments to separate on newlines, spaces and words.

Saturday, May 14, 2022

target framework 7.0

  1. Does C# 7.0 work for .NET 4.5?
  2. I created a project in Visual Studio 2017 RC to check whether I can use new C# 7.0 language features in a .NET Framework 4.5 project. It seems to me that after referencing System.ValueTuple NuGet, new tuples are working fine. Is there anything else I should think about, or is this going to work?

  3. Compiler targetting C# 7.0 instead of 7.3 - Visual Studio 2019 - .NET 4.7.2
  4. am trying to use a feature of C# 7.3 in an ASP.NET application running under .NET Framework 4.7.2. When I browse to a page with the C# 7.3 statement I get the error message “Feature ‘default literal’ is not available in C# 7.0. Please use language version 7.1 or greater.” On going to Project Properties -> Build -> Advanced, my ability to explicitly select the C# version is greyed out with a message “Automatically selected based on framework version”.

    Clicking “Why can’t I select a different C# version” takes me to a page that tells me that the default for .NET Framework is 7.3 which it clearly isn’t. I’ve created a Directory.Build.props to try and force this to use 7.3 but it is ignored, and in any case should not be necessary.

    Why is this greyed out and why is it selecting the wrong version of C#?

  5. 4 ways to enable the latest C# features
  6. The C# language evolves regularly. C# 7.1 is available with Visual Studio 2017 Update 3 (version 15.3). However, the new functionalities of C# 7.1 are not available by default. By default, the version of C# is the latest major version (currently 7.0). You must explicitly edit the configuration of your projects to set the version of the language.

  7. C# language versioning
  8. The latest C# compiler determines a default language version based on your project's target framework or frameworks. Visual Studio doesn't provide a UI to change the value, but you can change it by editing the csproj file. The choice of default ensures that you use the latest language version compatible with your target framework. You benefit from access to the latest language features compatible with your project's target. This default choice also ensures you don't use a language that requires types or runtime behavior not available in your target framework. Choosing a language version newer than the default can cause ha

  9. Understanding the project file
  10. Microsoft Build Engine (MSBuild) project files lie at the heart of the build and deployment process. This topic starts with a conceptual overview of MSBuild and the project file. It describes the key components you'll come across when you work with project files, and it works through an example of how you can use project files to deploy real-world applications.

  11. Error NETSDK1045: The current .NET SDK does not support targeting .NET 6.0
  12. I spent 2 hours trying to figure out what's wrong with my pipeline for Azure Functions .NET6 (on Windows).

color picker

color picker

  1. Adobe Color Picker Clone
  2. A simple but powerful .NET color picker dialog.

  3. Adobe Gradient Picker Clone
  4. An article about implementing a gradient manager

  5. NDoc Code Documentation Generator for .NET
  6. NDoc Code Documentation Generator for .NET

IClonable

c# icloneable clone example

  1. value (C# Reference)
  2. The contextual keyword value is used in the set accessor in property and indexer declarations. It is similar to an input parameter of a method. The word value references the value that client code is attempting to assign to the property or indexer. In the following example, MyDerivedClass has a property called Name that uses the value parameter to assign a new string to the backing field name. From the point of view of client code, the operation is written as a simple assignment.

  3. Proper way to implement ICloneable
  4. What is the proper way of implementing ICloneable in a class hierarchy? Say I have an abstract class DrawingObject. Another abstract class RectangularObject inherits from DrawingObject. Then there are multiple concrete classes like Shape, Text, Circle etc. that all inherit from RectangularObject. I want to implement ICloneable on DrawingObject and then carry it down the hierarchy, copying available properties at each level and calling parent's Clone at the next level.

  5. Implementing ICloneable in a class
  6. Implement ICloneable in a class with a twist. Expose a public type safe Clone() and implement object Clone() privately.

  7. How to Implement ICloneable Interface in Derivable Classes in .NET
  8. It is common requirement in .NET programming to create a cloneable class, i.e. to implement System.ICloneable interface. Another common requirement is to implement a class which would serve as a base class to other classes. It is somewhat less common to implement both requirements at the same class, i.e. to make a class cloneable in such way that classes derived from it are also cloneable.

  9. The ICloneable Controversy: Should a Class Implement ICloneable or Not?
  10. System.ICloneable interface has been introduced with a relatively vague accompanying documentation and ever since it has remained the inexhaustible source of disputes. Should a given class implement ICloneable interface or not? And, once it does, should the clone be deep or shallow? And if deep, how deep? And if moderately deep, how much of the implementation details shoul be documented and communicated to the consumer?

Tuesday, May 10, 2022

Graphics Layer

C# Graphic Layer

C# basics of drawing graphics onto windows forms

  1. Drawing to a new "layer" in C#
  2. Building a little paint program and am trying to incorporate the concept of layers.

    Basics

  3. Automatic scaling in Windows Forms
  4. Automatic scaling enables a form and its controls, designed on one machine with a certain display resolution or system font, to be displayed appropriately on another machine with a different display resolution or system font. It assures that the form and its controls will intelligently resize to be consistent with native windows and other applications on both the users' and other developers' machines. The support of the .NET Framework for automatic scaling and visual styles enables .NET Framework applications to maintain a consistent look and feel when compared to native Windows applications on each user's machine.

  5. automatic-scaling-in-windows-forms.md
  6. Automatic scaling enables a form and its controls, designed on one machine with a certain display resolution or system font, to be displayed appropriately on another machine with a different display resolution or system font. It assures that the form and its controls will intelligently resize to be consistent with native windows and other applications on both the users' and other developers' machines. The support of the .NET Framework for automatic scaling and visual styles enables .NET Framework applications to maintain a consistent look and feel when compared to native Windows applications on each user's machine.

  7. WinForms Auto-Scaling
  8. If you lay out a form with system font size set to Normal (96 DPI) in the Display control panel, what happens when your users are using Large (120 DPI) or one of the custom settings? You�d certainly prefer that a form like Figure 1 show properly at all font sizes.

  9. Professional C# - Graphics with GDI+
  10. An explanation and demonstration of the concepts behind GDI+.

  11. The Basics of Drawing Graphics onto Windows Forms Dave
  12. GDI+ consists of the set of .NET base classes that are available to control custom drawing on the screen. These classes arrange for the appropriate instructions to be sent to the graphics device drivers to ensure the correct output is placed on the screen. GDI provides a level of abstraction, hiding the differences between different video cards. You simply call on the Windows API function to do the specific task, and internally the GDI figures out how to get the client's particular video card to do whatever it is you want when they run your particular piece of code.

  13. Understanding the SetStyle Method in GDI+
  14. Windows Forms and controls provide built-in support for double buffering, and the SetStyle method of the Control class plays a vital role in this process. Before we discuss how to use SetStyle, let's take a look at this method and its members.

  15. Lesson 7 - Drawing on Graphics in C# .NET
  16. In the previous lesson, Birthday Reminder - Storing Data and Conclusion, we finished creating the birthday reminder. We tried the basic form controls on it, as well as bindings and error handling. We are already able to create quite sophisticated applications. In today's C# .NET tutorial we're going to take a look at drawing.

  17. System.Drawing Windows Forms Quickstart
  18. The Basics of GDI
  19. In graphical user interfaces such as Microsoft Windows, drawing on the screen is an important task.

  20. A Beginner’s Primer on Drawing Graphics using the .NET Framework
  21. A primer to help launch the beginner with drawing graphics.

    Basics from MS

  22. Getting Started with Graphics Programming
  23. This section shows how to get started using GDI+ in a Windows Forms application. The following topics show how to complete several GDI+ tasks such as drawing and filling shapes and text.

  24. How to: Create Graphics Objects for Drawing
  25. Before you can draw lines and shapes, render text, or display and manipulate images with GDI+, you need to create a Graphics object. The Graphics object represents a GDI+ drawing surface, and is the object that is used to create graphical images.

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

  28. Drawing Graphics in C Sharp
  29. The purpose of this chapter of C# Essentials is to provide the reader with knowledge of the basics of graphics drawing in C#. Drawing in C# is achieved using the Graphics Object. The Graphics Object takes much of the pain out of graphics drawing by abstracting away all the problems of dealing with different display devices and screens resolutions. The C# programmer merely needs to create a Graphic Object and tell it what and where to draw.

  30. Control.SetStyle(ControlStyles, Boolean) Method
  31. Sets a specified ControlStyles flag to either true or false.

  32. Saving a Screenshot Using C#
  33. FormDocumentDesigner.cs source code in C# .NET
  34. / DotNET / DotNET / 8.0 / untmp / whidbey / REDBITS / ndp / fx / src / Designer / WinForms / System / WinForms / Design / FormDocumentDesigner.cs / 2 / FormDocumentDesigner.cs

  35. Drawing multiple layers without flicker
  36. Improve drawing speed using layers in .NET.

  37. Many Questions Answered At Once: Interactive Animated Graphics with Forms
  38. Addresses questions on graphics, threading with UI, form development, printing and more

  39. Animated Controls using graphic layers
  40. This article discusses how to create animated controls using graphic layers.

  41. Design of Movable / Resizable Plots and Their Use in Applications
  42. Design of movable / resizable plots and their use in applications.

List manipulations

List manipulations

  1. Checking for empty or null List<string >
  2. I have a List where sometimes it is empty or null. I want to be able to check if it contains any List-item and if not then add an object to the List.

  3. Enumerable.Any Method
  4. Determines whether any element of a sequence exists or satisfies a condition.

  5. What's the use of .Any() in a C# List<>?
  6. I've been discussing this with colleagues, and we couldn't figure out what the use is of .Any for any given List< >, in C#. You can check the validity of an element in the array like the following statement: if (MyList.Any()){ ...} //Returns true or false

  7. C# - List < T >
  8. The List <T > is a collection of strongly typed objects that can be accessed by index and having methods for sorting, searching, and modifying list. It is the generic version of the ArrayList that comes under System.Collections.Generic namespace.

  9. LINQ .Any VS .Exists - What's the difference?
  10. Using LINQ on collections, what is the difference between the following lines of code?

  11. Linq Any in C#
  12. n this article, I am going to discuss the Linq Any in C# with examples. Please read our previous article before proceeding to this article where we discussed the LINQ ALL Operator with some different kinds of examples. As part of this article, we are going to discuss the following pointers.

  13. Any( < predicate >) method
  14. Check if a list is empty in C#
  15. This post will discuss how to determine whether a list is empty in C#. The solution should return true if the list contains any elements; otherwise, false.

Monday, May 9, 2022

GANN topics

gann wheel the logic beneath

  1. good list of researchs
  2. check them out one by one

  3. Online Training -The Square of 9 Principles
  4. Secret revealed about W D Gann arithmetic 12 | Astrology Base | Earth Cycle | Intraday Rule
  5. GANN CALCULATOR AUTOMAIC || Gann Angle Wheel
  6. Bank Nifty Analysis Using Gann And Astrology To Capture Big Moves of 1000+ Points
  7. Mercury Retrograde and Jupiter Ingress can they lead to Reversal in Market
  8. Mercury Retrograde and Jupiter Ingress can they lead to Reversal in Market
  9. 0:31 / 6:49 [Trading Tutorial]: How to Predict Turning Point in Market Using Gann Technique

DateTime class

DateTime class

  1. DateTime.Compare(DateTime, DateTime) Method
  2. Compares two instances of DateTime and returns an integer that indicates whether the first instance is earlier than, the same as, or later than the second instance.

  3. USBDeview v3.03
  4. USBDeview is a small utility that lists all USB devices that currently connected to your computer, as well as all USB devices that you previously used. For each USB device, extended information is displayed: Device name/description, device type, serial number (for mass storage devices), the date/time that device was added, VendorID, ProductID, and more... USBDeview also allows you to uninstall USB devices that you previously used, disconnect USB devices that are currently connected to your computer, as well as to disable and enable USB devices.

  5. DLL Export Viewer v1.66
  6. This utility displays the list of all exported functions and their virtual memory addresses for the specified DLL files. You can easily copy the memory address of the desired function, paste it into your debugger, and set a breakpoint for this memory address. When this function is called, the debugger will stop in the beginning of this function. For example: If you want to break each time that a message box is going to be displayed, simply put breakpoints on the memory addresses of message-box functions: MessageBoxA, MessageBoxExA, and MessageBoxIndirectA (or MessageBoxW, MessageBoxExW, and MessageBoxIndirectW in unicode based applications) When one of the message-box functions is called, your debugger should break in the entry point of that function, and then you can look at call stack and go backward into the code that initiated this API call.