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 3335950
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T00:04:40+00:00 2026-05-18T00:04:40+00:00

I would like to draw an opaque line on a control in c#. I

  • 0

I would like to draw an opaque line on a control in c#.

I tried this with visual basic powerpacks shapecontrol.. but I couldn’t find any properties that set opacity.

How do I draw an opaque line ?

Thanks,

  • 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-05-18T00:04:40+00:00Added an answer on May 18, 2026 at 12:04 am

    This code will draw a cross of two half-transparent white lines.

    WPF

    <Window x:Class="WpfApplication1.Window1"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        Title="Window1" Height="300" Width="300" Background="LightGray">
        <Grid>
            <Line X1="0" Y1="0" X2="100" Y2="100" Stroke="White" Opacity=".5" StrokeThickness="10" />
            <Line X1="0" Y1="100" X2="100" Y2="0" Stroke="White" Opacity=".5" StrokeThickness="10" />
        </Grid>
    </Window>
    

    Windows.Forms

    var pen = new Pen(Color.FromArgb(128, 255, 255, 255), 10);
    using (var g = CreateGraphics())
    {
        g.DrawLine(pen, 0, 0, 100, 100);
        g.DrawLine(pen, 0, 100, 100, 0);
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I would like to draw a line or bar graph using HTML5 canvas. I
in vb.net i would like to draw a regular line on a form. is
I am new to CSS and would like to draw a border around this:
I have 2 CGPoints and a would like to draw straight line between them,
I would like to draw a straight line between where a user touches the
all I follow this http://msdn.microsoft.com/en-us/library/ka0yazs1.aspx to create an application and would like to draw
I have two coordinates for which I would like to draw a perpendicular line
I would like to draw a transparent line on a winform. I am able
So I would like to draw a 2D point in OpenGL, but not in
I have a custom C# user-control where I would like to draw a circle

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.