Click here to Skip to main content
15,893,161 members
Home / Discussions / C#
   

C#

 
QuestionCrystalReport Viewer Pin
Luis M. Rojas3-Mar-22 5:39
Luis M. Rojas3-Mar-22 5:39 
AnswerRe: CrystalReport Viewer Pin
Mycroft Holmes3-Mar-22 11:44
professionalMycroft Holmes3-Mar-22 11:44 
QuestionC# List Pin
Member 155527492-Mar-22 1:41
Member 155527492-Mar-22 1:41 
AnswerRe: C# List Pin
Richard Deeming2-Mar-22 2:09
mveRichard Deeming2-Mar-22 2:09 
SuggestionWhy does the music stop ? Pin
Member 155522211-Mar-22 19:46
Member 155522211-Mar-22 19:46 
GeneralRe: Why does the music stop ? Pin
OriginalGriff1-Mar-22 20:01
mveOriginalGriff1-Mar-22 20:01 
GeneralRe: Why does the music stop ? Pin
Pete O'Hanlon1-Mar-22 22:14
mvePete O'Hanlon1-Mar-22 22:14 
QuestionC# Trouble passing a string var : Form1 to Forms and back again Pin
Member 155520191-Mar-22 12:09
Member 155520191-Mar-22 12:09 
The below code works EXCEPT for one issue: the updated string has the following value in front of it: "System.Windows.Forms.TextBox,Text:"
Why is that there and how to be rid of it? The name of the field is masterRec. Code snippets follow:
FORM1 (main code) & FORM2 are the names I give them for purposes of this post and not their operating names. Don't think I am actually using the Get/Set apparatus.

FORM1 (In part):
FormUpdate fu = new FormUpdate(hotRec);     // INSTANTIATE UPDATE FORM CLASS
fu.action = "UP";                                                      // FormUpdate Action = UPDATE
fu.masterRec = hotRec;                                                 // Set local Master Record in FormUpdate
this.Visible = false;                                                  // Turn off visibility for this form 
fu.ShowDialog();                                                       // <--------------------------  THIS IS WHERE THE OTHER FORM EXECUTES!!!
this.Visible=true;                                                     // Turn on visibility for this form[/code]


FORM2 (In total):
namespace TestDictionary
{
    public partial class FormUpdate : Form
    {        
        //  V A R S 
       
        public string masterRec { get; set; }
        public string action { get; set; }
        private string siteId, logonID, pw, date, comments;

       // public FormUpdate()
       public FormUpdate(String myMaster)
           
        {
            InitializeComponent();
        }

        private void FormUpdate_Load(object sender, EventArgs e)    // F O R M   L O A D E D
        {
            // Disassemble the Master Record into its component fields to be displayed in this form

            if (action == "UP")
            {
                string[] tokens = masterRec.Split(',');
                siteId = tokens[0];
                logonID = tokens[1];
                pw = tokens[2];
                date = tokens[3];
                comments = tokens[4];

                websiteTextBox.Text = siteId;
                logonIDTextBox.Text = logonID;
                pwTextBox.Text = pw;
                dateTextBox.Text = date;
                commentsTextBox.Text = comments;
            }

        }

        private void Perform_Click(object sender, EventArgs e)       // P E R F O R M   B U T T O N  (AFTER UPDATES)
        {
            if (action == "UP")      // If Update, return updated Master (REASSEMBLED)
            masterRec = websiteTextBox + "," + logonIDTextBox.Text + "," + pwTextBox.Text + "," + dateTextBox.Text + "," + commentsTextBox.Text + ",";              
            this.Close();
        }
    }
}

THANK YOU FOR ANY HELP!

AnswerRe: C# Trouble passing a string var : Form1 to Forms and back again Pin
OriginalGriff1-Mar-22 20:00
mveOriginalGriff1-Mar-22 20:00 
QuestionRefer a class in C# but don't recognized Pin
ernteSKY24-Feb-22 14:38
ernteSKY24-Feb-22 14:38 
AnswerRe: Refer a class in C# but don't recognized Pin
OriginalGriff24-Feb-22 19:35
mveOriginalGriff24-Feb-22 19:35 
QuestionConditional Compiler Symbols Pin
Kevin Marois22-Feb-22 11:00
professionalKevin Marois22-Feb-22 11:00 
AnswerRe: Conditional Compiler Symbols Pin
OriginalGriff22-Feb-22 11:14
mveOriginalGriff22-Feb-22 11:14 
GeneralRe: Conditional Compiler Symbols Pin
Kevin Marois22-Feb-22 12:25
professionalKevin Marois22-Feb-22 12:25 
GeneralRe: Conditional Compiler Symbols Pin
trønderen22-Feb-22 15:03
trønderen22-Feb-22 15:03 
GeneralRe: Conditional Compiler Symbols Pin
OriginalGriff22-Feb-22 20:11
mveOriginalGriff22-Feb-22 20:11 
Questionwhat is the right place to await Task.WhenAll Pin
Kumara Prathipati 202119-Feb-22 15:04
Kumara Prathipati 202119-Feb-22 15:04 
AnswerRe: what is the right place to await Task.WhenAll Pin
Richard Deeming24-Feb-22 0:24
mveRichard Deeming24-Feb-22 0:24 
QuestionVisual Studio 2022 Dark Image In Panel Pin
GP66612-Feb-22 7:37
GP66612-Feb-22 7:37 
QuestionRe: Visual Studio 2022 Dark Image In Panel Pin
Eddy Vluggen12-Feb-22 10:45
professionalEddy Vluggen12-Feb-22 10:45 
QuestionSyntax error: Missing operand after 'Percent' operator. Pin
Richard A Knox11-Feb-22 10:46
Richard A Knox11-Feb-22 10:46 
AnswerRe: Syntax error: Missing operand after 'Percent' operator. Pin
Mycroft Holmes11-Feb-22 11:05
professionalMycroft Holmes11-Feb-22 11:05 
GeneralRe: Syntax error: Missing operand after 'Percent' operator. Pin
Richard A Knox12-Feb-22 2:08
Richard A Knox12-Feb-22 2:08 
GeneralRe: Syntax error: Missing operand after 'Percent' operator. Pin
Mycroft Holmes12-Feb-22 11:16
professionalMycroft Holmes12-Feb-22 11:16 
AnswerRe: Syntax error: Missing operand after 'Percent' operator. Pin
Kelly Herald11-Feb-22 11:46
Kelly Herald11-Feb-22 11:46 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.