-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
291c33b
commit f15481f
Showing
3 changed files
with
124 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
# Narod's Game Detector | ||
A .NET library written in VB.NET to detect full screen applications and games. | ||
|
||
## Summary | ||
Searches for on-screen fullscreen windows on the currently focussed screen. Will return a List(Of Object). | ||
|
||
## Usage (V2) | ||
V1 has been replaced by V2. If you're using 2.0.0 or newer, please [take a look here for instructions.](https://github.com/NarodGaming/gamedetector/blob/main/README.md) | ||
|
||
## Usage (V1) | ||
Code examples in VB.NET | ||
- Download the 1.2.0 release from the releases tab, or find in the NuGet package manager ([Narod.FullscreenDetector](https://www.nuget.org/packages/Narod.FullscreenDetector)) | ||
- (Only required if downloaded from releases) Add a reference of the library in your project. (Project -> Add Reference... -> Browse -> Browse...) | ||
- Import in to your program | ||
```vb.net | ||
Imports FullScreenDetection | ||
``` | ||
- Create instance of FullscreenDetecter | ||
```vb.net | ||
Dim FullscreenDetectClient as New FullscreenDetecter | ||
``` | ||
- Call with either the DetectFullscreenApplication function, or DetectGameFullscreen. | ||
```vb.net | ||
Dim detectionappresponse As List(Of Object) = FullscreenDetectClient.DetectFullscreenApplication() | ||
Dim detectiongameresponse As List(Of Object) = FullscreenDetectClient.DetectGameFullscreen() | ||
Dim customappresponse As List(Of Object) = FullscreenDetectClient.DetectCustomFullscreen("(partial/complete)-window-title-of-application-here") | ||
``` | ||
|
||
Both functions will return the a list of objects: | ||
* Position 0 is a boolean, which will be True if it successfully detected something, or False if not. | ||
* Position 1 is a string, with the window text of the program detected (if detected, otherwise no item added) | ||
* Position 2 is a UInteger, with the process PID of the program detected (if detected, otherwise no item added) | ||
|
||
DetectFullscreenApplication will return any full screen application. | ||
DetectGameFullscreen will filter out select programs that checks are in place for (e.g. web browsers). | ||
|
||
## Further Help | ||
Please see my video here: https://www.youtube.com/watch?v=BfuTOI5MK0A | ||
|
||
## Helping | ||
I'm not accepting updates or issues for V1. | ||
|
||
You'll need to update to V2, please [take a look here for how to migrate.](https://github.com/NarodGaming/gamedetector/blob/main/v1-to-v2.md) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
# V1 to V2 | ||
Here's a list of the important changes from V1 to V2 to help you migrate. | ||
|
||
All code examples are in VB.NET | ||
|
||
## Namespace change | ||
|
||
In V1, you used to import: | ||
```vb.net | ||
Imports FullScreenDetection | ||
``` | ||
|
||
In V2, you now import: | ||
```vb.net | ||
Imports Narod.FullscreenDetection | ||
``` | ||
|
||
## Object name change | ||
|
||
In V1, you used to create an object instance like: | ||
```vb.net | ||
Dim FullscreenDetectClient as New FullscreenDetecter | ||
``` | ||
|
||
In V2, you now create an object instance like: | ||
```vb.net | ||
Dim FullscreenDetectClient As New FullscreenDetector | ||
``` | ||
|
||
## Change from 2D list to clean getters | ||
|
||
In V1, you got an output from the function directly like: | ||
```vb.net | ||
Dim detectionappresponse As List(Of Object) = FullscreenDetectClient.DetectFullscreenApplication() | ||
``` | ||
|
||
In V2, you now get an output like: | ||
```vb.net | ||
FullscreenDetectClient.DetectFullscreenApplication() | ||
|
||
Dim hasDetectedFullscreenApplication as Boolean = FullscreenDetectClient.GetHasDetected() | ||
Dim programNameDetected As String = FullscreenDetectClient.GetProgramDetected() // throws nullreferenceexception if GetHasDetected is False | ||
Dim processIDDetected As UInteger = FullscreenDetectClient.GetProcessIDDetected() // throws nullreferenceexception if GetHasDetected is False | ||
``` | ||
|
||
## Removal of functions | ||
|
||
In V1, you could use any of the following functions: | ||
```vb.net | ||
Dim detectionappresponse As List(Of Object) = FullscreenDetectClient.DetectFullscreenApplication() | ||
Dim detectiongameresponse As List(Of Object) = FullscreenDetectClient.DetectGameFullscreen() | ||
Dim customappresponse As List(Of Object) = FullscreenDetectClient.DetectCustomFullscreen("(partial/complete)-window-title-of-application-here") | ||
``` | ||
|
||
In V2, you can now only use the following function: | ||
```vb.net | ||
FullScreenDetectClient.DetectFullscreenApplication() | ||
``` | ||
|
||
You should instead check the program title yourself within your own program to see if it's what you are looking for. This way you don't even need to store it locally, should you wish: | ||
```vb.net | ||
If (FullScreenDetectClient.GetProgramDetected() = "Google Chrome") Then | ||
Console.WriteLine("Google Chrome detected!") | ||
End If | ||
``` |