Home > Software engineering >  Vb 6.0 real time hydrologic information display system
Vb 6.0 real time hydrologic information display system

Time:11-01

I now want to be a river section of real-time hydrologic information display system
Draw a simple river section 1
2 shows the rivers
3 shows the warning level
Under the four rivers in blue to represent
What the chart control excuse me how to do this, use the

CodePudding user response:

Himself with a PictureBox or Form of the Line can, well, "chart", "control",

CodePudding user response:

Shape control, Line control, etc.

CodePudding user response:

 'form to add a PictureBox, a Timer control 
Option Explicit

Private Const GRAPH_WIDTH As Long=200
Private Const GRAPH_HEIGHT As Long=100
Private Const WARNING_LEVEL As Long=90

Private picRiverbed As IPictureDisp

Private Sub Form_Load ()
The Set picRiverbed=LoadPicture (App) Path & amp; "\ Riverbed BMP")

Me. The ScaleMode=vbPixels
With Picture1
. The ScaleMode=vbPixels
. Move 8, 8, GRAPH_WIDTH + (the Width - ScaleWidth), GRAPH_HEIGHT + (. Height - ScaleHeight)
. AutoRedraw=True
The BackColor=vbBlack
End With


Randomize
Timer1. Interval=500
Timer1. Enabled=True
End Sub

Private Sub Timer1_Timer ()
Dim lWaterLevel As Long

LWaterLevel=Int (Rnd () * 80) + 20

Picture1. Cls
Picture1. Line (0, GRAPH_HEIGHT - lWaterLevel) - (GRAPH_WIDTH GRAPH_HEIGHT), vbBlue, BF
Picture1. Line (0, GRAPH_HEIGHT - WARNING_LEVEL) - (GRAPH_WIDTH, GRAPH_HEIGHT - WARNING_LEVEL), vbRed
Picture1. PaintPicture picRiverbed, 0, 0,,,,,,,,, vbSrcPaint
End Sub

Bed with two color bitmap (Riverbed. BMP) - CSDN can't upload the BMP

Results the following

CodePudding user response:

Tiger_Zhao quite professional,
  • Related