Results 1 to 5 of 5

Thread: Request for Program

  1. #1

    Thread Starter
    New Member
    Join Date
    Feb 2021
    Posts
    1

    Cool Request for Program

    Please Help

    Code:
    public partial class Form1: Form {
    	public Form1() {
    		InitializeComponent();
    	}
    
    	private void button1_Click(object sender, EventArgs e) {
    		listBox1.Items.Clear();
    		int a,
    		x,
    		y,
    		r,
    		n,
    		CDec;
    		x =  CDec textBox1.Text;  /
    		/*what is CDec (Error2 'CDec' is a 'variable' but is used like a 'method')//*
    
            r = CDec(textBox2.Text);
            n = CDec(textBox3.Text);
            y = x;
            }
                 public  object vbTab { get; set; }}
    
            listBox1.Items.Add("X" & vbTab & vbTab & "R" & vbTab & vbTab & vbTab & vbTab & "Total");   -------> //*listBox1 Error	1	A namespace cannot directly contain members such as fields or methods //*/
    		/
    
    		listBox1.Items.Add("--------------------------------------------------"); {
    			a = 1
    
    			Do While a <= n;
    
    			Select Case a
    			Case Is = 1;
    			r = 1;
    
    			Case
    			Else
    			r = CDec(textBox2.Text);
    		} {
    
    			total += CDec(y * (r ^ (a - 1)))
    			listBox.Items.Add(x & vbTab & "x" & vbTab & r & vbTab & "=" & vbTab & (x * r) & vbTab & vbTab & total);
    
    			x = x * r
    
    			a += 1
    		}
    
    	}
    }

    Please send me correct code.
    Last edited by dday9; Feb 15th, 2021 at 09:30 AM.

  2. #2
    Super Moderator dday9's Avatar
    Join Date
    Mar 2011
    Location
    South Louisiana
    Posts
    11,715

    Re: Request for Program

    Moderators note: this was originally on https://www.vbforums.com/showthread....1283&p=5510996 but spun off onto its own thread.
    "Code is like humor. When you have to explain it, it is bad." - Cory House
    VbLessons | Code Tags | Sword of Fury - Jameram

  3. #3
    Software Carpenter dee-u's Avatar
    Join Date
    Feb 2005
    Location
    Pinas
    Posts
    11,123

    Re: Request for Program

    Quote Originally Posted by dday9 View Post
    Moderators note: this was originally on https://www.vbforums.com/showthread....1283&p=5510996 but spun off onto its own thread.
    The link is pointed to this thread.
    Regards,


    As a gesture of gratitude please consider rating helpful posts. c",)

    Some stuffs: Mouse Hotkey | Compress file using SQL Server! | WPF - Rounded Combobox | WPF - Notify Icon and Balloon | NetVerser - a WPF chatting system

  4. #4
    Super Moderator dday9's Avatar
    Join Date
    Mar 2011
    Location
    South Louisiana
    Posts
    11,715

    Re: Request for Program

    "Code is like humor. When you have to explain it, it is bad." - Cory House
    VbLessons | Code Tags | Sword of Fury - Jameram

  5. #5
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    110,299

    Re: Request for Program

    How about you make some sort of effort on your own behalf? Firstly, how are we supposed to know what the correct code is when you have made zero effort to explain anything about what you're trying to achieve? You're expecting us to read the code that doesn't work, understand what it's supposed to be doing and then provide code to actually do that. Would you like us to wipe your nose while we're at it? You need to provide a FULL and CLEAR explanation of the problem, which includes a description of what you're trying to achieve, exactly how you're trying to achieve it and exactly what happens when you try. If the code you have doesn't behave as expected, you have to tell us exactly where and how the actual behaviour differs from your expectation. If there's an error message, tell us what it is and where it's generated. If it's a run time error, you need to have debugged the code and be able to tell us exactly what the application state was at the time. If you'd like us to spend our time helping you, the least you can do is spend a bit of your time to help us do so.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width