I have a problem in this that i want to paas a form in a case that when user pres n then it must go to a form but error arises and not working good and threading is not responding

made in cosmos help please need it
using System;
using Cosmos.Compiler.Builder;
using System.Threading;
using System.Windows.Forms;
namespace IUOS
    class Program
        #region Cosmos Builder logic
        // Most users wont touch this. This will call the Cosmos Build tool
        [STAThread]
        static void Main(string[] args)
            BuildUI.Run();
        #endregion
        // Main entry point of the kernel
        public static void Init()
            var xBoot = new Cosmos.Sys.Boot();
            xBoot.Execute();
            Console.ForegroundColor = ConsoleColor.DarkBlue;
            a:
            Console.WriteLine("------------------------------");
            Console.WriteLine("WELCOME TO THE NEWLY OS MADE BY THE STUDENTS OF IQRA UNIVERSITY!");
            Console.WriteLine("------------------------------");
            Console.WriteLine();
            Console.WriteLine();
            Console.WriteLine();
            Console.WriteLine("\t _____                                
            Console.WriteLine("\t|     |        |            |        
|            |      |");
            Console.WriteLine("\t|     |        |            |        
|            |      |");
            Console.WriteLine("\t|     |        |            |        
|            |      |");
            Console.WriteLine("\t|     |        |            |        
|            |      |___________");
            Console.WriteLine("\t|     |        |            |        
|            |                  |");
            Console.WriteLine("\t|     |        |            |        
|            |                  |");
            Console.WriteLine("\t|     |        |            |        
|            |                  |");
            Console.WriteLine("\t|     |        |            |        
|            |                  |");
            Console.WriteLine("\t|     |        |            |        
|            |                  |");
            Console.WriteLine("\t|_____|        |____________|         |____________|      ____________");
            string input;
            Console.WriteLine();
            Console.Write("\nAbout OS     : a");
            Console.Write("\nTo Shutdown  : s");
            Console.Write("\nTo Reboot    : r");
            Console.Write("\nStart Windows Normaly : n");
            Console.WriteLine();
            input = Console.ReadLine();
            if (input == "s" || input == "S"){
                Cosmos.Sys.Deboot.ShutDown();
            else
            if (input == "r" || input == "R"){
                Cosmos.Sys.Deboot.Reboot();
            else
            if (input == "a" || input == "A"){
                Console.ForegroundColor = ConsoleColor.DarkBlue;
                Console.Clear();
                Console.WriteLine("\n\n\n-------------------------------------");
                Console.WriteLine("version: DISPLAYS OS VERSION");
                Console.WriteLine("about: DISPLAYS INFO ABOUT ANGRY OS");
                Console.WriteLine("hello or hi: DISPLAYS A HELLO WORLD");
                Console.WriteLine("MESSAGE THAT WAS USED TO TEST THIS OS!!");
                Console.WriteLine("-----------------------------------");
                Console.Write("You Want to know : ");
                input = Console.ReadLine();
                if (input == "version"){
                    Console.WriteLine("--------------------");
                    Console.WriteLine("OS VERSION 0.1");
                    Console.WriteLine("--------------------");
                else
                if (input == "about"){
                    Console.WriteLine("--------------------------------------------");
                    Console.WriteLine("OS IS DEVELOPED BY Qazi Jalil-ur-Rahman & Syed Akber Abbas Jafri");
                    Console.WriteLine("--------------------------------------------");
                Console.Write("Want to go back to the main window");
                Console.Write("\nYes : ");
                string ans = Console.ReadLine();
                if (ans == "y" || ans == "Y")
                    goto a;
                    Thread.Sleep(10000);
                else
                if (input == "n" || input == "N")
                    Thread.Sleep(5000);
                    Console.Clear();
                    for (int i = 0; i <= 0; i++){
                        Console.Write("\n\n\n\n\t\t\t\t\t  ____        ____   ___  
                        Console.Write("\n\t\t|\t\t |  |      |    |     
|   |  | |  |  |");
                        Console.Write("\n\t\t|\t|    |  |----  |    |     
|   |  | |  |  |---");
                        Console.Write("\n\t\t|____|____|  |____  |___ |____  |___|  |    |  |___");
                        Thread.Sleep(500);
                    Thread.Sleep(5000);
                    Console.Clear();
                    BootUserInterface();
                    Console.ReadLine();
//                    Form1 fo = new Form1();
                else{
                    for (int i = 0; i <= 5; i++){
                        Console.Beep();
                        Thread.Sleep(1000);
                        goto a;
            while (true);
        private static void BootUserInterface() {
            Thread t = new Thread(UserInterfaceThread);
            t.IsBackground = true;
            t.SetApartmentState(ApartmentState.STA);
            t.Start();
        private static void UserInterfaceThread(object arg) {
            Form1 frm = new Form1();  // use your own
            Application.Run(frm);
 

Hi
Jalil Cracker,
>>when user pres n then it must go to a form but error arises and not working good and threading is not respondin
Could you post the error information? And which line caused this error?
If you want to show Form1, you can use form.show() method
Form1 frm = new Form1();
frm.Show();
In addition, Cosmos is an acronym for C# Open Source Managed Operating System. This is not Microsoft product.If the issue is related to Cosmos, it would be out of our support. Thanks for your understanding. And you need raise an issue at Cosmos site.
Best regards,
kristin
We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
Click
HERE to participate the survey.

Similar Messages

Maybe you are looking for

  • Error loading *.bin file

    i have a certain requirement like if plugin1 is down plugin2 has to be called, both plugin1 and plugin2 uses same 3rd party api for plugin implementation.But when my plugin1 is down i am getting error with plugin2 like      "Error loading resource fi

  • Variable of Bean Value to be used in many pages.

    Hi all, My situation is as follow: I have a page PG1 and when it is rendered I'd like to keep a value in something that I could use in PG2 that calls the PG3 and so on. I tried to use session values with pageContext.putSessionValueDirect("vSession",s

  • Empty file after replace

    Hello I am facing a very strange problem saving files. Find attached a quick example showing the issue. The first time I hit "save" and choose a name for the file (numbers.txt, for example), everything works great and the file is created with my data

  • Sql Developer not connecting to Oracle 11g

    hi all i have windows 7 ultimate 64bit Oracle 11g 64bit Sql Developer 3 on same machine i have created Tow Database on 11g : ORCL ORCL2 when it was ORCL only everything was Okay but recently i have created another database ORACL2 then it stop connect

  • VBOX table update while creation of invoice via VF01

    Hi Experts, I am creating a credit memo through VF01. I want to know the code location where the VBOX table is getting updated during this procedure. Actually the region for my credit memo is 'ON' . But in VBOX table , varaible key field , it is ente