Тёмный

How to create a HMI Led Single Control With Visual Basic Net 

Industrial Networks
Подписаться 15 тыс.
Просмотров 15 тыс.
50% 1

Visual Basic.Net: HMI LedSingle Control
OnPaint: drive.google.com/file/d/0B6mc...
Buy HMI Professional Edition With Visual C#: play.google.com/store/apps/de...

Наука

Опубликовано:

 

13 мар 2017

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 10   
@user-gi3jl4ly6f
@user-gi3jl4ly6f 7 лет назад
thank you.
@user-gi3jl4ly6f
@user-gi3jl4ly6f 7 лет назад
Where I can down load HMI Professional Edition full version.
@ovalleuvallemiguelangel7967
@ovalleuvallemiguelangel7967 4 года назад
el link me pone como si ya no existiera la mera verdad necesito de tu ayuda
@BigBens1970
@BigBens1970 6 лет назад
The File on Google Drive was deleted: drive.google.com/file/d/0B6mc6hNRWHSSblk4OEN5aXNXS2s/view?usp=sharing The File "OnPaint.cs" can not be downloaded from Google Drive. The source code of the onPaint.cs file appears almost completely in the video. Only the overlong lines are missing, such as: Dim brush2 As Brush = DirectCast (New LinearGradientBrush (New Point (Math.Truncate (CDbl (pointf.X) - CDbl (num3))), CInt (Math.Truncate (pointf.Y) - CDbl (num3))), Brush ) These commands are incomplete because the display of source codes in the Visual Studio Editor is displayed without a line break. The following content of the onPaint.cs file could be recovered from the video: Protected Overrides Sub OnPaint(e As PaintEventArgs) MyBase.OnPaint(e) e.Graphics.SmoothingMode = Drawing2D.SmoothingMode.AntiAlias Dim g As Graphics = e.Graphics Dim pointf As New PointF(CSng(Me.Width) / 2.0F, CSng(Me.Height) / 2.0F) Dim num1 As Single = Math.Min(pointf.X, pointf.Y) Dim num2 As Single = CSng(CDbl(num1) * 65.0 / 100.0) Dim num3 As Single = CSng(CDbl(num1) * 55.0 / 100.0) Dim num4 As Single = CSng(CDbl(num1) * 45.0 / 100.0) Dim _brush As Brush = DirectCast(New LinearGradientBrush(New Point(CInt(Math.Truncate(CDbl(pointf.X) - CDbl(num2))), CInt(Math.Truncate(CDbl(pointf.Y) - CDbl(num2))))), Brush) g.FillEllipse(_brush, pointf.X - num2, pointf.Y - num2, 2.0F * num2, 2.0F * num2) _brush.Dispose() If Me._Value Then Dim path As New GraphicsPath() path.AddEllipse(pointf.X - num1, pointf.Y - num1, num1 * 2.0F, num1 * 2.0F) Dim pathGradientBrush As New PathGradientBrush(path) Dim colorArray As Color() = New Color(0) {Color.FromArgb(1, CInt(Me.OnColor.R), CInt(Me.OnColor.G), CInt(Me.OnColor.B))} pathGradientBrush.SurroundColors = colorArray g.FillEllipse(DirectCast(pathGradientBrush, Brush), pointf.X - num1, pointf.Y - num1, num1 * 2.0F, num1 * 2.0F) path.Dispose() pathGradientBrush.Dispose() End If Dim brush2 As Brush = DirectCast(New LinearGradientBrush(New Point(Math.Truncate(CDbl(pointf.X) - CDbl(num3))), CInt(Math.Truncate(pointf.Y) - CDbl(num3))), Brush) g.FillEllipse(brush2, pointf.X - num3, pointf.Y - num3, 2.0F * num3, 2.0F * num3) _brush.Dispose() Dim gp As New GraphicsPath() gp.AddEllipse(pointf.X - num4, pointf.Y - num4, num4 * 2.0F, num4 * 2.0F) If Me._Value Then Dim pathGradientBrush As New PathGradientBrush(gp) pathGradientBrush.CenterColor = Color.WhiteSmoke Dim ColorArray As Color() = New Color(0) {Me.OnColor} pathGradientBrush.SurroundColors = ColorArray pathGradientBrush.CenterPoint = New PointF(pointf.X - num4 / 2.0F, pointf.Y - num4 / 2.0F) g.FillEllipse(DirectCast(pathGradientBrush, Brush), pointf.X - num4, pointf.Y - num4, 2.0F * num4, 2.0F * num4) pathGradientBrush.Dispose() Else Dim pathGradientBrush As New PathGradientBrush(gp) pathGradientBrush.CenterColor = Color.WhiteSmoke Dim colorArray As Color() = New Color(0) {Me.OffColor} pathGradientBrush.SurroundColors = colorArray pathGradientBrush.CenterPoint = New PointF(pointf.X - num4 / 2.0F, pointf.Y - num4 / 2.0F) g.FillEllipse(DirectCast(pathGradientBrush, Brush), pointf.X - num4, pointf.Y - num4, 2.0F * num4, 2.0F * num4) pathGradientBrush.Dispose() End If gp.Dispose() End Sub
@KabergOficial
@KabergOficial 5 лет назад
The Link is broken
@saranganirwana8044
@saranganirwana8044 Год назад
Could you share the source code?? Please
@smeison1
@smeison1 5 лет назад
The File on Google Drive was deleted: drive.google.com/file/d/0B6mc6hNRWHSSblk4OEN5aXNXS2s/view?usp=sharing The File "OnPaint.cs" can not be downloaded from Google Drive. The source code of the onPaint.cs file appears almost completely in the video. Only the overlong lines are missing, such as: Dim brush2 As Brush = DirectCast (New LinearGradientBrush (New Point (Math.Truncate (CDbl (pointf.X) - CDbl (num3))), CInt (Math.Truncate (pointf.Y) - CDbl (num3))), Brush ) These commands are incomplete because the display of source codes in the Visual Studio Editor is displayed without a line break. The following content of the onPaint.cs file could be recovered from the video: Protected Overrides Sub OnPaint(e As PaintEventArgs) MyBase.OnPaint(e) e.Graphics.SmoothingMode = Drawing2D.SmoothingMode.AntiAlias Dim g As Graphics = e.Graphics Dim pointF As New PointF(CSng(Me.Width) / 2.0F, CSng(Me.Height) / 2.0F) Dim num1 As Single = Math.Min(pointF.X, pointF.Y) Dim num2 As Single = CSng(CDbl(num1) * 65.0 / 100.0) Dim num3 As Single = CSng(CDbl(num1) * 55.0 / 100.0) Dim num4 As Single = CSng(CDbl(num1) * 45.0 / 100.0) Dim _Brush As Brush = DirectCast(New LinearGradientBrush(New Point(CInt(Math.Truncate(CDbl(pointF.X) - CDbl(num2))), CInt(Math.Truncate(CDbl(pointF.Y) - CDbl(num2))))), Brush) g.FillEllipse(_Brush, pointF.X - num2, pointF.Y - num2, 2.0F * num2, 2.0F * num2) _Brush.Dispose() If Me._Value Then Dim path As New GraphicsPath() path.AddEllipse(pointF.X - num1, pointF.Y - num1, num1 * 2.0F, num1 * 2.0F) Dim pathGradientBrush As New PathGradientBrush(path) Dim colorArray As Color() = New Color(0) {Color.FromArgb(1, CInt(Me.OnColor.R), CInt(Me.OnColor.G), CInt(Me.OnColor.B))} pathGradientBrush.SurroundColors = colorArray g.FillEllipse(DirectCast(pathGradientBrush, Brush), pointF.X - num1, pointF.Y - num1, num1 * 2.0F, num1 * 2.0F) path.Dispose() pathGradientBrush.Dispose() End If Dim brush2 As Brush = DirectCast(New LinearGradientBrush(New Point(CInt(Math.Truncate(CDbl(pointF.X) - CDbl(num3))), CInt(Math.Truncate(CDbl(pointF.Y) - CDbl(num3))))), Brush) g.FillEllipse(brush2, pointF.X - num3, pointF.Y - num3, 2.0F * num3, 2.0F * num3) _Brush.Dispose() Dim gp As New GraphicsPath() gp.AddEllipse(pointF.X - num4, pointF.Y - num4, num4 * 2.0F, num4 * 2.0F) If Me._Value Then Dim pathGradientBrush As New PathGradientBrush(gp) pathGradientBrush.CenterColor = Color.WhiteSmoke Dim ColorArray As Color() = New Color(0) {Me.OnColor} pathGradientBrush.SurroundColors = ColorArray pathGradientBrush.CenterPoint = New PointF(pointF.X - num4 / 2.0F, pointF.Y - num4 / 2.0F) g.FillEllipse(DirectCast(pathGradientBrush, Brush), pointF.X - num4, pointF.Y - num4, 2.0F * num4, 2.0F * num4) pathGradientBrush.Dispose() Else Dim pathGradientBrush As New PathGradientBrush(gp) pathGradientBrush.CenterColor = Color.WhiteSmoke Dim colorArray As Color() = New Color(0) {Me.OffColor} pathGradientBrush.SurroundColors = colorArray pathGradientBrush.CenterPoint = New PointF(pointF.X - num4 / 2.0F, pointF.Y - num4 / 2.0F) g.FillEllipse(DirectCast(pathGradientBrush, Brush), pointF.X - num4, pointF.Y - num4, 2.0F * num4, 2.0F * num4) pathGradientBrush.Dispose() End If gp.Dispose() End Sub **Obs: There is something missing from these lines, who can help? Because you are generating an error: "Error 2 Overload resolution failed because no accessible 'New' accepts this number of arguments".
@IndustrialNetworks
@IndustrialNetworks 5 лет назад
The source code is available in the video
@smeison1
@smeison1 5 лет назад
Not completely. There is a part of the code that is hidden because the line of code is too long and does not have a line break. I sent an email with a request, if you can verify. They are exactly the declarations of the variables "_Brush" and "brush2".
Далее
AdvancedHMI Quick Start
3:34
Просмотров 45 тыс.
Stop, Intel’s Already Dead!
13:47
Просмотров 889 тыс.
JPEG is Dying - And that's a bad thing
8:09
Просмотров 172 тыс.
The $5 Mid-2000s Mini PC - Thrift Store Finds
32:43
Просмотров 80 тыс.
Visual Basic .NET | Receive Serial Data From Arduino
17:55
Ускоряем ваш TV🚀
0:44
Просмотров 464 тыс.