Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8303489
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T17:33:28+00:00 2026-06-08T17:33:28+00:00

I want to draw a line between two points: https://i.stack.imgur.com/Yuhsd.gif Lets say that I

  • 0

I want to draw a line between two points:

https://i.stack.imgur.com/Yuhsd.gif

Lets say that I have 2 panels and want to draw line from Panel1 to Panel2.

Explanation:

dim p1 as new panel
dim p2 as new panel

p1.left = 100
p1.top = 10
me.controls.add(p1)

p2.left = 300
p2.top = 20
me.controls.add(p2)

DrawLineBetween(p1,p2)
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-08T17:33:29+00:00Added an answer on June 8, 2026 at 5:33 pm

    try something like below, it is in c# but you can easily convert it vb.net, and you need to adjust x,y co-ordinates as per the panel position.

       private void Form1_Load(object sender, EventArgs e)
        {
            this.Controls.Add(new Panel{Left = 10, Top = 10,Width = 50,Height = 50, BackColor = Color.Blue});
            this.Controls.Add(new Panel {Left = 100, Top = 100,Width = 50,Height = 50, BackColor = Color.Blue});
    
    
        }
        protected override void OnPaint(PaintEventArgs e)
        {
            base.OnPaint(e);
            Graphics g;
    
            g = e.Graphics;
    
            Pen myPen = new Pen(Color.Red);
            myPen.Width = 1;
    
            g.DrawLine(myPen, 12, 12, 45, 65);
    
            g.DrawLine(myPen, 100, 100, 45, 65);
    
    
        }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a program where I want to draw a line between two points.
I have Latitude and Longitude of two points and Want to Draw line between
I'm using pygame to draw a line between two arbitrary points. I also want
In flash, I use lineTo to draw a line between two points. This is
How can i draw a line between two particular longitude and latitude points in
In my game I draw the line using two points. I want to calculate
I want to draw a line between two views how it could possible using
I have two UIScrollView instances and I want to draw a vertical line between
I want to draw two lines that go through three points, and make a
I want to draw a vertical line between the SectionIndex column and the cell

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.