Home Upgrade Search Memberlist Extras Hacker Tools Award Goals Help Wiki Contact

.NET 

Form2 Textbox doesn't want to add Form1 text from textbox?

So I'm stumped on this one, I'm trying to get my form2 (Log) textbox to add form1's text from it's textbox. Form1's text should be equal from a string, it adds it just fine how I want it, however it doesn't want to add it to form2's textbox. I've added my Debug.Writelines and it goes through the code clean and it doesn't throw any exceptions. In other subs it can add text to form2's textbox just fine. I've even added another textbox to my form1 to see if maybe it can't pull the text from textbox1 but it can -.-

Here's a code of what I'm trying to do.
Code
Log.TextBox1.Text &= DateTime.Now & vbNewLine
                Try
                    CheckForIllegalCrossThreadCalls = False
                    PROCS = message(1)
                    Debug.WriteLine("PROCS Has Text!")
                    Debug.WriteLine("Multi-Thead Start")
                    Strt.Start()
                    Debug.WriteLine("Multi-Thread Started")
                    TextBox4.Text &= " Processes " & " " & DateTime.Now & vbNewLine
                    Debug.WriteLine("Process textbox added!")
                    TextBox4.Text &= TextBox2.Text & " " & DateTime.Now & vbNewLine
                    Debug.WriteLine("Debug added text from process textbox")
                    Log.TextBox1.Text &= TextBox4.Text & vbNewLine
                    Debug.WriteLine("Updated Log Textbox Finished!")
                Catch ex As Exception
                    Debug.WriteLine(ex)
                    Log.TextBox1.Text &= ex.ToString & " " & DateTime.Now & vbNewLine
                End Try

Huge thanks for your help guys 🙂
What is Log?
And PROCS?
And message(1)?
And Strt?

CheckForIllegalCrossThreadCalls = false
Really? 😠

Are you dealing with logs, right? Use NuGet and try:
Code
Install-package log4net

No need to reinventing the wheel.
(Jul 21, 2016 05:50 PM)Zilog80 Wrote:  What is Log?
And PROCS?
And message(1)?
And Strt?

CheckForIllegalCrossThreadCalls = false
Really? 😠

Are you dealing with logs, right? Use NuGet and try:
Code
Install-package log4net

No need to reinventing the wheel.

Log is the name of Form2
PROCS is a String
Message(1) is also a String
Strt is another Thread for Multi-Threading.
My problem is probably what I posted needs to be in it's own thread. I'll post back results later today.

Solved my problem with adding this to my code.
Code
If Me.InvokeRequired Then
            Me.Invoke(New MethodInvoker(AddressOf Splitter))
            Else


Possibly Related Threads...
Thread / Author Replies Views Last Post
[C#] by NotAFedSep 10, 2018 09:21 PM 8 322 Sep 10, 2018 09:21 PM
Last Post: BahNahNah
[.NET] by EffexionApr 16, 2018 02:48 AM 4 195 Apr 16, 2018 02:48 AM
Last Post: Effexion
[C#] by MarwixAug 4, 2017 02:56 AM 8 422 Aug 4, 2017 02:56 AM
Last Post: Marwix