473,241 Members | 1,522 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,241 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 3990
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 =...
2
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 7 Feb 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:30 (7.30PM). In this month's session, the creator of the excellent VBE...
0
by: fareedcanada | last post by:
Hello I am trying to split number on their count. suppose i have 121314151617 (12cnt) then number should be split like 12,13,14,15,16,17 and if 11314151617 (11cnt) then should be split like...
0
by: stefan129 | last post by:
Hey forum members, I'm exploring options for SSL certificates for multiple domains. Has anyone had experience with multi-domain SSL certificates? Any recommendations on reliable providers or specific...
1
by: davi5007 | last post by:
Hi, Basically, I am trying to automate a field named TraceabilityNo into a web page from an access form. I've got the serial held in the variable strSearchString. How can I get this into the...
0
by: MeoLessi9 | last post by:
I have VirtualBox installed on Windows 11 and now I would like to install Kali on a virtual machine. However, on the official website, I see two options: "Installer images" and "Virtual machines"....
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: Aftab Ahmad | last post by:
Hello Experts! I have written a code in MS Access for a cmd called "WhatsApp Message" to open WhatsApp using that very code but the problem is that it gives a popup message everytime I clicked on...
0
by: Aftab Ahmad | last post by:
So, I have written a code for a cmd called "Send WhatsApp Message" to open and send WhatsApp messaage. The code is given below. Dim IE As Object Set IE =...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...

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.