[Visual C#] von public static void richtextbox in einer Form steuern

06/11/2010 22:22 LordMampf2#1
Hallo liebe Coders
Erstmal vielen Dank das ihr immer so fleißig helft..
Ich hab mal wieder ein neues Problem:
PHP Code:
       public static void txtboxaktu()
            {
                [
nicht wichtiger Code]

                
Form1 f1 = new Form1();
                
f1.richTextBox2Form1.Text "test";

            } 
Ich will von der public static void ein Text in eine richTextBox reinschreiben lassen, aber das geht einfach nicht ;) ( Die richtextbox ist in Form1 und der public static void ist in Form1.cs)
bin noch Anfänger..


Und noch ein Problem:

Wie kann man eine .bin Datei ausführen also wie als .exe behandeln...
( ohne sie zu umbenennen )

Vielen Dank im vorraus ;)

grüßle LordMampf2
06/12/2010 16:04 x]vIrus[x#2
ich rate dir c# oop video 2 brain tutorials etc an zu gucken, damit du überhaupt weißt was statische methoden etc etc überhaupt sind bevor du wild durcheinander schusterst
06/12/2010 21:02 theonly112#3
Du brauchst einen Statischen verweis. zB. public static MainWindow;
In der Initialize Methode : MainWindow = this;
MainWindow.richTextBox2.....