Código de Visual Basic - Diagrama de VEEN

Requerimientos

'Create a new form and set its size
Public Class VennDiagramForm
Private Sub VennDiagramForm_Load(sender As Object, e As EventArgs) Handles MyBase.Load
Me.Size = New Size(600, 400)
End Sub

'Draw the Venn diagram on the form
Private Sub VennDiagramForm_Paint(sender As Object, e As PaintEventArgs) Handles MyBase.Paint
Dim personFont As New Font("Arial", 10)
Dim circlePen As New Pen(Color.Black, 2)
Dim personBrush As New SolidBrush(Color.Blue)

'Draw the circles
e.Graphics.DrawEllipse(circlePen, 50, 50, 200, 200) 'Promotion and prevention
e.Graphics.DrawEllipse(circlePen, 175, 50, 200, 200) 'Diagnostic services
e.Graphics.DrawEllipse(circlePen, 112, 125, 200, 200) 'Subsidized healthcare

'Draw the labels
e.Graphics.DrawString("Promotion and prevention", personFont, personBrush, 100, 5)
e.Graphics.DrawString("Diagnostic services", personFont, personBrush, 225, 5)
e.Graphics.DrawString("Subsidized healthcare", personFont, personBrush, 162, 80)

'Draw the circles' overlaps
e.Graphics.DrawString("5", personFont, personBrush, 155, 80) 'Promotion and prevention + Diagnostic services
e.Graphics.DrawString("3", personFont, personBrush, 130, 95) 'Promotion and prevention + Subsidized healthcare
e.Graphics.DrawString("1", personFont, personBrush, 175, 145) 'Diagnostic services + Subsidized healthcare

'Draw the person counts
e.Graphics.DrawString("13", personFont, personBrush, 125, 70) 'Promotion and prevention
e.Graphics.DrawString("13", personFont, personBrush, 250, 70) 'Diagnostic services
e.Graphics.DrawString("9", personFont, personBrush, 187, 145) 'Subsidized healthcare
e.Graphics.DrawString("5", personFont, personBrush, 90, 125) 'Promotion and prevention + Diagnostic services
e.Graphics.DrawString("3", personFont

1.0

Publicado el 16 de Mayo del 2023gráfica de visualizaciones de la versión: 1.0
381 visualizaciones desde el 16 de Mayo del 2023
estrellaestrellaestrellaestrellaestrella
estrellaestrellaestrellaestrella
estrellaestrellaestrella
estrellaestrella
estrella

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
'Create a new form and set its size
Public Class VennDiagramForm
    Private Sub VennDiagramForm_Load(sender As Object, e As EventArgs) Handles MyBase.Load
        Me.Size = New Size(600, 400)
    End Sub
 
    'Draw the Venn diagram on the form
    Private Sub VennDiagramForm_Paint(sender As Object, e As PaintEventArgs) Handles MyBase.Paint
        Dim personFont As New Font("Arial", 10)
        Dim circlePen As New Pen(Color.Black, 2)
        Dim personBrush As New SolidBrush(Color.Blue)
 
        'Draw the circles
        e.Graphics.DrawEllipse(circlePen, 50, 50, 200, 200) 'Promotion and prevention
        e.Graphics.DrawEllipse(circlePen, 175, 50, 200, 200) 'Diagnostic services
        e.Graphics.DrawEllipse(circlePen, 112, 125, 200, 200) 'Subsidized healthcare
 
        'Draw the labels
        e.Graphics.DrawString("Promotion and prevention", personFont, personBrush, 100, 5)
        e.Graphics.DrawString("Diagnostic services", personFont, personBrush, 225, 5)
        e.Graphics.DrawString("Subsidized healthcare", personFont, personBrush, 162, 80)
 
        'Draw the circles' overlaps
        e.Graphics.DrawString("5", personFont, personBrush, 155, 80) 'Promotion and prevention + Diagnostic services
        e.Graphics.DrawString("3", personFont, personBrush, 130, 95) 'Promotion and prevention + Subsidized healthcare
        e.Graphics.DrawString("1", personFont, personBrush, 175, 145) 'Diagnostic services + Subsidized healthcare
 
        'Draw the person counts
        e.Graphics.DrawString("13", personFont, personBrush, 125, 70) 'Promotion and prevention
        e.Graphics.DrawString("13", personFont, personBrush, 250, 70) 'Diagnostic services
        e.Graphics.DrawString("9", personFont, personBrush, 187, 145) 'Subsidized healthcare
        e.Graphics.DrawString("5", personFont, personBrush, 90, 125) 'Promotion and prevention + Diagnostic services
        e.Graphics.DrawString("3", personFont



Comentarios sobre la versión: 1.0 (0)


No hay comentarios
 

Comentar la versión: 1.0

Nombre
Correo (no se visualiza en la web)
Valoración
Comentarios...
CerrarCerrar
CerrarCerrar
Cerrar

Tienes que ser un usuario registrado para poder insertar imágenes, archivos y/o videos.

Puedes registrarte o validarte desde aquí.

Codigo
Negrita
Subrayado
Tachado
Cursiva
Insertar enlace
Imagen externa
Emoticon
Tabular
Centrar
Titulo
Linea
Disminuir
Aumentar
Vista preliminar
sonreir
dientes
lengua
guiño
enfadado
confundido
llorar
avergonzado
sorprendido
triste
sol
estrella
jarra
camara
taza de cafe
email
beso
bombilla
amor
mal
bien
Es necesario revisar y aceptar las políticas de privacidad

http://lwp-l.com/s7363