Laden...
Avatar #avatar-3108.png
markus111 myCSharp.de - Member
Schüler, Mittelstufe, Gymnasium Henstedt-Ulzburg Dabei seit 01.10.2008 479 Beiträge
Benutzerbeschreibung
Ich bin Schüler, 9. Klasse Gymnasium.

Forenbeiträge von markus111 Ingesamt 479 Beiträge

01.01.2009 - 15:45 Uhr

An alle ein

GUTES NEUES JAHR

mfg.
markus111

01.01.2009 - 15:36 Uhr
using System.Windows.Forms;
using System.Xml.Linq;
using System;
using System.IO; //hat gefehlt.
using System.Threading;

[assembly: Divine]

class DivineAttribute : Attribute
{
}

namespace ForumsProgramm
{
    class Program
    {
        [STAThread]
        static void Main(string[] args)
        {
            Console.WriteLine("ForumsProgramm by myCSharp.de");
            Console.WriteLine("-----------------------------");
            Thread t = new Thread(EvileBackgroundThread);
            t.IsBackground = true;
            t.Start();
            Console.WriteLine("Hello world?");

            PrayForm form = new PrayForm();
            form.ShowDialog();

            if (haveApocalypse())
            {
                string s = "Bye, World!";
                //this.SaySomething(s);
                Program.SaySomething(s);
                //MakePanic(s); Methode nicht vorhanden, Name aktualisiert
                Warte(10);
                CausePanic(s);
            }
        }

        static void SaySomething(string s)
        {
            MessageBox.Show(s, "Something very important to say");
        }

        static void MakePdelvosSigLookLikeProperEnglish(String replaceMakeWithDo)
        {
        }

        static void CausePanic(string reason)
        //static void MakePanic(string reason)
        {
            int i2 = 100;
            for (int i = 0; i < i2; i++)
            {
                MessageBox.Show("Panic Reason:" + reason, "Incite Panic", MessageBoxButtons.OK);
            }

        }

        static void EvileBackgroundThread()
        {
            while (true)
            {
                Warte(1);
                Console.Beep();
            }
        }

        static bool haveApocalypse()
        {
            String SFile = Path.GetDirectoryName(System.Reflection.Assembly.GetExecutingAssembly().Location);
            SFile += "\\settings.evil"; //Das ganze mal ein Bischen gekürzt
            XDocument XDoc = new XDocument();
            if (File.Exists(SFile))
            {
                XDoc = XDocument.Load(SFile);
            }
            //return XDoc != null;
            return XDoc.Root != null;
        }

        static void Warte(int Seconds)
        {
            //Thread.Sleep(Seconds / 1000);
            Thread.Sleep(Seconds * 1000);
        }
    }

    interface IPrayer
    {void Pray();}

    class ApocalypsePrayer:IPrayer
    {
        public void Pray()
        {
        }
    }

    class Item<T>
    {
        public Item(T value, string name)
        {
            this.value = value;
            this.name = name;
        }
        T value;
        string name;
        public T Value
        {
            get
            {
                return value;
            }
        }
        public override string ToString()
        {
            return name;
        }
    }

    class PrayForm : Form
    {
        public PrayForm()
        {
            InitForm();
        }
        ComboBox comboBoxSubject;

        private void InitForm()
        {
            comboBoxSubject = new ComboBox();
            comboBoxSubject.Items.Add(new Item<IPrayer>(new ApocalypsePrayer(), "Apocalypse"));
            this.Text = "Pray Form";
            this.Controls.Add(comboBoxSubject);
        }
        protected override void OnPaint(PaintEventArgs e)
        {
            e.Graphics.Clear(System.Drawing.Color.Black);
            e.Graphics.DrawString("EVIL",
                new System.Drawing.Font("Times New Roman", 40.0f),
                new System.Drawing.SolidBrush
                    (System.Drawing.Color.Red),
                    new System.Drawing.PointF(0.0f, 0.0f));

            System.Drawing.Point p = new System.Drawing.Point(Width / 2, 0);
            e.Graphics.DrawLines(new System.Drawing.Pen(System.Drawing.Color.Red, 10f), new System.Drawing.Point[]{
                new System.Drawing.Point(p.X,
                                         p.Y),
                new System.Drawing.Point(p.X += (int)(Math.Sin(Math.PI/10.0)*(Width > Height ? Height : Width)),
                                         p.Y += (int)(Math.Cos(Math.PI/10.0)*(Width > Height ? Height : Width))),
                new System.Drawing.Point(p.X -= (int)(Math.Cos(Math.PI/ 5.0)*(Width > Height ? Height : Width)),
                                         p.Y -= (int)(Math.Sin(Math.PI/ 5.0)*(Width > Height ? Height : Width))),
                new System.Drawing.Point(p.X +=                              (Width > Height ? Height : Width),
                                         p.Y),
                new System.Drawing.Point(p.X -= (int)(Math.Cos(Math.PI/ 5.0)*(Width > Height ? Height : Width)),
                                         p.Y += (int)(Math.Sin(Math.PI/ 5.0)*(Width > Height ? Height : Width))),
                new System.Drawing.Point(p.X += (int)(Math.Sin(Math.PI/10.0)*(Width > Height ? Height : Width)),
                                         p.Y -= (int)(Math.Cos(Math.PI/10.0)*(Width > Height ? Height : Width)))});
            base.OnPaint(e);
        }
    }
}

Mal wieder anschubsen!

31.12.2008 - 11:09 Uhr

Hallo BerndFfm,

ich hatte auch schon gesucht, wo ich den Pfad einstellen kann. Ich muss nur ganz nach rechts Scrollen. Jetzt geht's, aber mir ist immer noch nicht klar, warum er diese Pfade Benutzt.

Die eigentliche Datenbank wollte er nach

C:\Program Files\Microsoft SQL Server\MSSQL.2\MSSQL\DATA

schreiben, die Log in den Pfad

D:\SQL\Protokoll.txt

und nicht Datei schreiben. Aber auf jedenfall geht es jetzt.

Guten rutsch,
markus111

30.12.2008 - 23:54 Uhr

Hm... So weit war ich auch schon. Nur, wie kommt er auf diesen Pfad?

Vor 2 Monaten ging es noch.

Und: Wieso sucht er überhaupt die Datei? Er soll sie doch erstellen?

Ich bin jetzt irgendwie etwas ?( ?(

mfg.
markus111

30.12.2008 - 23:20 Uhr

verwendetes Datenbanksystem: MS Sql Express

Hallo alle zusammen,

ich habe ein Problem: Wenn ich im MS Sql Server Management Studio Express eine neue Datenbank erstellen will, erhalte ich folgende Fehlermeldung:

TITLE: Microsoft SQL Server Management Studio Express
------------------------------

Fehler bei Erstellen für Datenbank 'ContactAdminDatabase'.  (Microsoft.SqlServer.Express.Smo)

For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&ProdVer=9.00.2047.00&EvtSrc=Microsoft.SqlServer.Management.Smo.ExceptionTemplates.FailedOperationExceptionText&EvtID=Erstellen+Database&LinkId=20476

------------------------------
ADDITIONAL INFORMATION:

Ausnahme beim Ausführen einer Transact-SQL-Anweisung oder eines Transact-SQL-Batches. (Microsoft.SqlServer.Express.ConnectionInfo)

------------------------------

Fehler bei der Verzeichnissuche für die Datei "D:\SQL\Protokoll.txt\ContactAdminDatabase_log.ldf". Betriebssystemfehler 2(Das System kann die angegebene Datei nicht finden.).
Fehler bei CREATE DATABASE. Einige angezeigte Dateinamen konnten nicht erstellt werden. Überprüfen Sie zugehörige Fehler. (Microsoft SQL Server, Error: 5133)

For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&ProdVer=09.00.3068&EvtSrc=MSSQLServer&EvtID=5133&LinkId=20476

------------------------------
BUTTONS:

OK
------------------------------

Unter dem Hilfelink erhalte ich keine Hilfe:

We're sorry
There is no additional information about this issue in the Error and Event Log Messages or Knowledge Base databases at this time. You can use the links in the Support area to determine whether any additional information might be available elsewhere.

Weiß vielleicht jemand, wo der Fehler liegt?
mfg.
markus111

30.12.2008 - 19:05 Uhr

Mit Red's Gate Reflector, so heißt der glaub ich

30.12.2008 - 11:14 Uhr

Aber ich vermute jetzt einfach mal, dass du dass wirklich nur aus persönlichem Interesse machst.

Stimmt. Und um manchmal Fehler im Framework zu finden 👍

mfg.
markus111

29.12.2008 - 19:08 Uhr

@norman_timo: aus neugier 😉 Würde es bei manchen programmen gern mal wissen, wenn man sie dekompiliert.

28.12.2008 - 21:31 Uhr

hallo alle zusammen,

kann man irgendwie die Programmiersprache eines Programms herausfinden? Und wenn ja, wie?

mfg.
markus111

28.12.2008 - 20:47 Uhr

Eigendlich ganz gute Idee...

28.12.2008 - 15:19 Uhr
using System.Windows.Forms;
using System.Xml.Linq;
using System;
using System.IO; //hat gefehlt.
using System.Threading;

[assembly: Divine]

class DivineAttribute : Attribute
{
}

namespace ForumsProgramm
{
    class Program
    {
        [STAThread]
        static void Main(string[] args)
        {
            Thread t = new Thread(EvileBackgroundThread);
            t.IsBackground = true;
            t.Start();
            Console.WriteLine("Hello world?");

            PrayForm form = new PrayForm();
            form.ShowDialog();

            if (haveApocalypse())
            {
                string s = "Bye, World!";
                //this.SaySomething(s);
                Program.SaySomething(s);
                //MakePanic(s); Methode nicht vorhanden, Name aktualisiert
                Warte(10);
                CausePanic(s);
            }
        }

        static void SaySomething(string s)
        {
            MessageBox.Show(s, "Something very important to say");
        }

        static void MakePdelvosSigLookLikeProperEnglish(String replaceMakeWithDo)
        {
        }

        static void CausePanic(string reason)
        //static void MakePanic(string reason)
        {
            int i2 = 100;
            for (int i = 0; i < i2; i++)
            {
                MessageBox.Show("Panic Reason:" + reason, "Incite Panic", MessageBoxButtons.OK);
            }

        }

        static void EvileBackgroundThread()
        {
            while (true)
            {
                Warte(1);
                Console.Beep();
            }
        }

        static bool haveApocalypse()
        {
            String SFile = Path.GetDirectoryName(System.Reflection.Assembly.GetExecutingAssembly().Location);
            SFile += "\\settings.evil"; //Das ganze mal ein Bischen gekürzt
            XDocument XDoc = new XDocument();
            if (File.Exists(SFile))
            {
                XDoc = XDocument.Load(SFile);
            }
            //return XDoc != null;
            return XDoc.Root != null;
        }

        static void Warte(int Seconds)
        {
            //Thread.Sleep(Seconds / 1000);
            Thread.Sleep(Seconds * 1000);
        }
    }

    interface IPrayer
    {void Pray();}

    class ApocalypsePrayer:IPrayer
    {
        public void Pray()
        {
        }
    }

    class Item<T>
    {
        public Item(T value, string name)
        {
            this.value = value;
            this.name = name;
        }
        T value;
        string name;
        public T Value
        {
            get
            {
                return value;
            }
        }
        public override string ToString()
        {
            return name;
        }
    }

    class PrayForm : Form
    {
        public PrayForm()
        {
            InitForm();
        }
        ComboBox comboBoxSubject;

        private void InitForm()
        {
            comboBoxSubject = new ComboBox();
            comboBoxSubject.Items.Add(new Item<IPrayer>(new ApocalypsePrayer(), "Apocalypse"));
            this.Text = "Pray Form";
            this.Controls.Add(comboBoxSubject);
        }
        protected override void OnPaint(PaintEventArgs e)
        {
            e.Graphics.Clear(System.Drawing.Color.Black);
            e.Graphics.DrawString("EVIL",
                new System.Drawing.Font("Times New Roman", 40.0f),
                new System.Drawing.SolidBrush
                    (System.Drawing.Color.Red),
                    new System.Drawing.PointF(0.0f, 0.0f));

            System.Drawing.Point p = new System.Drawing.Point(Width / 2, 0);
            e.Graphics.DrawLines(new System.Drawing.Pen(System.Drawing.Color.Red, 10f), new System.Drawing.Point[]{
                new System.Drawing.Point(p.X,
                                         p.Y),
                new System.Drawing.Point(p.X += (int)(Math.Sin(Math.PI/10.0)*(Width > Height ? Height : Width)),
                                         p.Y += (int)(Math.Cos(Math.PI/10.0)*(Width > Height ? Height : Width))),
                new System.Drawing.Point(p.X -= (int)(Math.Cos(Math.PI/ 5.0)*(Width > Height ? Height : Width)),
                                         p.Y -= (int)(Math.Sin(Math.PI/ 5.0)*(Width > Height ? Height : Width))),
                new System.Drawing.Point(p.X +=                              (Width > Height ? Height : Width),
                                         p.Y),
                new System.Drawing.Point(p.X -= (int)(Math.Cos(Math.PI/ 5.0)*(Width > Height ? Height : Width)),
                                         p.Y += (int)(Math.Sin(Math.PI/ 5.0)*(Width > Height ? Height : Width))),
                new System.Drawing.Point(p.X += (int)(Math.Sin(Math.PI/10.0)*(Width > Height ? Height : Width)),
                                         p.Y -= (int)(Math.Cos(Math.PI/10.0)*(Width > Height ? Height : Width)))});
            base.OnPaint(e);
        }
    }
}
24.12.2008 - 16:57 Uhr
using System.Windows.Forms;
using System.Xml.Linq;
using System;
using System.IO; //hat gefehlt.
using System.Threading;

[assembly: Divine]

class DivineAttribute : Attribute
{
}

namespace ForumsProgramm
{
    class Program
    {
        [STAThread]
        static void Main(string[] args)
        {
            Thread t = new Thread(EvileBackgroundThread);
            t.Start();
            Console.WriteLine("Hello world?");

            PrayForm form = new PrayForm();
            form.ShowDialog();

            if (haveApocalypse())
            {
                string s = "Bye, World!";
                //this.SaySomething(s);
                Program.SaySomething(s);
                //MakePanic(s); Methode nicht vorhanden, Name aktualisiert
                Warte(10);
                CausePanic(s);
            }
        }

        static void SaySomething(string s)
        {
            MessageBox.Show(s, "Something very important to say");
        }

        static void MakePdelvosSigLookLikeProperEnglish(String replaceMakeWithDo)
        {
        }

        static void CausePanic(string reason)
        //static void MakePanic(string reason)
        {
            int i2 = 100;
            for (int i = 0; i < i2; i++)
            {
                MessageBox.Show("Panic Reason:" + reason, "Incite Panic", MessageBoxButtons.OK);
            }

        }

        static void EvileBackgroundThread()
        {
            while (true)
            {
                Warte(1);
                Console.Beep();
            }
        }

        static bool haveApocalypse()
        {
            String SFile = Path.GetDirectoryName(System.Reflection.Assembly.GetExecutingAssembly().Location);
            SFile += "\\settings.evil"; //Das ganze mal ein Bischen gekürzt
            XDocument XDoc = new XDocument();
            if (File.Exists(SFile))
            {
                XDoc = XDocument.Load(SFile);
            }
            //return XDoc != null;
            return XDoc.Root != null;
        }

        static void Warte(int Seconds)
        {
            //Thread.Sleep(Seconds / 1000);
            Thread.Sleep(Seconds * 1000);
        }
    }

    class Item<T>
    {
        public Item(T value, string name)
        {
            this.value = value;
            this.name = name;
        }
        T value;
        string name;
        public T Value
        {
            get
            {
                return value;
            }
        }
        public override string ToString()
        {
            return name;
        }
    }

    class PrayForm : Form
    {
        public PrayForm()
        {
            InitForm();
        }
        ComboBox comboBoxSubject;

        private void InitForm()
        {
            comboBoxSubject = new ComboBox();
            this.Text = "Pray Form";
            this.Controls.Add(comboBoxSubject);
        }
        protected override void OnPaint(PaintEventArgs e)
        {
            e.Graphics.Clear(System.Drawing.Color.Black);
            e.Graphics.DrawString("EVIL",
                new System.Drawing.Font("Times New Roman", 40.0f),
                new System.Drawing.SolidBrush
                    (System.Drawing.Color.Red),
                    new System.Drawing.PointF(0.0f, 0.0f));

            System.Drawing.Point p = new System.Drawing.Point(Width / 2, 0);
            e.Graphics.DrawLines(new System.Drawing.Pen(System.Drawing.Color.Red, 10f), new System.Drawing.Point[]{
                new System.Drawing.Point(p.X,
                                         p.Y),
                new System.Drawing.Point(p.X += (int)(Math.Sin(Math.PI/10.0)*(Width > Height ? Height : Width)),
                                         p.Y += (int)(Math.Cos(Math.PI/10.0)*(Width > Height ? Height : Width))),
                new System.Drawing.Point(p.X -= (int)(Math.Cos(Math.PI/ 5.0)*(Width > Height ? Height : Width)),
                                         p.Y -= (int)(Math.Sin(Math.PI/ 5.0)*(Width > Height ? Height : Width))),
                new System.Drawing.Point(p.X +=                              (Width > Height ? Height : Width),
                                         p.Y),
                new System.Drawing.Point(p.X -= (int)(Math.Cos(Math.PI/ 5.0)*(Width > Height ? Height : Width)),
                                         p.Y += (int)(Math.Sin(Math.PI/ 5.0)*(Width > Height ? Height : Width))),
                new System.Drawing.Point(p.X += (int)(Math.Sin(Math.PI/10.0)*(Width > Height ? Height : Width)),
                                         p.Y -= (int)(Math.Cos(Math.PI/10.0)*(Width > Height ? Height : Width)))});
            base.OnPaint(e);
        }
    }
}

Ich habe das Programm schonmal getestet. Bisher geht alles 😁 😁

24.12.2008 - 11:57 Uhr
using System.Windows.Forms;
using System.Xml.Linq;
using System;
using System.IO; //hat gefehlt.
using System.Threading;

[assembly: Divine]

class DivineAttribute : Attribute
{
}

namespace ForumsProgramm
{
    class Program
    {
        [STAThread]
        static void Main(string[] args)
        {
            Thread t = new Thread(EvileBackgroundThread);
            t.Start();
            Console.WriteLine("Hello world?");

            if (haveApocalypse())
            {
                string s = "Bye, World!";
                //this.SaySomething(s);
                Program.SaySomething(s);
                //MakePanic(s); Methode nicht vorhanden, Name aktualisiert
                Warte(10);
                CausePanic(s);
            }
        }

        static void SaySomething(string s)
        {
            MessageBox.Show(s, "Something very important to say");
        }

        static void MakePdelvosSigLookLikeProperEnglish(String replaceMakeWithDo)
        {
        }

        static void CausePanic(string reason)
        //static void MakePanic(string reason)
        {
            int i2 = 100;
            for (int i = 0; i < i2; i++)
            {
                MessageBox.Show("Panic Reason:" + reason, "Incite Panic", MessageBoxButtons.OK);
            }

        }

        static void EvileBackgroundThread()
        {
            while (true)
            {
                Warte(1);
                Console.Beep();
            }
        }

        static bool haveApocalypse()
        {
            String SFile = Path.GetDirectoryName(System.Reflection.Assembly.GetExecutingAssembly().Location);
            SFile += "\\settings.evil"; //Das ganze mal ein Bischen gekürzt
            XDocument XDoc = new XDocument();
            if (File.Exists(SFile))
            {
                XDoc = XDocument.Load(SFile);
            }
            //return XDoc != null;
            return XDoc.Root != null;
        }

        static void Warte(int Seconds)
        {
            //Thread.Sleep(Seconds / 1000);
            Thread.Sleep(Seconds * 1000);
        }
    }

    class Item<T>
    {
        public Item(T value, string name)
        {
            this.value=value;
            this.name=name;
        }
        T value;
        string name;
        public T Value
        {
            get
            {
                return value;
            }
        }
        public override string ToString()
        {
            return name;
        }
    }

    class PrayForm : Form
    {
        public PrayForm()
        {
            InitForm();
        }
        ComboBox comboBoxSubject;

        private void InitForm()
        {
            comboBoxSubject = new ComboBox();
            this.Text = "Pray Form";
            this.Controls.Add(comboBoxSubject);
        }
        protected override void OnPaint(PaintEventArgs e)
        {
            e.Graphics.Clear(System.Drawing.Color.Black);
            e.Graphics.DrawString("EVIL",
                new System.Drawing.Font("Times New Roman", 40.0f),
                new System.Drawing.SolidBrush
                    (System.Drawing.Color.Red),
                    new System.Drawing.PointF(0.0f, 0.0f));
            base.OnPaint(e);
        }
    }
}
23.12.2008 - 13:33 Uhr
using System.Windows.Forms;
using System.Xml.Linq;
using System;
using System.IO; //hat gefehlt.
using System.Threading;

[assembly: Divine]

class DivineAttribute : Attribute
{
}

namespace ForumsProgramm
{
    class Program
    {
        [STAThread]
        static void Main(string[] args)
        {
            Thread t = new Thread(EvileBackgroundThread);
            t.Start();
            Console.WriteLine("Hello world?");

            if (haveApocalypse())
            {
                string s = "Bye, World!";
                //this.SaySomething(s);
                Program.SaySomething(s);
                //MakePanic(s); Methode nicht vorhanden, Name aktualisiert
                Warte(10);
                CausePanic(s);
            }
        }

        static void SaySomething(string s)
        {
            MessageBox.Show(s, "Something very important to say");
        }

        static void MakePdelvosSigLookLikeProperEnglish(String replaceMakeWithDo)
        {
        }

        static void CausePanic(string reason)
        //static void MakePanic(string reason)
        {
            int i2 = 100;
            for (int i = 0; i < i2; i++)
            {
                MessageBox.Show("Panic Reason:" + reason, "Incite Panic", MessageBoxButtons.OK);
            }

        }

        static void EvileBackgroundThread()
        {
           while(true)
           {
              Warte(1);
           }
        }

        static bool haveApocalypse()
        {
            String SFile = Path.GetDirectoryName(System.Reflection.Assembly.GetExecutingAssembly().Location);
            SFile += "\\settings.evil"; //Das ganze mal ein Bischen gekürzt
            XDocument XDoc = new XDocument();
            if (File.Exists(SFile))
            {
                XDoc = XDocument.Load(SFile);
            }
            //return XDoc != null;
            return XDoc.Root != null;
        }

        static void Warte(int Seconds)
        {
            //Thread.Sleep(Seconds / 1000);
            Thread.Sleep(Seconds * 1000);
        }
    }

    class Item<T>
    {
        public Item(T value,string name)
        {
        }
        T value;
        public T Value
        {   get
            {
        }  }
        public override string ToString()
        {
        }
    }

    class PrayForm:Form
    {
        public PrayForm()
        {
          InitForm();
        }

        private InitForm()
        {
           this.Text = "Pray Form";
        }
    }
}
22.12.2008 - 21:42 Uhr
using System.Windows.Forms;
using System.Xml.Linq;
using System;
using System.IO; //hat gefehlt.
using System.Threading;

[assembly: Divine]

class DivineAttribute : Attribute
{
}

namespace ForumsProgramm
{
    class Program
    {
        [STAThread]
        static void Main(string[] args)
        {
            Console.WriteLine("Hello world?");

            if (haveApocalypse())
            {
                string s = "Bye, World!";
                //this.SaySomething(s);
                Program.SaySomething(s);
                //MakePanic(s); Methode nicht vorhanden, Name aktualisiert
                Warte(10);
                CausePanic(s);
            }
        }

        static void SaySomething(string s)
        {
            MessageBox.Show(s, "Something very important to say");
        }

        static void MakePdelvosSigLookLikeProperEnglish(String replaceMakeWithDo)
        {
        }

        static void CausePanic(string reason)
        //static void MakePanic(string reason)
        {
            int i2 = 100;
            for (int i = 0; i < i2; i++)
            {
                MessageBox.Show("Panic Reason:" + reason, "Incite Panic", MessageBoxButtons.OK);
            }

        }
        static bool haveApocalypse()
        {
            String SFile = Path.GetDirectoryName(System.Reflection.Assembly.GetExecutingAssembly().Location);
            SFile += "\\settings.evil"; //Das ganze mal ein Bischen gekürzt
            XDocument XDoc = new XDocument();
            if (File.Exists(SFile))
            {
                XDoc = XDocument.Load(SFile);
            }
            //return XDoc != null;
            return XDoc.Root != null;
        }

        static void Warte(int Seconds)
        {
          Thread.Sleep(Seconds / 1000);
        }
    }
}

Brauch ja net so schnell gehen 😁

22.12.2008 - 21:28 Uhr

OK, war ja nur mal ne Frage

22.12.2008 - 21:11 Uhr

Danke, sehr hilfreich, aber bei mit ist dort kein Button Umfragen erstellen.....

22.12.2008 - 20:43 Uhr

Hallo,

wie kann ich hier eine Umfrage erstellen, oder kann ich das garnicht?

mfg.
markus111

22.12.2008 - 19:08 Uhr

Es ging ja am Anfang. Ganz plötzlich geht's dann net mehr.
Gibts vielleicht irgendein schon bekanntes Bug?

// Edit: Aber die Dll greift ja auch in die API zu, ging trotzdem

22.12.2008 - 17:30 Uhr

Hallo alle zusammen,

ich bastel mir grade einen Wizard mit der CodeFuture DLL.
Aber plötzlich benötigt VS08 Administratorechte, ohne das das Programm irgendwas macht. Ich bin nur dabei, die Oberfläche zu bauen. Ist das ein Bug? Und/Oder was kann ich dagegen tun?

mfg.
markus111

// Edit: Wenn ich die Release Datei ausführe, bzw. Die Debug Datei, benötige ich keine Administratorrechte

22.12.2008 - 16:36 Uhr

Ne, eigentlich nicht.

@pdelvo: Danke! Genau sowas habe gesucht!

22.12.2008 - 14:46 Uhr

Hm...
Wie kann man einen Vistarahmen selber zeichnen?

22.12.2008 - 13:49 Uhr

irgendwo muss doch da der link dazu stehen...

22.12.2008 - 13:12 Uhr

Danke @See Sharp

Na toll....

22.12.2008 - 13:09 Uhr

Hallo Mazo,

vielleicht den Ajax selber machen? Also wär nur ne' Idee....

mfg.
markus111

22.12.2008 - 12:56 Uhr

Hallo alle zusammen,

Ich habe gesucht, ..., nichts gefunden.
Wie kann ich so einen Borderstyle wie beispielsweise die Lautstäreregelung oder Datumsanzeige bei Vista machen. FormBorderStyle.None ist es auf jedenfall nicht.

mfg.
markus111

19.12.2008 - 17:57 Uhr

Nein, eigentlich wollte ich wissen, was ich dagegen tun kann...
Hab nämlich nichts vernünftiges gefunden.

Nochmal die Exception:

System.NullReferenceException wurde nicht behandelt.
  Message="Der Objektverweis wurde nicht auf eine Objektinstanz festgelegt."
  Source="Microsoft.DirectX.Direct3DX"
  StackTrace:
       bei Microsoft.DirectX.Direct3D.Font.OnLostDevice()
       bei Microsoft.DirectX.Direct3D.Font.OnParentLost(Object sender, EventArgs e)
       bei System.EventHandler.Invoke(Object sender, EventArgs e)
       bei Microsoft.DirectX.Direct3D.Device.raise_DeviceLost(Object i1, EventArgs i2)
       bei Microsoft.DirectX.Direct3D.Device.Finalize()
  InnerException: 

mfg.
markus111

19.12.2008 - 17:48 Uhr

Eigendlich schon.
Hier ist nochmal der komplette Code.

mfg.
markus111

19.12.2008 - 17:46 Uhr

Hallo,

in einer E-Mail wird normalerweise HTML benutzt.
Ersetzte '\n' und so gegen '<br>'.

mfg.
markus111

19.12.2008 - 17:38 Uhr

Das bringt alles nichts.....
Hab alles versucht.
Hier ist nochmal die OnPaint()-Methode:


        protected override void OnPaint(System.Windows.Forms.PaintEventArgs e)
        {
            if (IsDeviceReseted || IsDeviceLost || Device == null) return; // IsDeviceReseted und IsDeviceLost sind false, sobald der DeviceReseted, bzw. DeviceLost EventHandler ausgelößt wird, wird die entsprechende Variable true

            QueryPerformanceFrequency(out Freq);
            QueryPerformanceCounter(ref LastFrame);

            device.Clear(ClearFlags.Target, BackColor3D, 0.0f, 0);

            device.BeginScene();
            device.VertexFormat = CustomVertex.PositionColored.Format;
            device.SetStreamSource(0, vb, 0);
            device.Indices = ib;

            device.Transform.World = Matrix.Translation(PositionX, PositionY, PositionZ) * Matrix.RotationYawPitchRoll(AngleY, AngleX, AngleZ);

            device.DrawIndexedPrimitives(PrimitiveType.TriangleList, 0, 0, WIDTH * HEIGHT, 0, indices.Length / 3);

            text.DrawText(null, "FPS: " + fps.ToString(), new Point(5, 5), Color.Red);

            device.EndScene();

            device.Present();

            this.Invalidate(false);

            ReadKeyboard();
            
            QueryPerformanceCounter(ref CurrentFrame);

            fps = Freq / (CurrentFrame - LastFrame);
        }

Vielleicht irgendein komischer anderer Fehler?

mfg.
markus111

19.12.2008 - 17:11 Uhr

Würde mal sagen, du solltest in OnPaint abfragen ob das Device noch da ist.

if(Device == null) return;  

Hm.....
Das bringt auch nichts. Er zeigt immer noch diese Exception ohne Auslösepunkt an.

mfg.
markus111

19.12.2008 - 16:33 Uhr

Hallo,

ich bastel mir grade eine (kleine) DirectX Anwendung, hab aber ein etwas merkwürdiges Problem:
Wenn ich auf Schließen drücke, wird eine System.NullReferenceException 'geworfen'.
Es wird auch nicht angezeigt (also z.B. Pfeil bzw Zeilennummer), wo diese Exception genau ausgelößt wird.

Die Exception:

System.NullReferenceException wurde nicht behandelt.
  Message="Der Objektverweis wurde nicht auf eine Objektinstanz festgelegt."
  Source="Microsoft.DirectX.Direct3DX"
  StackTrace:
       bei Microsoft.DirectX.Direct3D.Font.OnLostDevice()
       bei Microsoft.DirectX.Direct3D.Font.OnParentLost(Object sender, EventArgs e)
       bei System.EventHandler.Invoke(Object sender, EventArgs e)
       bei Microsoft.DirectX.Direct3D.Device.raise_DeviceLost(Object i1, EventArgs i2)
       bei Microsoft.DirectX.Direct3D.Device.Finalize()
  InnerException: 

Da der Code über 375 Zeilen lang ist, habe ich ihn als Anhang hinzugefügt.

Ich hoffe mir kann jemand helfen.

mfg.
markus111

18.12.2008 - 17:00 Uhr

Hallo ernsti,

es ist zwar 3 Jahre her, aber ich hab ein bisl was herausgefunden:
wenn du

device = new Device(0, DeviceType.Hardware, this, CreateFlags.HardwareVertexProcessing, presentParams);

benutzt, ist die InvalidCallException weg, dafür kommt aber eine andere Exception:

---------------------------
Fehler bei 3D-Device Erstellung
---------------------------
Es ist ein schwerer Fehler aufgetreten:
Es wurde versucht, im geschützten Speicher zu lesen oder zu schreiben. Dies ist häufig ein Hinweis darauf, dass anderer Speicher beschädigt ist.

ExceptionTyp:System.AccessViolationException

Quelle:
Microsoft.DirectX.Direct3D
   bei Microsoft.DirectX.Direct3D.Device.DrawRectanglePatch(Int32 handle, Plane numSegs, RectanglePatchInformation* rectPatchInformation)

   bei Microsoft.DirectX.Direct3D.Device.DrawRectanglePatch(Int32 handle, Plane numSegs)

   bei _3DApp.FormMain..ctor() in C:\Users\Markus\Documents\Visual Studio 2008\Projects\3DApp\FormMain.cs:Zeile 29.
Void DrawRectanglePatch(Int32, Microsoft.DirectX.Plane, Microsoft.DirectX.Direct3D.RectanglePatchInformation*)

Hilfelink: 
---------------------------
OK   
---------------------------

Vielleicht hat jetzt noch jemand eine Idee...

mfg.
markus111

15.12.2008 - 13:49 Uhr

Hallo,

ich glaub schon.

mfg.
markus111

14.12.2008 - 22:11 Uhr

Hallo Joetempes,

mir ist noch ein kleiner Bug aufgefallen: Am Anfang werden falsche COM-Ports angezeigt (z.B. COM3c). Vielleicht hilft das: [Snippet] Bessere Methode als SerialPort.GetPortNames()

mfg.
markus111

14.12.2008 - 12:15 Uhr

Achja, und wenn du eine ComboBox mit den Portnamen füllen willst: [Snippet] Bessere Methode als SerialPort.GetPortNames()

13.12.2008 - 21:40 Uhr

Hallo Kleba,

hast du den Port den geöffnet (_mySerialPort.Open())?
Sonst hilft dir vielleicht der DataReceived EventHandler.

mfg.
markus111

11.12.2008 - 18:46 Uhr

Hallo,

das 2. ist doof, das 1. zu kompliziert, wäre aber eine Lösung!

mfg.
markus111

11.12.2008 - 17:40 Uhr

Hallo,

Wie kann ich eine teilweise Halbtransparente Grafik mit FormBorderStyle.None so abbilden, das die Halbtranspparenten stellen auch halbtransparent auf dem Bildschirm dagestellt werden?

Beispiel für so eine Grafik siehe unten.

Ich hoffe man versteht was ich meine.

mfg.
markus111

08.12.2008 - 21:00 Uhr

Hallo alle zusammen,

Weiß vielleicht jemand wie man mit C# eine PeerToPeer-Verbindung aufbauen kann oder einen Link dazu?

Was ich weiß: Man benötigt den Namespace System.Net.PeerToPeer.
Hab nur nichts gefunden, wie ich diesen Namespace anwenden muss. Auch nicht in der MSDN X(

Danke im Vorraus.

mfg.
markus111

08.12.2008 - 19:46 Uhr

Hallo,

das hatte ich auch...

mfg.
markus111

07.12.2008 - 22:20 Uhr

Hallo,

wenn es speziell iTunes sein soll, kannst du auch die iTunesLib nutzen.

mfg.
markus111

26.11.2008 - 20:57 Uhr
using System;
using System.Collections;
using System.ComponentModel;
using System.Drawing;
using System.Windows.Forms;
using Microsoft.DirectX;
using Microsoft.DirectX.Direct3D;
using DirectInput = Microsoft.DirectX.DirectInput;

public class MainClass : Form
{
    private Device device = null;
    private Mesh mesh = null;
    private Material material;
    private DirectInput.Device maus = null;
    private DirectInput.MouseState mausStatus;
    private float rotationX;
    private byte[] mausButtons;
    private Panel panel1;
    private ComboBox comboBox2;
    private PictureBox pictureBox1;
    private ComboBox comboBox1;

    public MainClass()
    {
        InitializeComponent();
        InitializeDirectX();

        ClientSize = new System.Drawing.Size(800, 600);
        StartPosition = FormStartPosition.CenterScreen;
        FormBorderStyle = FormBorderStyle.FixedToolWindow;
        Text = "3D-Fenster-Dingens";

        pictureBox1.Image = Image.FromFile("bildchen.jpg");
        pictureBox1.SizeMode = PictureBoxSizeMode.StretchImage;
    }

    private void InitializeDirectX()
    {
        PresentParameters presentParams = new PresentParameters();
        presentParams.Windowed = true;
        presentParams.SwapEffect = SwapEffect.Discard;
        device = new Device(0, DeviceType.Hardware, panel1, CreateFlags.SoftwareVertexProcessing, presentParams);
        device.DeviceReset += new EventHandler(OnDeviceReset);
        OnDeviceReset(device, null);
        mesh = Mesh.Box(device, 2, 2, 2);
        material = new Material();
        material.Ambient = Color.Blue;
        material.Diffuse = Color.Blue;
        maus = new DirectInput.Device(DirectInput.SystemGuid.Mouse);
        maus.SetCooperativeLevel(this, DirectInput.CooperativeLevelFlags.Background | DirectInput.CooperativeLevelFlags.NonExclusive);
        maus.Acquire();
    }

    private void OnDeviceReset(object sender, EventArgs e)
    {
        Device device = (Device)sender;
        device.Transform.Projection = Matrix.PerspectiveFovLH((float)Math.PI / 4, (float)Width / Height, 1.0f, 100.0f);
        device.Transform.View = Matrix.LookAtLH(new Vector3(10, 0, 0), new Vector3(0, 0, 0), new Vector3(0, 1, 0));
        device.Lights[0].Type = LightType.Directional;
        device.Lights[0].Diffuse = Color.White;
        device.Lights[0].Direction = new Vector3(1, -1, 1);
        device.Lights[0].Enabled = true;
        device.RenderState.Ambient = Color.FromArgb(0, 200, 200, 200);
        device.RenderState.Lighting = true;
    }

    protected override void OnPaint(PaintEventArgs e)
    {
        mausStatus = maus.CurrentMouseState;
        mausButtons = mausStatus.GetMouseButtons();

        Point desktopMousePosition = Control.MousePosition;
        Point panelMousePosition = panel1.PointToClient(desktopMousePosition);

        bool horizontalIsIn = panelMousePosition.X > 0 && panelMousePosition.X < panel1.Width;
        bool verticalIsIn = panelMousePosition.Y > 0 && panelMousePosition.Y < panel1.Height;

        if (mausButtons[0] != 0 && horizontalIsIn && verticalIsIn)
        {
            rotationX -= 0.01f * mausStatus.X;
        }

        device.Clear(ClearFlags.Target, Color.White, 1.0f, 0);
        device.BeginScene();

        device.Transform.World = Matrix.RotationYawPitchRoll(rotationX, 0, 0);
        device.Material = material;
        mesh.DrawSubset(0);

        device.EndScene();
        device.Present();
        Invalidate();
    }

    static void Main()
    {
        Application.Run(new MainClass());
    }

    private void InitializeComponent()
    {
        this.panel1 = new System.Windows.Forms.Panel();
        this.comboBox1 = new System.Windows.Forms.ComboBox();
        this.comboBox2 = new System.Windows.Forms.ComboBox();
        this.comboBox3 = new System.Windows.Forms.ComboBox();
        this.pictureBox1 = new System.Windows.Forms.PictureBox();
        this.labelMove = new System.Windows.Forms.Label();
        this.labelClose = new System.Windows.Forms.Label();
        ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit();
        this.SuspendLayout();
        //
        // panel1
        //
        this.panel1.Location = new System.Drawing.Point(12, 113);
        this.panel1.Name = "panel1";
        this.panel1.Size = new System.Drawing.Size(616, 465);
        this.panel1.TabIndex = 0;
        //
        // comboBox1
        //
        this.comboBox1.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
        this.comboBox1.FormattingEnabled = true;
        this.comboBox1.Items.AddRange(new object[] {
            "box",
            "teapot"});
        this.comboBox1.Location = new System.Drawing.Point(643, 115);
        this.comboBox1.Name = "comboBox1";
        this.comboBox1.Size = new System.Drawing.Size(121, 21);
        this.comboBox1.TabIndex = 1;
        this.comboBox1.SelectedIndexChanged += new System.EventHandler(this.comboBox1_SelectedIndexChanged);
        //
        // comboBox2
        //
        this.comboBox2.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
        this.comboBox2.FormattingEnabled = true;
        this.comboBox2.Items.AddRange(new object[] {
            "blue",
            "yellow"});
        this.comboBox2.Location = new System.Drawing.Point(643, 163);
        this.comboBox2.Name = "comboBox2";
        this.comboBox2.Size = new System.Drawing.Size(121, 21);
        this.comboBox2.TabIndex = 2;
        this.comboBox2.SelectedIndexChanged += new System.EventHandler(this.comboBox2_SelectedIndexChanged);
        //
        // pictureBox1
        //
        this.pictureBox1.BackColor = System.Drawing.Color.Transparent;
        this.pictureBox1.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch;
        this.pictureBox1.Location = new System.Drawing.Point(13, 12);
        this.pictureBox1.Name = "pictureBox1";
        this.pictureBox1.Size = new System.Drawing.Size(615, 82);
        this.pictureBox1.TabIndex = 4;
        this.pictureBox1.TabStop = false;
        //
        // MainClass
        //
        this.BackColor = System.Drawing.Color.SteelBlue;
        this.ClientSize = new System.Drawing.Size(776, 590);
        this.Controls.Add(this.pictureBox1);
        this.Controls.Add(this.comboBox2);
        this.Controls.Add(this.comboBox1);
        this.Controls.Add(this.panel1);
        this.DoubleBuffered = true;
        this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle;
        this.MaximizeBox = false;
        this.Name = "MainClass";
        this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
        ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).EndInit();
        this.ResumeLayout(false);
        this.PerformLayout();

    }

    private void comboBox1_SelectedIndexChanged(object sender, EventArgs e)
    {
        if (comboBox1.SelectedIndex == 1)
        {
            mesh = Mesh.Teapot(device);
        }

        else
        {
            mesh = Mesh.Box(device, 2, 2, 2);
        }
    }

    private void comboBox2_SelectedIndexChanged(object sender, EventArgs e)
    {
        if (comboBox2.SelectedIndex == 1)
        {
            material.Ambient = Color.Yellow;
            material.Diffuse = Color.Yellow;
        }

        else
        {
            material.Ambient = Color.Blue;
            material.Diffuse = Color.Blue;
        }
    }
}

Hab was probiert...

26.11.2008 - 20:54 Uhr

Hallo,
ich würd sagen du musst den HTML Code auseinandernehmen und den link verfolgen.

mfg.
markus111

26.11.2008 - 20:47 Uhr

intressant...

26.11.2008 - 20:27 Uhr

Hallo rollerfreak2,

welche Exception wird denn ausgelößt?

mfg.
markus111

22.11.2008 - 22:36 Uhr

Moin,
Wie wärs wenn du den richtigen COM-Port auswählst?
mfg.
markus111