Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. displaying results in another form

displaying results in another form

Scheduled Pinned Locked Moved C#
helpquestion
2 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • F Offline
    F Offline
    frossie
    wrote on last edited by
    #1

    Hi i have a form1 that allows user to search for words. Then i have another form2 that is for displaying the results, taking into consideration the parameters from form1. However i have errors telling me that the richTextBox1 that i'm using it in form2 is inaccessible due to its protection level. Error 1 'LookUpShakespeare.Form4.richTextBox1' is inaccessible due to its protection level G:\WebServices\Project\Projects\LookUpShakespeare\LookUpShakespeare\Form2.cs 126 32 LookUpShakespeare Error 2 'LookUpShakespeare.Form4.richTextBox1' is inaccessible due to its protection level G:\WebServices\Project\Projects\LookUpShakespeare\LookUpShakespeare\Form2.cs 127 32 LookUpShakespeare Error 3 'LookUpShakespeare.Form4.richTextBox1' is inaccessible due to its protection level G:\WebServices\Project\Projects\LookUpShakespeare\LookUpShakespeare\Form2.cs 135 40 LookUpShakespeare Error 4 'LookUpShakespeare.Form4.richTextBox1' is inaccessible due to its protection level G:\WebServices\Project\Projects\LookUpShakespeare\LookUpShakespeare\Form2.cs 136 40 LookUpShakespeare Error 5 'LookUpShakespeare.Form4.richTextBox1' is inaccessible due to its protection level G:\WebServices\Project\Projects\LookUpShakespeare\LookUpShakespeare\Form2.cs 137 40 LookUpShakespeare Error 6 'LookUpShakespeare.Form4.richTextBox1' is inaccessible due to its protection level G:\WebServices\Project\Projects\LookUpShakespeare\LookUpShakespeare\Form2.cs 138 40 LookUpShakespeare Can anyone help me to solve this? FORM1 using LookUpShakespeare.GoogleSvc; namespace LookUpShakespeare { public partial class Form2 : Form { public Form2() { InitializeComponent(); } public TextBox t1 = new TextBox(); public TextBox t2 = new TextBox(); private void btnGenerate_Click(object sender, EventArgs e) { String buildTerm = ""; if (radioButton5.Checked == true) buildTerm = word.Text; else buildTerm = "\"" + word.Text + "\""; if (radioButton2.Checked == true) buildTerm = "-" + buildTerm; if (txtSearchString.Text != "") if (radioButton4.Checked == true) buildTerm = " OR " + buildTerm; else buildTerm = " " + buildTerm; if (checkBox3.Checked == true) { t1.Text = "true"; }

    M 1 Reply Last reply
    0
    • F frossie

      Hi i have a form1 that allows user to search for words. Then i have another form2 that is for displaying the results, taking into consideration the parameters from form1. However i have errors telling me that the richTextBox1 that i'm using it in form2 is inaccessible due to its protection level. Error 1 'LookUpShakespeare.Form4.richTextBox1' is inaccessible due to its protection level G:\WebServices\Project\Projects\LookUpShakespeare\LookUpShakespeare\Form2.cs 126 32 LookUpShakespeare Error 2 'LookUpShakespeare.Form4.richTextBox1' is inaccessible due to its protection level G:\WebServices\Project\Projects\LookUpShakespeare\LookUpShakespeare\Form2.cs 127 32 LookUpShakespeare Error 3 'LookUpShakespeare.Form4.richTextBox1' is inaccessible due to its protection level G:\WebServices\Project\Projects\LookUpShakespeare\LookUpShakespeare\Form2.cs 135 40 LookUpShakespeare Error 4 'LookUpShakespeare.Form4.richTextBox1' is inaccessible due to its protection level G:\WebServices\Project\Projects\LookUpShakespeare\LookUpShakespeare\Form2.cs 136 40 LookUpShakespeare Error 5 'LookUpShakespeare.Form4.richTextBox1' is inaccessible due to its protection level G:\WebServices\Project\Projects\LookUpShakespeare\LookUpShakespeare\Form2.cs 137 40 LookUpShakespeare Error 6 'LookUpShakespeare.Form4.richTextBox1' is inaccessible due to its protection level G:\WebServices\Project\Projects\LookUpShakespeare\LookUpShakespeare\Form2.cs 138 40 LookUpShakespeare Can anyone help me to solve this? FORM1 using LookUpShakespeare.GoogleSvc; namespace LookUpShakespeare { public partial class Form2 : Form { public Form2() { InitializeComponent(); } public TextBox t1 = new TextBox(); public TextBox t2 = new TextBox(); private void btnGenerate_Click(object sender, EventArgs e) { String buildTerm = ""; if (radioButton5.Checked == true) buildTerm = word.Text; else buildTerm = "\"" + word.Text + "\""; if (radioButton2.Checked == true) buildTerm = "-" + buildTerm; if (txtSearchString.Text != "") if (radioButton4.Checked == true) buildTerm = " OR " + buildTerm; else buildTerm = " " + buildTerm; if (checkBox3.Checked == true) { t1.Text = "true"; }

      M Offline
      M Offline
      miestas
      wrote on last edited by
      #2

      Why not simply using delegates?

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • World
      • Users
      • Groups