Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
namespace MyApp
{
public class MyListView: System.Windows.Forms.ListView
{
private System.ComponentModel.Container components = null;
public MyListView()
{
// This call is required by the Windows.Forms Form Designer.
InitializeComponent();
}
protected override void Dispose( bool disposing )
{
if( disposing )
{
if(components != null)
{
components.Dispose();
}
}
base.Dispose( disposing );
}
protected override void OnPaint(PaintEventArgs e)
{
base.OnPaint(e);
DrawLine(); //Method to do your drawing
}
}
}
protected override void OnPaint(PaintEventArgs e)
{
AnimateBoxes(e);
base.OnPaint(e);
}
private void AnimateBoxes(PaintEventArgs e) //Draws Red border around active selection method controls
{
graphics = e.Graphics;
Pen penCurrent = new Pen(Color.Red);
switch (SampleType)
{
case 1:
graphics.DrawRectangle(penCurrent, new Rectangle(this.TimeRangeStart.Location.X-4, this.TimeRangeStart.Location.Y-20, 314, 50));
this.lblEndTime.Text="Time Range End:";
break;
case 2:
graphics.DrawRectangle(penCurrent, new Rectangle(this.TimeRangeEnd.Location.X-4,this.TimeRangeEnd.Location.Y-20, 228, 50));
this.lblEndTime.Text="Time Range End:";
break;
}
graphics.Dispose();
penCurrent.Dispose();
}