I have created a win app, which uses secondary monitor to show images. I have used the following code to detect and set location of secondary monitor(which is an extended monitor of primary monitor).
public void secondarydisplay()
{
FrmSecondaryDisplay secdis = new FrmSecondaryDisplay();
Screen[] screens = Screen.AllScreens;
secdis.MyBase = this;
this.MySecScreen = secdis;
secdis.Show();
setFormLocation(secdis, screens[1]);
}
private void setFormLocation(Form form, Screen screen)
{
Rectangle bounds = screen.Bounds;
form.SetBounds(bounds.X, bounds.Y, bounds.Width, bounds.Height);
form.StartPosition = FormStartPosition.Manual;
}
Problem is i am getting this thin 6mm white line on the left most corner of the secondary display. which is nothing but the extension of primary display. how do i make it disapper? on moving the cursor to secondary monitor and click on the screen of secondary monitor this white line disappears. and on moving back the cursor to primary monitor and click on it makes the white line appear on secondary monitor. kindly help me how can i resolve this issue. it looks ugly in secondary mopnitor.
Always prepared the window properties before
Show()