Skip to content
Andrey Pepper edited this page Jun 8, 2026 · 2 revisions

Creating Applications

Applications are user-visible processes with windows, buttons, and interaction.

Basic Application

using AVOS.System64.Processing;
using System.Drawing;

public class MyApp : Process
{
    public MyApp()
    {
        Name = "My Application";
        Developer = "YourName";

        Type = ProcessType.Application;

        WindowData = new WindowData
        {
            WinPos = new Rectangle(
                100,
                100,
                500,
                300
            ),

            AllowResize = true,
            MoveAble = true,

            ShowCloseButton = true,
            ShowMinButton = true,
            ShowMaxButton = true
        };
    }

    public override void Run()
    {

    }
}

Starting an Application

ProcessManager.Start(
    new MyApp()
);

Process Types

Applications should use:

Type = ProcessType.Application;

Available process types:

ProcessType.Application
ProcessType.Service

WindowData

WindowData controls window appearance and behavior.

Example:

WindowData = new WindowData
{
    WinPos = new Rectangle(
        100,
        100,
        500,
        300
    ),

    AllowResize = true,
    MoveAble = true,

    ShowCloseButton = true,
    ShowMinButton = true,
    ShowMaxButton = true
};

WinPos

Defines window position and size.

WinPos = new Rectangle(
    X,
    Y,
    Width,
    Height
);

AllowResize

Allows the user to resize the window.

AllowResize = true;

MoveAble

Allows the window to be moved.

MoveAble = true;

ShowCloseButton

Displays the close button.

ShowCloseButton = true;

ShowMinButton

Displays the minimize button.

ShowMinButton = true;

ShowMaxButton

Displays the maximize button.

ShowMaxButton = true;

Showing a Message Box

MessageBox.Show(
    "Hello World!",
    "My Application"
);

Requesting Administrator Privileges (UAC)

UAC.Request(
 new UAC.ElevationRequest(
  this,
  UAC.SecurityLevel.System
)

Example:

if (!IsElevated)
{
    UAC.Request(
        this,
        "Administrator privileges are required."
    );

    return;
}

// Administrator code

Creating Services

Services are background processes that run without a visible window.

Basic Service

using AVOS.System64.Processing;

public class MyService : Process
{
    public MyService()
    {
        Name = "My Service";
        Developer = "YourName";

        Type = ProcessType.Service;

        WindowData = null;
    }

    public override void Run()
    {

    }
}

Starting a Service

ProcessManager.Start(
    new MyService()
);

Windowless Services

Services normally do not create windows.

WindowData = null;

Service Communication

Applications and services can communicate using shared variables or process references.

Shared Data

public static class SharedData
{
    public static string Message =
        "Hello";
}

Reading Data

string text =
    SharedData.Message;

Finding a Service

var service =
    ProcessManager.GetProcess<MyService>();

Calling Methods

service?.Restart();

Example Communication

Service:

public class ClockService : Process
{
    public static string CurrentTime;

    public override void Run()
    {
        CurrentTime =
            DateTime.Now.ToString();
    }
}

Application:

GUI.DrawText(
    ClockService.CurrentTime,
    Color.White,
    10,
    10
);