Which code segment should you use?

You are creating a Windows Forms application by using the .NET Framework 3.5. The application requires a form to display a clock. You need to create a circular form to display the clock. Which code segment should you use?

You are creating a Windows Forms application by using the .NET Framework 3.5. The application requires a form to display a clock. You need to create a circular form to display the clock. Which code segment should you use?

A.
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
System.Drawing.Drawing2D.GraphicsPath path = new System.Drawing.Drawing2D.GraphicsPath();
path.AddEllipse(0, 0, this.Width, this.Height);
Region reg = new Region();this.Region = reg;

B.
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle;
System.Drawing.Drawing2D.GraphicsPath path = new System.Drawing.Drawing2D.GraphicsPath();
path.AddEllipse(0, 0, this.Width, this.Height);
Region reg = new Region(path);
this.Region = reg;

C.
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
System.Drawing.Drawing2D.GraphicsPath path = new System.Drawing.Drawing2D.GraphicsPath();
path.AddEllipse(0, 0, this.Width, this.Height);
Region reg = new Region(path);
this.Region = reg;

D.
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle;
System.Drawing.Drawing2D.GraphicsPath path = new System.Drawing.Drawing2D.GraphicsPath();
path.AddEllipse(0, 0, this.Width, this.Height);
Region reg = new Region();
this.Region = reg;



Leave a Reply 0

Your email address will not be published. Required fields are marked *