473,395 Members | 1,972 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

Is it possible to draw lines between two froms?

Hi, All
Greetings!
I want to develop as appllication that requires a line-drawing function
in the blank area between two forms. I have looked up the MSDN, it says that
a graphics object need a reference to a control or a form. I guess it means
that lines can't be draw on blank area between two forms. Can anybody
guarantee this for me? Is there any method can realize this function? I
mainly want to draw a line from a button in form1 to current position of the
mouse. The line should keep changing when the mouse is moving and the mouse
will sure move outside the form1 to the form2.
Thank you in advance for your time and patient.
Feb 25 '07 #1
9 4001
Hi,

If Form1 and Form2 both reside inside a parent form (MDIParent) have the parent draw the line. Form1 and Form2 needs to be MDIChildren. The parent can then subscribe to the Move event, SizeChanged event or any other event that may cause a need to redraw the line.

On Sun, 25 Feb 2007 16:19:04 +0100, zhaow <nu*****@hotmail.comwrote:
Hi, All
Greetings!
I want to develop as appllication that requires a line-drawing function
in the blank area between two forms. I have looked up the MSDN, it says that
a graphics object need a reference to a control or a form. I guess it means
that lines can't be draw on blank area between two forms. Can anybody
guarantee this for me? Is there any method can realize this function? I
mainly want to draw a line from a button in form1 to current position of the
mouse. The line should keep changing when the mouse is moving and the mouse
will sure move outside the form1 to the form2.
Thank you in advance for your time and patient.


--
Happy coding!
Morten Wennevik [C# MVP]
Feb 25 '07 #2
Thank you very much! I will try it later. However, is there any other
methods for drawing a line outside a form? Thanks!

"Morten Wennevik [C# MVP]" <Mo************@hotmail.comwrote in message
news:op.tobbosdrdj93y5@stone...
Hi,

If Form1 and Form2 both reside inside a parent form (MDIParent) have the
parent draw the line. Form1 and Form2 needs to be MDIChildren. The
parent can then subscribe to the Move event, SizeChanged event or any
other event that may cause a need to redraw the line.

On Sun, 25 Feb 2007 16:19:04 +0100, zhaow <nu*****@hotmail.comwrote:
>Hi, All
Greetings!
I want to develop as appllication that requires a line-drawing
function
in the blank area between two forms. I have looked up the MSDN, it says
that
a graphics object need a reference to a control or a form. I guess it
means
that lines can't be draw on blank area between two forms. Can anybody
guarantee this for me? Is there any method can realize this function? I
mainly want to draw a line from a button in form1 to current position of
the
mouse. The line should keep changing when the mouse is moving and the
mouse
will sure move outside the form1 to the form2.
Thank you in advance for your time and patient.

--
Happy coding!
Morten Wennevik [C# MVP]

Feb 25 '07 #3
You can create a graphics object of the desktop and draw directly on thedesktop. To do this, use the Win32 method GetDC(hWnd). If you pass IntPtr.Zero you will get the handle to the desktop DC (device context). From this create a Graphics object using Graphics.FromHdc.

To use the Win32 method add

[DllImport("User32.dll")]
public extern static IntPtr GetDC(IntPtr hWnd);

[DllImport("User32.dll")]
public extern static IntPtr ReleaseDC(IntPtr hWnd, IntPtr hDC);

To draw on the desktop use

IntPtr hDC = GetDC(IntPtr.Zero);
using(Graphics g = Graphics.FromHdc(hDC))
{
Graphics.DrawLine(Pens.Black, form1.Location, form2.Location);
}
ReleaseDC(IntPtr.Zero, hDC);

However, I would advice against drawing on the desktop and instead consider a MDI solution.
On Sun, 25 Feb 2007 17:42:34 +0100, nuber19 <nu*****@hotmail.comwrote:
Thank you very much! I will try it later. However, is there any other
methods for drawing a line outside a form? Thanks!

"Morten Wennevik [C# MVP]" <Mo************@hotmail.comwrote in message
news:op.tobbosdrdj93y5@stone...
>Hi,

If Form1 and Form2 both reside inside a parent form (MDIParent) have the
parent draw the line. Form1 and Form2 needs to be MDIChildren. The
parent can then subscribe to the Move event, SizeChanged event or any
other event that may cause a need to redraw the line.

On Sun, 25 Feb 2007 16:19:04 +0100, zhaow <nu*****@hotmail.comwrote:
>>Hi, All
Greetings!
I want to develop as appllication that requires a line-drawing
function
in the blank area between two forms. I have looked up the MSDN, it says
that
a graphics object need a reference to a control or a form. I guess it
means
that lines can't be draw on blank area between two forms. Can anybody
guarantee this for me? Is there any method can realize this function? I
mainly want to draw a line from a button in form1 to current position of
the
mouse. The line should keep changing when the mouse is moving and the
mouse
will sure move outside the form1 to the form2.
Thank you in advance for your time and patient.

--
Happy coding!
Morten Wennevik [C# MVP]




--
Happy coding!
Morten Wennevik [C# MVP]
Feb 25 '07 #4
Got it. Thank you very much!
"Morten Wennevik [C# MVP]" <Mo************@hotmail.comwrote in message
news:op.tobf80vjdj93y5@stone...
You can create a graphics object of the desktop and draw directly on the
desktop. To do this, use the Win32 method GetDC(hWnd). If you pass
IntPtr.Zero you will get the handle to the desktop DC (device context).
From this create a Graphics object using Graphics.FromHdc.

To use the Win32 method add

[DllImport("User32.dll")]
public extern static IntPtr GetDC(IntPtr hWnd);

[DllImport("User32.dll")]
public extern static IntPtr ReleaseDC(IntPtr hWnd, IntPtr hDC);

To draw on the desktop use

IntPtr hDC = GetDC(IntPtr.Zero);
using(Graphics g = Graphics.FromHdc(hDC))
{
Graphics.DrawLine(Pens.Black, form1.Location, form2.Location);
}
ReleaseDC(IntPtr.Zero, hDC);

However, I would advice against drawing on the desktop and instead consider
a MDI solution.
On Sun, 25 Feb 2007 17:42:34 +0100, nuber19 <nu*****@hotmail.comwrote:
Thank you very much! I will try it later. However, is there any other
methods for drawing a line outside a form? Thanks!

"Morten Wennevik [C# MVP]" <Mo************@hotmail.comwrote in message
news:op.tobbosdrdj93y5@stone...
>Hi,

If Form1 and Form2 both reside inside a parent form (MDIParent) have the
parent draw the line. Form1 and Form2 needs to be MDIChildren. The
parent can then subscribe to the Move event, SizeChanged event or any
other event that may cause a need to redraw the line.

On Sun, 25 Feb 2007 16:19:04 +0100, zhaow <nu*****@hotmail.comwrote:
>>Hi, All
Greetings!
I want to develop as appllication that requires a line-drawing
function
in the blank area between two forms. I have looked up the MSDN, it says
that
a graphics object need a reference to a control or a form. I guess it
means
that lines can't be draw on blank area between two forms. Can anybody
guarantee this for me? Is there any method can realize this function? I
mainly want to draw a line from a button in form1 to current position of
the
mouse. The line should keep changing when the mouse is moving and the
mouse
will sure move outside the form1 to the form2.
Thank you in advance for your time and patient.

--
Happy coding!
Morten Wennevik [C# MVP]




--
Happy coding!
Morten Wennevik [C# MVP]
Feb 25 '07 #5
Hi, Morten,
I declare 3 forms, and set the mainform as

mainform.IsMdiContainer=true;

to make it can contain subform1 and subform2.However, It looks like a line
can not be drawn in a form which is a MDI container.I can only draw lines in
subform1 and subform2 by using Form_Paint event. Do you have any comments
about this? Thank you !
"Morten Wennevik [C# MVP]" <Mo************@hotmail.comwrote in message
news:op.tobbosdrdj93y5@stone...
Hi,

If Form1 and Form2 both reside inside a parent form (MDIParent) have the
parent draw the line. Form1 and Form2 needs to be MDIChildren. The
parent can then subscribe to the Move event, SizeChanged event or any
other event that may cause a need to redraw the line.

On Sun, 25 Feb 2007 16:19:04 +0100, zhaow <nu*****@hotmail.comwrote:
>Hi, All
Greetings!
I want to develop as appllication that requires a line-drawing
function
in the blank area between two forms. I have looked up the MSDN, it says
that
a graphics object need a reference to a control or a form. I guess it
means
that lines can't be draw on blank area between two forms. Can anybody
guarantee this for me? Is there any method can realize this function? I
mainly want to draw a line from a button in form1 to current position of
the
mouse. The line should keep changing when the mouse is moving and the
mouse
will sure move outside the form1 to the form2.
Thank you in advance for your time and patient.

--
Happy coding!
Morten Wennevik [C# MVP]

Feb 25 '07 #6
Sorry about that,

When you set a Form to IsMdiContainer = true you also create an MdiClient control which is added to the form. This control is the gray background you see. You need to subscribe to the MdiClient's Paint event and draw in the client surface.

The code below will draw a line between the upper left corner of the MdiParent and an MdiChild

MdiClient client = null;
Form1 f = new Form1();

public MDIParent()
{
InitializeComponent();

foreach (Control c in this.Controls)
{
if (c is MdiClient)
client = (MdiClient)c;
}

client.Paint += new PaintEventHandler(client_Paint);

f.MdiParent = this;
f.Show();

f.Move += new EventHandler(f_Move);
}

void client_Paint(object sender, PaintEventArgs e)
{
e.Graphics.DrawLine(Pens.Black, new Point(0, 0), f.Location);
}

void f_Move(object sender, EventArgs e)
{
client.Invalidate();
}
On Sun, 25 Feb 2007 23:14:08 +0100, Joe Gallagher <nu*****@hotmail.comwrote:
Hi, Morten,
I declare 3 forms, and set the mainform as

mainform.IsMdiContainer=true;

to make it can contain subform1 and subform2.However, It looks like a line
can not be drawn in a form which is a MDI container.I can only draw lines in
subform1 and subform2 by using Form_Paint event. Do you have any comments
about this? Thank you !
"Morten Wennevik [C# MVP]" <Mo************@hotmail.comwrote in message
news:op.tobbosdrdj93y5@stone...
>Hi,

If Form1 and Form2 both reside inside a parent form (MDIParent) have the
parent draw the line. Form1 and Form2 needs to be MDIChildren. The
parent can then subscribe to the Move event, SizeChanged event or any
other event that may cause a need to redraw the line.

On Sun, 25 Feb 2007 16:19:04 +0100, zhaow <nu*****@hotmail.comwrote:
>>Hi, All
Greetings!
I want to develop as appllication that requires a line-drawing
function
in the blank area between two forms. I have looked up the MSDN, it says
that
a graphics object need a reference to a control or a form. I guess it
means
that lines can't be draw on blank area between two forms. Can anybody
guarantee this for me? Is there any method can realize this function? I
mainly want to draw a line from a button in form1 to current position of
the
mouse. The line should keep changing when the mouse is moving and the
mouse
will sure move outside the form1 to the form2.
Thank you in advance for your time and patient.

--
Happy coding!
Morten Wennevik [C# MVP]




--
Happy coding!
Morten Wennevik [C# MVP]
Feb 26 '07 #7
Thank you very much for you reply!
According to you reply, I modified my codes, and it can draw line. However,
I want to make it draw line dynamically when the mouse is moving. But the
application can only draw a static line when it starts. I paste my related
code as below, please have a look at it if you have a second. I do not know
how to use the MDIParent Function in you code. I think it may be the reason.
Thank you in advance.

class MyApplicationContext : ApplicationContext
{

private int formCount;
private Form1 mainform, subform1,subform2;
private var tvar = new var();
MdiClient client = null;
private int currx=0;
private int curry=0;

public MyApplicationContext()
{
formCount = 0;
// Handle the ApplicationExit event to know when the application
is exiting.
mainform = new Form1();
mainform.SetBounds(0, 0, 1280, 800);
mainform.IsMdiContainer=true;
foreach (Control c in mainform.Controls)
{
if (c is MdiClient)
client = (MdiClient)c;
}
client.Paint += new PaintEventHandler(client_Paint);

subform1 = new Form1();
subform1.Closed += new EventHandler(OnFormClosed);
subform1.SetDesktopLocation(50, 100);

subform1.changeText("Start");
subform1.buttonShow();
formCount++;
subform2 = new Form1();
subform2.Closed += new EventHandler(OnFormClosed);
subform2.SetDesktopLocation(600,100);
subform2.changeText("Stop");
subform2.buttonShow();
formCount++;
subform1.MdiParent = mainform;
subform2.MdiParent = mainform;

// Show both forms.
mainform.Show();
mainform.MouseMove += new MouseEventHandler(Form_Move);
mainform.MouseHover += new EventHandler(Form_Move2);
subform1.Show();
subform2.Show();
}
void client_Paint(object sender, PaintEventArgs e)
{
e.Graphics.DrawLine(Pens.Red,200,300,currx,curry);
}

void Form_Move(object sender, MouseEventArgs e)
{
currx = Control.MousePosition.X;
curry = Control.MousePosition.Y;
client.Invalidate();
}
void Form_Move2(object sender, EventArgs e)
{
currx = Control.MousePosition.X;
curry = Control.MousePosition.Y;
client.Invalidate();
}

private void OnFormClosed(object sender, EventArgs e)
{
// When a form is closed, decrement the count of open forms.

// When the count gets to 0, exit the app by calling
// ExitThread().
formCount--;
if (formCount == 0)
{
tvar.close();
ExitThread();
}
}
}
static class Program
{
/// <summary>
/// The main entry point for the application.
/// </summary>
[STAThread]
static void Main()
{
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(fals e);
MyApplicationContext context = new MyApplicationContext();
Application.Run(context);
}
}

"Morten Wennevik [C# MVP]" <Mo************@hotmail.comwrote in message
news:op.todbhrk4dj93y5@stone...
Sorry about that,

When you set a Form to IsMdiContainer = true you also create an MdiClient
control which is added to the form. This control is the gray background you
see. You need to subscribe to the MdiClient's Paint event and draw in the
client surface.

The code below will draw a line between the upper left corner of the
MdiParent and an MdiChild

MdiClient client = null;
Form1 f = new Form1();

public MDIParent()
{
InitializeComponent();

foreach (Control c in this.Controls)
{
if (c is MdiClient)
client = (MdiClient)c;
}

client.Paint += new PaintEventHandler(client_Paint);

f.MdiParent = this;
f.Show();

f.Move += new EventHandler(f_Move);
}

void client_Paint(object sender, PaintEventArgs e)
{
e.Graphics.DrawLine(Pens.Black, new Point(0, 0), f.Location);
}

void f_Move(object sender, EventArgs e)
{
client.Invalidate();
}
On Sun, 25 Feb 2007 23:14:08 +0100, Joe Gallagher <nu*****@hotmail.com>
wrote:
Hi, Morten,
I declare 3 forms, and set the mainform as

mainform.IsMdiContainer=true;

to make it can contain subform1 and subform2.However, It looks like a line
can not be drawn in a form which is a MDI container.I can only draw lines
in
subform1 and subform2 by using Form_Paint event. Do you have any comments
about this? Thank you !
"Morten Wennevik [C# MVP]" <Mo************@hotmail.comwrote in message
news:op.tobbosdrdj93y5@stone...
>Hi,

If Form1 and Form2 both reside inside a parent form (MDIParent) have the
parent draw the line. Form1 and Form2 needs to be MDIChildren. The
parent can then subscribe to the Move event, SizeChanged event or any
other event that may cause a need to redraw the line.

On Sun, 25 Feb 2007 16:19:04 +0100, zhaow <nu*****@hotmail.comwrote:
>>Hi, All
Greetings!
I want to develop as appllication that requires a line-drawing
function
in the blank area between two forms. I have looked up the MSDN, it says
that
a graphics object need a reference to a control or a form. I guess it
means
that lines can't be draw on blank area between two forms. Can anybody
guarantee this for me? Is there any method can realize this function? I
mainly want to draw a line from a button in form1 to current position of
the
mouse. The line should keep changing when the mouse is moving and the
mouse
will sure move outside the form1 to the form2.
Thank you in advance for your time and patient.

--
Happy coding!
Morten Wennevik [C# MVP]




--
Happy coding!
Morten Wennevik [C# MVP]
Feb 27 '07 #8
I checked it again and think that It may because subform1 and subform2 are
above the mainform, then the main form can not get focus..So it can only
draw a line at the beginning.
"Joe Gallagher" <nu*****@hotmail.comwrote in message
news:%2****************@TK2MSFTNGP03.phx.gbl...
Thank you very much for you reply!
According to you reply, I modified my codes, and it can draw line.
However, I want to make it draw line dynamically when the mouse is moving.
But the application can only draw a static line when it starts. I paste my
related code as below, please have a look at it if you have a second. I do
not know how to use the MDIParent Function in you code. I think it may be
the reason. Thank you in advance.

class MyApplicationContext : ApplicationContext
{

private int formCount;
private Form1 mainform, subform1,subform2;
private var tvar = new var();
MdiClient client = null;
private int currx=0;
private int curry=0;

public MyApplicationContext()
{
formCount = 0;
// Handle the ApplicationExit event to know when the
application is exiting.
mainform = new Form1();
mainform.SetBounds(0, 0, 1280, 800);
mainform.IsMdiContainer=true;
foreach (Control c in mainform.Controls)
{
if (c is MdiClient)
client = (MdiClient)c;
}
client.Paint += new PaintEventHandler(client_Paint);

subform1 = new Form1();
subform1.Closed += new EventHandler(OnFormClosed);
subform1.SetDesktopLocation(50, 100);

subform1.changeText("Start");
subform1.buttonShow();
formCount++;
subform2 = new Form1();
subform2.Closed += new EventHandler(OnFormClosed);
subform2.SetDesktopLocation(600,100);
subform2.changeText("Stop");
subform2.buttonShow();
formCount++;
subform1.MdiParent = mainform;
subform2.MdiParent = mainform;

// Show both forms.
mainform.Show();
mainform.MouseMove += new MouseEventHandler(Form_Move);
mainform.MouseHover += new EventHandler(Form_Move2);
subform1.Show();
subform2.Show();
}
void client_Paint(object sender, PaintEventArgs e)
{
e.Graphics.DrawLine(Pens.Red,200,300,currx,curry);
}

void Form_Move(object sender, MouseEventArgs e)
{
currx = Control.MousePosition.X;
curry = Control.MousePosition.Y;
client.Invalidate();
}
void Form_Move2(object sender, EventArgs e)
{
currx = Control.MousePosition.X;
curry = Control.MousePosition.Y;
client.Invalidate();
}

private void OnFormClosed(object sender, EventArgs e)
{
// When a form is closed, decrement the count of open forms.

// When the count gets to 0, exit the app by calling
// ExitThread().
formCount--;
if (formCount == 0)
{
tvar.close();
ExitThread();
}
}
}
static class Program
{
/// <summary>
/// The main entry point for the application.
/// </summary>
[STAThread]
static void Main()
{
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(fals e);
MyApplicationContext context = new MyApplicationContext();
Application.Run(context);
}
}

"Morten Wennevik [C# MVP]" <Mo************@hotmail.comwrote in message
news:op.todbhrk4dj93y5@stone...
Sorry about that,

When you set a Form to IsMdiContainer = true you also create an MdiClient
control which is added to the form. This control is the gray background
you see. You need to subscribe to the MdiClient's Paint event and draw in
the client surface.

The code below will draw a line between the upper left corner of the
MdiParent and an MdiChild

MdiClient client = null;
Form1 f = new Form1();

public MDIParent()
{
InitializeComponent();

foreach (Control c in this.Controls)
{
if (c is MdiClient)
client = (MdiClient)c;
}

client.Paint += new PaintEventHandler(client_Paint);

f.MdiParent = this;
f.Show();

f.Move += new EventHandler(f_Move);
}

void client_Paint(object sender, PaintEventArgs e)
{
e.Graphics.DrawLine(Pens.Black, new Point(0, 0), f.Location);
}

void f_Move(object sender, EventArgs e)
{
client.Invalidate();
}
On Sun, 25 Feb 2007 23:14:08 +0100, Joe Gallagher <nu*****@hotmail.com>
wrote:
>Hi, Morten,
I declare 3 forms, and set the mainform as

mainform.IsMdiContainer=true;

to make it can contain subform1 and subform2.However, It looks like a
line
can not be drawn in a form which is a MDI container.I can only draw lines
in
subform1 and subform2 by using Form_Paint event. Do you have any comments
about this? Thank you !
"Morten Wennevik [C# MVP]" <Mo************@hotmail.comwrote in message
news:op.tobbosdrdj93y5@stone...
>>Hi,

If Form1 and Form2 both reside inside a parent form (MDIParent) have the
parent draw the line. Form1 and Form2 needs to be MDIChildren. The
parent can then subscribe to the Move event, SizeChanged event or any
other event that may cause a need to redraw the line.

On Sun, 25 Feb 2007 16:19:04 +0100, zhaow <nu*****@hotmail.comwrote:

Hi, All
Greetings!
I want to develop as appllication that requires a line-drawing
function
in the blank area between two forms. I have looked up the MSDN, it says
that
a graphics object need a reference to a control or a form. I guess it
means
that lines can't be draw on blank area between two forms. Can anybody
guarantee this for me? Is there any method can realize this function? I
mainly want to draw a line from a button in form1 to current position
of
the
mouse. The line should keep changing when the mouse is moving and the
mouse
will sure move outside the form1 to the form2.
Thank you in advance for your time and patient.


--
Happy coding!
Morten Wennevik [C# MVP]



--
Happy coding!
Morten Wennevik [C# MVP]

Feb 27 '07 #9
It is not so interesting when the mouse moves as when the forms move. Ihave changed your code to draw a point between the upper left corner ofsubform1 and subform2 based on subform1.Move and subform2.Move.

class MyApplicationContext : ApplicationContext
{

private int formCount;
private Form1 mainform, subform1, subform2;
//private var tvar = new var();
MdiClient client = null;
Point p1 = Point.Empty;
Point p2 = Point.Empty;

public MyApplicationContext()
{
formCount = 0;
// Handle the ApplicationExit event to know when the application is exiting.
mainform = new Form1();
mainform.SetBounds(0, 0, 1280, 800);
mainform.IsMdiContainer=true;
foreach (Control c in mainform.Controls)
{
if (c is MdiClient)
client = (MdiClient)c;
}
client.Paint += new PaintEventHandler(client_Paint);

subform1 = new Form1();
subform1.Closed += new EventHandler(OnFormClosed);
subform1.SetDesktopLocation(50, 100);

//subform1.changeText("Start");
//subform1.buttonShow();
formCount++;
subform2 = new Form1();
subform2.Closed += new EventHandler(OnFormClosed);
subform2.SetDesktopLocation(600,100);
//subform2.changeText("Stop");
//subform2.buttonShow();
formCount++;
subform1.MdiParent = mainform;
subform2.MdiParent = mainform;

// Show both forms.
mainform.Show();
subform1.Move += new EventHandler(Form_Move);
subform2.Move += new EventHandler(Form_Move);
subform1.Show();
subform2.Show();
}
void client_Paint(object sender, PaintEventArgs e)
{
e.Graphics.DrawLine(Pens.Red, p1, p2);
}

void Form_Move(object sender, EventArgs e)
{
p1 = subform1.Location;
p2 = subform2.Location;
client.Invalidate();
}

private void OnFormClosed(object sender, EventArgs e)
{
// When a form is closed, decrement the count of open forms..

// When the count gets to 0, exit the app by calling
// ExitThread().
formCount--;
if (formCount == 0)
{
//tvar.close();
ExitThread();
}
}
}
--
Happy coding!
Morten Wennevik [C# MVP]
Feb 28 '07 #10

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Matt | last post by:
I am writing a recursive program to draw the lines recursively, given the range and number of intervals (n) between the range. The problem is I don't know how to draw the line in point 0.375, as...
0
by: awan | last post by:
hi, I wanna migrate 6i forms to 10g forms....I compiled 6i forms in 10g form builder ,froms compiled successfully and add some settings in fromsweb file....which is as follows: ...
5
by: Matt | last post by:
I am writing a recursive program to draw the lines recursively, given the range and number of intervals (n) between the range. The problem is I don't know how to draw the line in point 0.375, as...
4
by: Mathieu Chavoutier | last post by:
Hi. I would like to do something like paint. I try to draw a line. I want, like paint, that when I clickdown, it begins to draw the line, and then, when I move the mouse, the line follow the...
7
by: Mark Ingram | last post by:
Hi, how can i draw a rounded rectange, with a border within a specified area? i.e. if i have a Rectangle with width and height of 100, how can i draw a rectange with 2 pixel border inside of the...
10
by: wazzup | last post by:
C++ is new to me and I'm trying solve this problem but get stuck. Please help me out. Below is the task and after that is what i got so far. Create a program to print nested squares Input:...
4
by: hastalavista | last post by:
HI I'm very new to C# and I've got a big project to do in C# for uni until july. I've been trying do draw lines in C# (arrows to be precise). I can draw them allright but once I minimize the...
8
by: Anuhas | last post by:
Dear experts, I have used buttons to indicate certain locations on a map.(Just a picture used as form background) I am going to draw lines...
0
by: Anuhas | last post by:
Dear Experts, I need to draw lines. But I have to make a class for this. I know how to draw lines in direct methods. i.e. Graphics g =...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.