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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T01:13:51+00:00 2026-05-14T01:13:51+00:00

public class Form1 : System.Windows.Forms.Form { private void eachCornerPix (object sender, PaintEventArgs e, out

  • 0
public class Form1 : System.Windows.Forms.Form
{
    private void eachCornerPix (object sender, PaintEventArgs e, out float Wx, out float Wy, out float Vx, out float Vy)
    {
        Graphics g = this.CreateGraphics();
        Pen penBlu = new Pen(Color.Blue, 2);
        SolidBrush redBrush = new SolidBrush(Color.Red);
        int width = 2;    // 1 pixel wide in x
        int height = 2;
        float [] Wxc = {0.100f, 5.900f, 5.900f, 0.100f}; 
        float [] Wyc = {0.100f, 0.100f, 3.900f, 3.900f}; 
        for (int i = 0; i<3; i++)
        {
            Wx = Wxc[i];
            Wy = Wyc[i];
            Vx = ((Wx - WXmin)*((VXmax-VXmin)+VXmin)/(WXmax-WXmin));  
    Vy = ((Wy - WYmin)*(VYmax-VYmin)/(WYmax-WYmin)+VYmin); 
    Console.WriteLine("eachCornerPix Vx= {0}", Vx);
    Console.WriteLine("eachCornerPix Vy= {0}", Vy);
    g.FillRectangle(redBrush, Vx, Vy, width, height);
            g.Dispose();
        }
    }
}

Desired effect: Use the array values (Wxc, Wyc) and re-assign them to Wx and Wy. Then use
Wx and Wy as components to calculate Vx and Vy.
My end goal…once compile issues are resolved, is to pass each array value listed
using this method. This should allow 4 xy point pairs to be plotted.

Errors:

pass1.cs(51,18): error CS0177: The out parameter 'Wx' must be assigned to before control leaves the current method
pass1.cs(51,18): error CS0177: The out parameter 'Wy' must be assigned to before control leaves the current method
pass1.cs(51,18): error CS0177: The out parameter 'Vx' must be assigned to before control leaves the current method
pass1.cs(51,18): error CS0177: The out parameter 'Vy' must be assigned to before control leaves the current method
  • 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-14T01:13:51+00:00Added an answer on May 14, 2026 at 1:13 am

    Put this at the beginning of your method:

    Wx = 0f;
    Wy = 0f;
    Vx = 0f;
    Vy = 0f;
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have piece of Code in Form that works: public class Form1 : System.Windows.Forms.Form
partial class Form1 { //hidden private void InitializeComponent() { this.picture = new System.Windows.Forms.PictureBox(); //hidden
I've created a custom control, based on the Picturebox: public class Timebar : System.Windows.Forms.PictureBox
The winform: The code: using System; using System.Windows.Forms; namespace DemoApp { public partial class
With this code: public partial class Form1 : Form { private static readonly int
Currently, I have something like: public partial class Form1 : Form { delegate void
Consider this source: public partial class FormTest : Form { private Test test {
Consider: namespace WindowsApplication1 { public partial class Form1 : Form { public Form1() {
public partial class Form1 : Form { public disp(string strVal) { lbl1.text = strVal;
I need to build a class in this form namespace BestCompanyEver { public class

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.