content top

Static Class

Static Class

    About Static Class   Static class is mainly used for creating and managing static controls.   Static Class Methods   Static.Create( long ParentHandle, long X, long Y, long Width, long Height, long Style, long ExStyle ) creates a static control. If the function succeeds, the return value is a handle to the new control. If the function fails, the return value is 0. long ParentHandle: a handle to the parent or owner control of the control being created. long X: x coordinate. You can also use CW_USEDEFAULT constant for this argument. long Y: y coordinate. You can also use CW_USEDEFAULT constant for this argument. long Width: width. You can also use CW_USEDEFAULT constant for this argument. long Height: height. You can also use CW_USEDEFAULT constant for this argument. long Style: the style of the control being created. This parameter can be a combination of the window styles and static control styles. long ExStyle: the extended style of the control being created. This parameter can be a combination of the extended window styles.   Static.Exists( long StaticHandle ) returns true if the specified control was created with Static.Create() method and not destroyed yet or false otherwise. Note that all child controls are destroyed when parent control is destroyed. You can also call Control.Destroy() method for destroying a specific control with all of its children. long StaticHandle: static control handle.   Static.Count() returns the total number of controls created with Static.Create() method and not destroyed yet. Note that all child controls are destroyed when parent control is destroyed. You can also call Control.Destroy() method for destroying a specific control with all of its children.   Static.GetHandleByIndex( ulong StaticIndex ) returns the handle from an index if the specified control was created with Static.Create() method and not destroyed yet or 0 otherwise. Note that all child controls are destroyed when parent control is destroyed. You can also call Control.Destroy() method for destroying a specific control with all of its children. StaticIndex parameter should be less or equal to Static.Count()-1. ulong StaticIndex: zero-based index of the static control.   Static.SetBitmap( long StaticHandle, long BitmapHandle ) associates a new bitmap with a static control. The return value is a handle to the image previously associated with the static control, if any; otherwise, it is 0. (This method only works on static controls with SS_BITMAP style) long StaticHandle: static control handle. long BitmapHandle: bitmap handle.   Static.GetBitmap( long StaticHandle ) returns a handle to the bitmap associated with a static control. (This method only works on static controls with SS_BITMAP style) long StaticHandle: static control handle.   Static.SetCursor( long StaticHandle, long CursorHandle ) associates a new cursor with...

Read More

ComboBox Class

ComboBox  Class

    About ComboBox Class   ComboBox class is mainly used for creating and managing combo boxes.   ComboBox Class Methods   ComboBox.Create( long ParentHandle, long X, long Y, long Width, long Height, long Style, long ExStyle ) creates a combo box. If the function succeeds, the return value is a handle to the new control. If the function fails, the return value is 0. long ParentHandle: a handle to the parent or owner control of the control being created. long X: x coordinate. You can also use CW_USEDEFAULT constant for this argument. long Y: y coordinate. You can also use CW_USEDEFAULT constant for this argument. long Width: width. You can also use CW_USEDEFAULT constant for this argument. long Height: height. You can also use CW_USEDEFAULT constant for this argument. long Style: the style of the control being created. This parameter can be a combination of the window styles and combo box styles. long ExStyle: the extended style of the control being created. This parameter can be a combination of the extended window styles.   ComboBox.Exists( long ComboBoxHandle ) returns true if the specified control was created with ComboBox.Create() method and not destroyed yet or false otherwise. Note that all child controls are destroyed when parent control is destroyed. You can also call Control.Destroy() method for destroying a specific control with all of its children. long ComboBoxHandle: combo box handle.   ComboBox.Count() returns the total number of controls created with ComboBox.Create() method and not destroyed yet. Note that all child controls are destroyed when parent control is destroyed. You can also call Control.Destroy() method for destroying a specific control with all of its children.   ComboBox.GetHandleByIndex( ulong ComboBoxIndex ) returns the handle from an index if the specified control was created with ComboBox.Create() method and not destroyed yet or 0 otherwise. Note that all child controls are destroyed when parent control is destroyed. You can also call Control.Destroy() method for destroying a specific control with all of its children. ComboBoxIndex parameter should be less or equal to ComboBox.Count()-1. ulong ComboBoxIndex: zero-based index of the combo box.   ComboBox.AddItem( long ComboBoxHandle, long ItemIndex, string ItemText ) adds a string to a list in a combo box at the specified location. The return value is the zero-based index of the string in the list. If an error occurs, the return value is CB_ERR. If there is insufficient space to store the new string, the return value is CB_ERRSPACE. long ComboBoxHandle: combo box handle. long ItemIndex: zero-based index of the item or –1 to add it to the end of the list. string ItemText: item text.   ComboBox.GetItem( long ComboBoxHandle, long ItemIndex ) returns a string from...

Read More

Color24 Class

Color24 Class

  About Color24 Class   Color24 class is mainly used for creating and managing 24-bit colors.   Color24 Class Methods   Color24.RGB( byte R, byte G, byte B ) returns a 24-bit color from RGB values. byte R: red component (0-255). byte G: green component (0-255). byte B: blue component (0-255).   Color24.R( long Color ) returns the red component from a 24-bit color. long Color: 24-bit color.   Color24.G( long Color ) returns the green component from a 24-bit color. long Color: 24-bit color.   Color24.B( long Color ) returns the blue component from a 24-bit color. long Color: 24-bit color.   Code Example using System.Collections; using System.Collections.Generic; using UnityEngine; using Giavapps.Windows.API; public class CodeExample : MonoBehaviour { private long WindowHandle = 0; private long ProgressBarHandle = 0; void Start() { Plugin.Initialize();//Initializes Giavapps Windows API WindowHandle = Window.Create(0, 100, 100, 400, 400, Constant.WS_VISIBLE | Constant.WS_SYSMENU | Constant.WS_MINIMIZEBOX | Constant.WS_MAXIMIZEBOX | Constant.WS_SIZEBOX, Constant.WS_EX_TOPMOST);//Creates a new window Control.SetText(WindowHandle, "Giavapps Windows API");//Sets a new title for the specified window ProgressBarHandle = ProgressBar.Create(WindowHandle, 10, 10, 150, 32, Constant.WS_VISIBLE | Constant.WS_CHILD, 0);//Creates a new progress bar ProgressBar.SetPosition(ProgressBarHandle, 40);//Sets a new position for the specified progress bar ProgressBar.SetColorBar(ProgressBarHandle, Color24.RGB(255, 0, 0));//Sets a new color for the specified progress bar ProgressBar.SetColorBackground(ProgressBarHandle, Constant.CLR_DEFAULT);//Sets a new background color for the specified progress bar } void Update() { //Checks if the specified window has been closed if(Window.GetClosed(WindowHandle)) { Control.Destroy(WindowHandle);//Destroys the specified window } } void OnApplicationQuit() { Plugin.Deinitialize();//Deinitializes Giavapps Windows API } }   I am Luigi Piscopo, also known as DJ GiDeejay / Producer / Remixer in the music world. I am a Producer with a lot of experience in photo editing, video editing, audio editing, graphic design, web design, programming and...

Read More

Shell Class

Shell Class

  About Shell Class   Shell class is mainly used for executing shell commands.   Shell Class Methods   Shell.Command( string FileName, string Parameters, long Show ) performs an operation on a specified file. string FileName: specifies the file or object on which to execute the command. string Parameters: the parameters to be passed to the application. long Show: controls how an application is to be displayed when it is opened. Show can be one of the following constants. SW_FORCEMINIMIZE Minimizes a control, even if the thread that owns the control is not responding. This flag should only be used when minimizing controls from a different thread. SW_HIDE Hides the control or window and activates another control. SW_MAXIMIZE Maximizes the specified control. SW_MINIMIZE Minimizes the specified control and activates the next top-level control in the Z order. SW_RESTORE Activates and displays the control. If the control is minimized or maximized, the system restores it to its original size and position. An application should specify this flag when restoring a minimized control. SW_SHOW Activates the control and displays it in its current size and position. SW_SHOWDEFAULT Sets the show state based on the program that started the application. SW_SHOWMAXIMIZED Activates the control and displays it as a maximized control. SW_SHOWMINIMIZED Activates the control and displays it as a minimized control. SW_SHOWMINNOACTIVE Displays the control as a minimized control. This value is similar to SW_SHOWMINIMIZED, except the control is not activated. SW_SHOWNA Displays the control in its current state. The active control remains active. SW_SHOWNOACTIVATE Displays a control in its most recent size and position. The active control remains active. SW_SHOWNORMAL Activates and displays a control. If the control is minimized or maximized, the system restores it to its original size and position. An application should specify this flag when displaying the control for the first time.   Code Example using System.Collections; using System.Collections.Generic; using UnityEngine; using Giavapps.Windows.API; public class CodeExample : MonoBehaviour { private string FileName = "explorer.exe"; private string Parameters = "/select,\"C:\\Windows\\explorer.exe\""; private long Show = Constant.SW_SHOWNORMAL; void Start() { Plugin.Initialize();//Initializes Giavapps Windows API } void Update() { //Checks if the specified keyboard key has been pressed if(Input.GetKeyDown(KeyCode.Space)) { Shell.Command(FileName, Parameters, Show);//Executes a shell command } } void OnApplicationQuit() { Plugin.Deinitialize();//Deinitializes Giavapps Windows API } }   I am Luigi Piscopo, also known as DJ GiDeejay / Producer / Remixer in the music world. I am a Producer with a lot of experience in photo editing, video editing, audio editing, graphic design, web design, programming and...

Read More

Process Class

Process Class

  About Process Class   Process class is mainly used to retrieve info about running processes.   Process Class Methods   Process.Exists( string ProcessName ) returns true if the specified process exists or false otherwise. string ProcessName: process name.   Process.Count( string ProcessName ) returns the total number of processes running with the given name. string ProcessName: process name.   Code Example using System.Collections; using System.Collections.Generic; using UnityEngine; using Giavapps.Windows.API; public class CodeExample : MonoBehaviour { private string ProcessName = "notepad.exe"; void Start() { Plugin.Initialize();//Initializes Giavapps Windows API } void Update() { //Checks if the specified input has been pressed if(Input.GetKeyDown(KeyCode.Space)) { Debug.Log("PROCESS EXISTS: "+Process.Exists(ProcessName).ToString()); Debug.Log("PROCESS COUNT: "+Process.Count(ProcessName).ToString()); } } void OnApplicationQuit() { Plugin.Deinitialize();//Deinitializes Giavapps Windows API } }   I am Luigi Piscopo, also known as DJ GiDeejay / Producer / Remixer in the music world. I am a Producer with a lot of experience in photo editing, video editing, audio editing, graphic design, web design, programming and...

Read More

Mouse Class

Mouse Class

  About Mouse Class   Mouse class is mainly used for managing mouse inputs for specific windows. Note that you must still use Input class for managing inputs for Unity window.   Mouse Class Methods   Mouse.Clear( long WindowHandle ) clears all mouse states for the given window. long WindowHandle: window handle.   Mouse.GetButton( long WindowHandle, long Button ) returns true if the specified button is held down or false otherwise. long WindowHandle: window handle. long Button: this parameter can be 0 for left button, 1 for right button, 2 for the middle button.   Mouse.SetButtonDown( long WindowHandle, long Button ) simulates a button press. long WindowHandle: window handle. long Button: this parameter can be 0 for left button, 1 for right button, 2 for the middle button.   Mouse.GetButtonDown( long WindowHandle, long Button ) returns true when the user starts pressing down the specified button or false otherwise. long WindowHandle: window handle. long Button: this parameter can be 0 for left button, 1 for right button, 2 for the middle button.   Mouse.SetButtonUp( long WindowHandle, long Button ) simulates a button release. long WindowHandle: window handle. long Button: this parameter can be 0 for left button, 1 for right button, 2 for the middle button.   Mouse.GetButtonUp( long WindowHandle, long Button ) returns true when the user releases the specified button or false otherwise. long WindowHandle: window handle. long Button: this parameter can be 0 for left button, 1 for right button, 2 for the middle button.   Mouse.SetButtonDoubleClicked( long WindowHandle, long Button ) simulates a double button click. long WindowHandle: window handle. long Button: this parameter can be 0 for left button, 1 for right button, 2 for the middle button.   Mouse.GetButtonDoubleClicked( long WindowHandle, long Button ) returns true when the user double clicks the specified button or false otherwise. long WindowHandle: window handle. long Button: this parameter can be 0 for left button, 1 for right button, 2 for the middle button.   Mouse.SetWheelUp( long WindowHandle ) simulates the rotation of the mouse wheel upwards. long WindowHandle: window handle.   Mouse.GetWheelUp( long WindowHandle ) returns true when the user rotates the mouse wheel upwards or false otherwise. long WindowHandle: window handle.   Mouse.SetWheelDown( long WindowHandle ) simulates the rotation of the mouse wheel downwards. long WindowHandle: window handle.   Mouse.GetWheelDown( long WindowHandle ) returns true when the user rotates the mouse wheel downwards or false otherwise. long WindowHandle: window handle.   Code Example using System.Collections; using System.Collections.Generic; using UnityEngine; using Giavapps.Windows.API; public class CodeExample : MonoBehaviour { private long WindowHandle = 0; void Start() { Plugin.Initialize();//Initializes Giavapps Windows API WindowHandle = Window.Create(0, 100, 100, 400, 400, Constant.WS_VISIBLE | Constant.WS_SYSMENU |...

Read More
content top