diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..1ff0c42 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,63 @@ +############################################################################### +# Set default behavior to automatically normalize line endings. +############################################################################### +* text=auto + +############################################################################### +# Set default behavior for command prompt diff. +# +# This is need for earlier builds of msysgit that does not have it on by +# default for csharp files. +# Note: This is only used by command line +############################################################################### +#*.cs diff=csharp + +############################################################################### +# Set the merge driver for project and solution files +# +# Merging from the command prompt will add diff markers to the files if there +# are conflicts (Merging from VS is not affected by the settings below, in VS +# the diff markers are never inserted). Diff markers may cause the following +# file extensions to fail to load in VS. An alternative would be to treat +# these files as binary and thus will always conflict and require user +# intervention with every merge. To do so, just uncomment the entries below +############################################################################### +#*.sln merge=binary +#*.csproj merge=binary +#*.vbproj merge=binary +#*.vcxproj merge=binary +#*.vcproj merge=binary +#*.dbproj merge=binary +#*.fsproj merge=binary +#*.lsproj merge=binary +#*.wixproj merge=binary +#*.modelproj merge=binary +#*.sqlproj merge=binary +#*.wwaproj merge=binary + +############################################################################### +# behavior for image files +# +# image files are treated as binary by default. +############################################################################### +#*.jpg binary +#*.png binary +#*.gif binary + +############################################################################### +# diff behavior for common document formats +# +# Convert binary document formats to text before diffing them. This feature +# is only available from the command line. Turn it on by uncommenting the +# entries below. +############################################################################### +#*.doc diff=astextplain +#*.DOC diff=astextplain +#*.docx diff=astextplain +#*.DOCX diff=astextplain +#*.dot diff=astextplain +#*.DOT diff=astextplain +#*.pdf diff=astextplain +#*.PDF diff=astextplain +#*.rtf diff=astextplain +#*.RTF diff=astextplain diff --git a/GoogleGameThing.sln b/GoogleGameThing.sln new file mode 100644 index 0000000..d0075e0 --- /dev/null +++ b/GoogleGameThing.sln @@ -0,0 +1,22 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio 14 +VisualStudioVersion = 14.0.25123.0 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "GoogleGameThing", "GoogleGameThing\GoogleGameThing.vbproj", "{E8891FA6-F0A6-4CD0-A7F5-70E384401321}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {E8891FA6-F0A6-4CD0-A7F5-70E384401321}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {E8891FA6-F0A6-4CD0-A7F5-70E384401321}.Debug|Any CPU.Build.0 = Debug|Any CPU + {E8891FA6-F0A6-4CD0-A7F5-70E384401321}.Release|Any CPU.ActiveCfg = Release|Any CPU + {E8891FA6-F0A6-4CD0-A7F5-70E384401321}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/GoogleGameThing/App.config b/GoogleGameThing/App.config new file mode 100644 index 0000000..5534e28 --- /dev/null +++ b/GoogleGameThing/App.config @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/GoogleGameThing/AppIcon.ico b/GoogleGameThing/AppIcon.ico new file mode 100644 index 0000000..ead2122 Binary files /dev/null and b/GoogleGameThing/AppIcon.ico differ diff --git a/GoogleGameThing/FrmCapture.Designer.vb b/GoogleGameThing/FrmCapture.Designer.vb new file mode 100644 index 0000000..5317d6a --- /dev/null +++ b/GoogleGameThing/FrmCapture.Designer.vb @@ -0,0 +1,87 @@ + _ +Partial Class FrmCapture + Inherits System.Windows.Forms.Form + + 'Form overrides dispose to clean up the component list. + _ + Protected Overrides Sub Dispose(ByVal disposing As Boolean) + Try + If disposing AndAlso components IsNot Nothing Then + components.Dispose() + End If + Finally + MyBase.Dispose(disposing) + End Try + End Sub + + 'Required by the Windows Form Designer + Private components As System.ComponentModel.IContainer + + 'NOTE: The following procedure is required by the Windows Form Designer + 'It can be modified using the Windows Form Designer. + 'Do not modify it using the code editor. + _ + Private Sub InitializeComponent() + Me.Label1 = New System.Windows.Forms.Label() + Me.Label2 = New System.Windows.Forms.Label() + Me.Label3 = New System.Windows.Forms.Label() + Me.LblKeySet = New System.Windows.Forms.Label() + Me.SuspendLayout() + ' + 'Label1 + ' + Me.Label1.AutoSize = True + Me.Label1.Location = New System.Drawing.Point(12, 9) + Me.Label1.Name = "Label1" + Me.Label1.Size = New System.Drawing.Size(231, 13) + Me.Label1.TabIndex = 0 + Me.Label1.Text = "Click to START Capture, and RELEASE to End" + ' + 'Label2 + ' + Me.Label2.AutoSize = True + Me.Label2.Location = New System.Drawing.Point(293, 391) + Me.Label2.Name = "Label2" + Me.Label2.Size = New System.Drawing.Size(112, 13) + Me.Label2.TabIndex = 1 + Me.Label2.Text = "Press Escape to Save" + ' + 'Label3 + ' + Me.Label3.AutoSize = True + Me.Label3.Location = New System.Drawing.Point(12, 391) + Me.Label3.Name = "Label3" + Me.Label3.Size = New System.Drawing.Size(60, 13) + Me.Label3.TabIndex = 2 + Me.Label3.Text = "Key set to: " + ' + 'LblKeySet + ' + Me.LblKeySet.AutoSize = True + Me.LblKeySet.Location = New System.Drawing.Point(78, 391) + Me.LblKeySet.Name = "LblKeySet" + Me.LblKeySet.Size = New System.Drawing.Size(0, 13) + Me.LblKeySet.TabIndex = 3 + ' + 'FrmCapture + ' + Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!) + Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font + Me.ClientSize = New System.Drawing.Size(417, 413) + Me.Controls.Add(Me.LblKeySet) + Me.Controls.Add(Me.Label3) + Me.Controls.Add(Me.Label2) + Me.Controls.Add(Me.Label1) + Me.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedToolWindow + Me.Name = "FrmCapture" + Me.Text = "Capturing Input" + Me.ResumeLayout(False) + Me.PerformLayout() + + End Sub + + Friend WithEvents Label1 As Label + Friend WithEvents Label2 As Label + Friend WithEvents Label3 As Label + Friend WithEvents LblKeySet As Label +End Class diff --git a/GoogleGameThing/FrmCapture.resx b/GoogleGameThing/FrmCapture.resx new file mode 100644 index 0000000..1af7de1 --- /dev/null +++ b/GoogleGameThing/FrmCapture.resx @@ -0,0 +1,120 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + \ No newline at end of file diff --git a/GoogleGameThing/FrmCapture.vb b/GoogleGameThing/FrmCapture.vb new file mode 100644 index 0000000..fcaab85 --- /dev/null +++ b/GoogleGameThing/FrmCapture.vb @@ -0,0 +1,56 @@ +Public Class FrmCapture + Private _currentActionPointsList As New List(Of Tuple(Of Integer, Integer))() 'List array of x/y points for the current mouse action being created + Private _lastActionPoint As Tuple(Of Integer, Integer) 'The last x/y point that was taken + Private _penColor As New Pen(Color.Black, 2) 'Default pen color for the graphics drawing to use + Private _graphics As Drawing.Graphics 'Loading the graphics interface + Private _selectedKey As Char 'The selected key character for this command + Private _offsetX As Integer 'The mouse offset for X so that we can reset the actions x/y to 0 later + Private _offsetY As Integer 'The mouse offset for Y so that we can reset the actions x/y to 0 later + + Private Sub FrmCapture_Load(sender As Object, e As EventArgs) Handles MyBase.Load + _graphics = Me.CreateGraphics() + _selectedKey = Nothing + _offsetX = 0 + _offsetY = 0 + End Sub + + Private Sub FrmCapture_MouseDown(sender As Object, e As MouseEventArgs) Handles Me.MouseDown 'Method to clear the current action if the user tries to redraw it + _currentActionPointsList.Clear() + _graphics.Clear(FrmCapture.DefaultBackColor) + End Sub + + Private Sub FrmCapture_Closed(sender As Object, e As EventArgs) Handles Me.Closed + If _selectedKey <> Nothing Then 'Check if the user has selected a key to use for the action otherwise just close the form with no save + Dim name As String = InputBox("Please give this action a name", "Name?", "No Name") 'Ask the user to select a name + If name.Trim = "" Then + name = "No Name" + End If + 'Add the action to the actions list on the main form + FrmMain.ChkActions.Items.Add(name & " | " & _selectedKey) + FrmMain.mouseActionList.Add(_selectedKey, _currentActionPointsList) + End If + End Sub + + Private Sub FrmCapture_KeyDown(sender As Object, e As KeyEventArgs) Handles Me.KeyDown 'Method to listen for a keypress to set the actions key value + If e.KeyCode = Keys.Escape Then 'If escape is hit then close the form + Me.Close() + ElseIf Char.IsLetter(Chr(e.KeyValue)) Or Char.IsNumber(Chr(e.KeyValue)) Then 'Check if its a letter or number input + _selectedKey = Chr(e.KeyValue) + LblKeySet.Text = Chr(e.KeyValue) + End If + End Sub + + Private Sub FrmCapture_MouseMove(sender As Object, e As MouseEventArgs) Handles Me.MouseMove 'Method to listen for mouse movements and to draw the action when the left button is clicked + If e.Button = Windows.Forms.MouseButtons.Left Then 'Wait for the left button to be held down + If _currentActionPointsList.Count > 0 Then 'If the action has already started recording then draw the connecting line + _graphics.DrawLine(_penColor, (_lastActionPoint.Item1 - Me.Location.X), (_lastActionPoint.Item2 - Me.Location.Y), (Cursor.Position.X - Me.Location.X), (Cursor.Position.Y - Me.Location.Y)) + Else 'Otherwise set the initial offset values so that we can reset them to 0 and make them relative + _offsetX = Cursor.Position.X + _offsetY = Cursor.Position.Y + End If + 'Add the current X and Y to the list and set the "last" value + _currentActionPointsList.Add(Tuple.Create(Cursor.Position.X - _offsetX, Cursor.Position.Y - _offsetY)) + _lastActionPoint = Tuple.Create(Cursor.Position.X, Cursor.Position.Y) + End If + End Sub +End Class \ No newline at end of file diff --git a/GoogleGameThing/FrmMain.Designer.vb b/GoogleGameThing/FrmMain.Designer.vb new file mode 100644 index 0000000..c8a4721 --- /dev/null +++ b/GoogleGameThing/FrmMain.Designer.vb @@ -0,0 +1,179 @@ + +Partial Class FrmMain + Inherits System.Windows.Forms.Form + + 'Form overrides dispose to clean up the component list. + + Protected Overrides Sub Dispose(ByVal disposing As Boolean) + Try + If disposing AndAlso components IsNot Nothing Then + components.Dispose() + End If + Finally + MyBase.Dispose(disposing) + End Try + End Sub + + 'Required by the Windows Form Designer + Private components As System.ComponentModel.IContainer + + 'NOTE: The following procedure is required by the Windows Form Designer + 'It can be modified using the Windows Form Designer. + 'Do not modify it using the code editor. + + Private Sub InitializeComponent() + Me.components = New System.ComponentModel.Container() + Me.GroupBox1 = New System.Windows.Forms.GroupBox() + Me.CmdPos = New System.Windows.Forms.Button() + Me.lblMousePos = New System.Windows.Forms.Label() + Me.LblLastInput = New System.Windows.Forms.Label() + Me.Label1 = New System.Windows.Forms.Label() + Me.ChkActions = New System.Windows.Forms.ListBox() + Me.CmdExit = New System.Windows.Forms.Button() + Me.CmdRemSel = New System.Windows.Forms.Button() + Me.CmdRecAct = New System.Windows.Forms.Button() + Me.PlayTime = New System.Windows.Forms.Timer(Me.components) + Me.PosSel = New System.Windows.Forms.Timer(Me.components) + Me.TxtCap = New System.Windows.Forms.TextBox() + Me.GroupBox1.SuspendLayout() + Me.SuspendLayout() + ' + 'GroupBox1 + ' + Me.GroupBox1.Anchor = CType((((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Bottom) _ + Or System.Windows.Forms.AnchorStyles.Left) _ + Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles) + Me.GroupBox1.Controls.Add(Me.TxtCap) + Me.GroupBox1.Controls.Add(Me.CmdPos) + Me.GroupBox1.Controls.Add(Me.lblMousePos) + Me.GroupBox1.Controls.Add(Me.LblLastInput) + Me.GroupBox1.Controls.Add(Me.Label1) + Me.GroupBox1.Controls.Add(Me.ChkActions) + Me.GroupBox1.Controls.Add(Me.CmdExit) + Me.GroupBox1.Controls.Add(Me.CmdRemSel) + Me.GroupBox1.Controls.Add(Me.CmdRecAct) + Me.GroupBox1.Location = New System.Drawing.Point(12, 12) + Me.GroupBox1.Name = "GroupBox1" + Me.GroupBox1.Size = New System.Drawing.Size(235, 578) + Me.GroupBox1.TabIndex = 1 + Me.GroupBox1.TabStop = False + Me.GroupBox1.Text = "Tools" + ' + 'CmdPos + ' + Me.CmdPos.Location = New System.Drawing.Point(3, 464) + Me.CmdPos.Name = "CmdPos" + Me.CmdPos.Size = New System.Drawing.Size(75, 23) + Me.CmdPos.TabIndex = 11 + Me.CmdPos.Text = "Set Pos" + Me.CmdPos.UseVisualStyleBackColor = True + ' + 'lblMousePos + ' + Me.lblMousePos.AutoSize = True + Me.lblMousePos.Location = New System.Drawing.Point(84, 469) + Me.lblMousePos.Name = "lblMousePos" + Me.lblMousePos.Size = New System.Drawing.Size(60, 13) + Me.lblMousePos.TabIndex = 10 + Me.lblMousePos.Text = "MousePos:" + ' + 'LblLastInput + ' + Me.LblLastInput.AutoSize = True + Me.LblLastInput.Font = New System.Drawing.Font("Microsoft Sans Serif", 50.0!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) + Me.LblLastInput.Location = New System.Drawing.Point(80, 368) + Me.LblLastInput.Name = "LblLastInput" + Me.LblLastInput.Size = New System.Drawing.Size(73, 76) + Me.LblLastInput.TabIndex = 9 + Me.LblLastInput.Text = "[]" + ' + 'Label1 + ' + Me.Label1.AutoSize = True + Me.Label1.Font = New System.Drawing.Font("Microsoft Sans Serif", 15.0!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) + Me.Label1.Location = New System.Drawing.Point(6, 303) + Me.Label1.Name = "Label1" + Me.Label1.Size = New System.Drawing.Size(138, 25) + Me.Label1.TabIndex = 8 + Me.Label1.Text = "LAST INPUT" + ' + 'ChkActions + ' + Me.ChkActions.FormattingEnabled = True + Me.ChkActions.Location = New System.Drawing.Point(6, 48) + Me.ChkActions.Name = "ChkActions" + Me.ChkActions.Size = New System.Drawing.Size(223, 199) + Me.ChkActions.TabIndex = 7 + ' + 'CmdExit + ' + Me.CmdExit.Dock = System.Windows.Forms.DockStyle.Bottom + Me.CmdExit.Location = New System.Drawing.Point(3, 517) + Me.CmdExit.Name = "CmdExit" + Me.CmdExit.Size = New System.Drawing.Size(229, 58) + Me.CmdExit.TabIndex = 6 + Me.CmdExit.Text = "Exit" + Me.CmdExit.UseVisualStyleBackColor = True + ' + 'CmdRemSel + ' + Me.CmdRemSel.Location = New System.Drawing.Point(6, 255) + Me.CmdRemSel.Name = "CmdRemSel" + Me.CmdRemSel.Size = New System.Drawing.Size(223, 23) + Me.CmdRemSel.TabIndex = 5 + Me.CmdRemSel.Text = "Remove Selected" + Me.CmdRemSel.UseVisualStyleBackColor = True + ' + 'CmdRecAct + ' + Me.CmdRecAct.Location = New System.Drawing.Point(6, 19) + Me.CmdRecAct.Name = "CmdRecAct" + Me.CmdRecAct.Size = New System.Drawing.Size(223, 23) + Me.CmdRecAct.TabIndex = 3 + Me.CmdRecAct.Text = "Record Action" + Me.CmdRecAct.UseVisualStyleBackColor = True + ' + 'PlayTime + ' + Me.PlayTime.Interval = 10 + ' + 'PosSel + ' + Me.PosSel.Interval = 5000 + ' + 'TxtCap + ' + Me.TxtCap.Location = New System.Drawing.Point(219, 308) + Me.TxtCap.Name = "TxtCap" + Me.TxtCap.Size = New System.Drawing.Size(10, 20) + Me.TxtCap.TabIndex = 12 + Me.TxtCap.Visible = False + ' + 'FrmMain + ' + Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!) + Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font + Me.ClientSize = New System.Drawing.Size(259, 602) + Me.Controls.Add(Me.GroupBox1) + Me.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedToolWindow + Me.MaximizeBox = False + Me.Name = "FrmMain" + Me.Text = "Google Game thing" + Me.GroupBox1.ResumeLayout(False) + Me.GroupBox1.PerformLayout() + Me.ResumeLayout(False) + + End Sub + Friend WithEvents GroupBox1 As GroupBox + Friend WithEvents CmdExit As Button + Friend WithEvents CmdRemSel As Button + Friend WithEvents CmdRecAct As Button + Friend WithEvents PlayTime As Timer + Friend WithEvents ChkActions As ListBox + Friend WithEvents Label1 As Label + Friend WithEvents lblMousePos As Label + Friend WithEvents LblLastInput As Label + Friend WithEvents CmdPos As Button + Friend WithEvents PosSel As Timer + Friend WithEvents TxtCap As TextBox +End Class diff --git a/GoogleGameThing/FrmMain.resx b/GoogleGameThing/FrmMain.resx new file mode 100644 index 0000000..f4d0920 --- /dev/null +++ b/GoogleGameThing/FrmMain.resx @@ -0,0 +1,126 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + 17, 17 + + + 117, 17 + + \ No newline at end of file diff --git a/GoogleGameThing/FrmMain.vb b/GoogleGameThing/FrmMain.vb new file mode 100644 index 0000000..ed27ac6 --- /dev/null +++ b/GoogleGameThing/FrmMain.vb @@ -0,0 +1,71 @@ +Public Class FrmMain + Private Declare Sub mouse_event Lib "user32" (ByVal dwFlags As Integer, ByVal dx As Integer, ByVal dy As Integer, ByVal cButtons As Integer, ByVal dwExtraInfo As Integer) 'Grab a reference to the mouse even from the user32 lib in windows so that we can get the position + Public mouseActionList As New Dictionary(Of String, List(Of Tuple(Of Integer, Integer)))() 'A public dictionary to hold the mouse action/keypress details + Public mouseActionStartPosition As Tuple(Of Integer, Integer) 'The start x and y location on the screen for the mouse action to move from + Private _mouseStartPositionSet As Boolean 'Bool to check if the user has set the start mouse position yet or not + + + Private Sub CmdExit_Click(sender As Object, e As EventArgs) Handles CmdExit.Click 'Quit the app + Me.Close() + End Sub + + Private Sub CmdRecAct_Click(sender As Object, e As EventArgs) Handles CmdRecAct.Click + Dim capFrm As New FrmCapture + capFrm.Location = New Point(Me.Location.X - capFrm.Width, Me.Location.Y) + + capFrm.ShowDialog() + End Sub + + Private Sub CmdRemSel_Click(sender As Object, e As EventArgs) Handles CmdRemSel.Click 'Method for removing mouse actions from the action list + Dim sel_text As String() = ChkActions.SelectedItem.ToString.Split(" | ") + ChkActions.Items.RemoveAt(ChkActions.SelectedIndex) + + Dim char_key As Char = sel_text.Last() + mouseActionList.Remove(char_key) + End Sub + + Private Sub FrmMain_KeyDown(sender As Object, e As KeyEventArgs) Handles Me.KeyDown 'Send the mouse action to the mouse lib to execute the command + If _mouseStartPositionSet = True Then 'Check if the start position has been set so we know where to start the action + If mouseActionList.ContainsKey(Chr(e.KeyValue)) Then 'Check if the keypress is actually in the actions list + LblLastInput.Text = Chr(e.KeyValue) + Cursor.Position = New Point(mouseActionStartPosition.Item1, mouseActionStartPosition.Item2) 'set the mouse position to the start + mouse_event(&H2&, 0, 0, 0, 0) 'Send the left click command + + 'loop through each point in the action array and set the mouse position + For Each lst_item In mouseActionList.Item(Chr(e.KeyValue)) + Cursor.Position = New Point(mouseActionStartPosition.Item1 + lst_item.Item1, mouseActionStartPosition.Item2 + lst_item.Item2) + Threading.Thread.Sleep(1) + Next + mouse_event(&H4&, 0, 0, 0, 0) 'Release the left click + + 'Set the mouse location back to the app and click to try get focus, click and release the button incase it stuck for some reason, force focus and bring to the front + Cursor.Position = New Point(Me.Location.X, Me.Location.Y) + mouse_event(&H2&, 0, 0, 0, 0) + mouse_event(&H4&, 0, 0, 0, 0) + + Me.BringToFront() + Me.Focus() + End If + End If + End Sub + + Private Sub FrmMain_Load(sender As Object, e As EventArgs) Handles Me.Load + Me.TopMost = True + Me.KeyPreview = True + _mouseStartPositionSet = False + End Sub + + Private Sub CmdPos_Click(sender As Object, e As EventArgs) Handles CmdPos.Click + PosSel.Enabled = True 'Start the timer to listen for the start moust position method + CmdPos.BackColor = Color.Green + End Sub + + Private Sub PosSel_Tick(sender As Object, e As EventArgs) Handles PosSel.Tick 'Method that waits for the timer to tick, once it has we get the mouse's current position and sets the start location variable + mouseActionStartPosition = Tuple.Create(Cursor.Position.X, Cursor.Position.Y) + lblMousePos.Text = "Mouse Pos: " & Cursor.Position.X & ":" & Cursor.Position.Y + CmdPos.BackColor = Color.Red + _mouseStartPositionSet = True + PosSel.Enabled = False + End Sub + +End Class diff --git a/GoogleGameThing/GoogleGameThing.vbproj b/GoogleGameThing/GoogleGameThing.vbproj new file mode 100644 index 0000000..79609c9 --- /dev/null +++ b/GoogleGameThing/GoogleGameThing.vbproj @@ -0,0 +1,149 @@ + + + + + Debug + AnyCPU + {E8891FA6-F0A6-4CD0-A7F5-70E384401321} + WinExe + GoogleGameThing.My.MyApplication + GoogleGameThing + GoogleGameThing + 512 + WindowsForms + v4.6.1 + true + + + AnyCPU + true + full + true + true + bin\Debug\ + GoogleGameThing.xml + 42016,41999,42017,42018,42019,42032,42036,42020,42021,42022 + + + AnyCPU + pdbonly + false + true + true + bin\Release\ + GoogleGameThing.xml + 42016,41999,42017,42018,42019,42032,42036,42020,42021,42022 + + + On + + + Binary + + + Off + + + On + + + My Project\app.manifest + + + AppIcon.ico + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + FrmCapture.vb + + + Form + + + Form + + + FrmMain.vb + Form + + + + True + Application.myapp + + + True + True + Resources.resx + + + True + Settings.settings + True + + + + + FrmCapture.vb + + + FrmMain.vb + + + VbMyResourcesResXFileCodeGenerator + Resources.Designer.vb + My.Resources + Designer + + + + + + MyApplicationCodeGenerator + Application.Designer.vb + + + SettingsSingleFileGenerator + My + Settings.Designer.vb + + + + + + + + + \ No newline at end of file diff --git a/GoogleGameThing/My Project/Application.Designer.vb b/GoogleGameThing/My Project/Application.Designer.vb new file mode 100644 index 0000000..f1118d2 --- /dev/null +++ b/GoogleGameThing/My Project/Application.Designer.vb @@ -0,0 +1,38 @@ +'------------------------------------------------------------------------------ +' +' This code was generated by a tool. +' Runtime Version:4.0.30319.42000 +' +' Changes to this file may cause incorrect behavior and will be lost if +' the code is regenerated. +' +'------------------------------------------------------------------------------ + +Option Strict On +Option Explicit On + + +Namespace My + + 'NOTE: This file is auto-generated; do not modify it directly. To make changes, + ' or if you encounter build errors in this file, go to the Project Designer + ' (go to Project Properties or double-click the My Project node in + ' Solution Explorer), and make changes on the Application tab. + ' + Partial Friend Class MyApplication + + _ + Public Sub New() + MyBase.New(Global.Microsoft.VisualBasic.ApplicationServices.AuthenticationMode.Windows) + Me.IsSingleInstance = true + Me.EnableVisualStyles = true + Me.SaveMySettingsOnExit = true + Me.ShutDownStyle = Global.Microsoft.VisualBasic.ApplicationServices.ShutdownMode.AfterMainFormCloses + End Sub + + _ + Protected Overrides Sub OnCreateMainForm() + Me.MainForm = Global.GoogleGameThing.FrmMain + End Sub + End Class +End Namespace diff --git a/GoogleGameThing/My Project/Application.myapp b/GoogleGameThing/My Project/Application.myapp new file mode 100644 index 0000000..3a58db2 --- /dev/null +++ b/GoogleGameThing/My Project/Application.myapp @@ -0,0 +1,10 @@ + + + true + FrmMain + true + 0 + true + 0 + true + \ No newline at end of file diff --git a/GoogleGameThing/My Project/AssemblyInfo.vb b/GoogleGameThing/My Project/AssemblyInfo.vb new file mode 100644 index 0000000..b069190 --- /dev/null +++ b/GoogleGameThing/My Project/AssemblyInfo.vb @@ -0,0 +1,35 @@ +Imports System +Imports System.Reflection +Imports System.Runtime.InteropServices + +' General Information about an assembly is controlled through the following +' set of attributes. Change these attribute values to modify the information +' associated with an assembly. + +' Review the values of the assembly attributes + + + + + + + + + + +'The following GUID is for the ID of the typelib if this project is exposed to COM + + +' Version information for an assembly consists of the following four values: +' +' Major Version +' Minor Version +' Build Number +' Revision +' +' You can specify all the values or you can default the Build and Revision Numbers +' by using the '*' as shown below: +' + + + diff --git a/GoogleGameThing/My Project/Resources.Designer.vb b/GoogleGameThing/My Project/Resources.Designer.vb new file mode 100644 index 0000000..b81cef8 --- /dev/null +++ b/GoogleGameThing/My Project/Resources.Designer.vb @@ -0,0 +1,63 @@ +'------------------------------------------------------------------------------ +' +' This code was generated by a tool. +' Runtime Version:4.0.30319.42000 +' +' Changes to this file may cause incorrect behavior and will be lost if +' the code is regenerated. +' +'------------------------------------------------------------------------------ + +Option Strict On +Option Explicit On + +Imports System + +Namespace My.Resources + + 'This class was auto-generated by the StronglyTypedResourceBuilder + 'class via a tool like ResGen or Visual Studio. + 'To add or remove a member, edit your .ResX file then rerun ResGen + 'with the /str option, or rebuild your VS project. + ''' + ''' A strongly-typed resource class, for looking up localized strings, etc. + ''' + _ + Friend Module Resources + + Private resourceMan As Global.System.Resources.ResourceManager + + Private resourceCulture As Global.System.Globalization.CultureInfo + + ''' + ''' Returns the cached ResourceManager instance used by this class. + ''' + _ + Friend ReadOnly Property ResourceManager() As Global.System.Resources.ResourceManager + Get + If Object.ReferenceEquals(resourceMan, Nothing) Then + Dim temp As Global.System.Resources.ResourceManager = New Global.System.Resources.ResourceManager("GoogleGameThing.Resources", GetType(Resources).Assembly) + resourceMan = temp + End If + Return resourceMan + End Get + End Property + + ''' + ''' Overrides the current thread's CurrentUICulture property for all + ''' resource lookups using this strongly typed resource class. + ''' + _ + Friend Property Culture() As Global.System.Globalization.CultureInfo + Get + Return resourceCulture + End Get + Set + resourceCulture = value + End Set + End Property + End Module +End Namespace diff --git a/GoogleGameThing/My Project/Resources.resx b/GoogleGameThing/My Project/Resources.resx new file mode 100644 index 0000000..af7dbeb --- /dev/null +++ b/GoogleGameThing/My Project/Resources.resx @@ -0,0 +1,117 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + \ No newline at end of file diff --git a/GoogleGameThing/My Project/Settings.Designer.vb b/GoogleGameThing/My Project/Settings.Designer.vb new file mode 100644 index 0000000..dfa6968 --- /dev/null +++ b/GoogleGameThing/My Project/Settings.Designer.vb @@ -0,0 +1,73 @@ +'------------------------------------------------------------------------------ +' +' This code was generated by a tool. +' Runtime Version:4.0.30319.42000 +' +' Changes to this file may cause incorrect behavior and will be lost if +' the code is regenerated. +' +'------------------------------------------------------------------------------ + +Option Strict On +Option Explicit On + + +Namespace My + + _ + Partial Friend NotInheritable Class MySettings + Inherits Global.System.Configuration.ApplicationSettingsBase + + Private Shared defaultInstance As MySettings = CType(Global.System.Configuration.ApplicationSettingsBase.Synchronized(New MySettings()),MySettings) + +#Region "My.Settings Auto-Save Functionality" +#If _MyType = "WindowsForms" Then + Private Shared addedHandler As Boolean + + Private Shared addedHandlerLockObject As New Object + + _ + Private Shared Sub AutoSaveSettings(ByVal sender As Global.System.Object, ByVal e As Global.System.EventArgs) + If My.Application.SaveMySettingsOnExit Then + My.Settings.Save() + End If + End Sub +#End If +#End Region + + Public Shared ReadOnly Property [Default]() As MySettings + Get + +#If _MyType = "WindowsForms" Then + If Not addedHandler Then + SyncLock addedHandlerLockObject + If Not addedHandler Then + AddHandler My.Application.Shutdown, AddressOf AutoSaveSettings + addedHandler = True + End If + End SyncLock + End If +#End If + Return defaultInstance + End Get + End Property + End Class +End Namespace + +Namespace My + + _ + Friend Module MySettingsProperty + + _ + Friend ReadOnly Property Settings() As Global.GoogleGameThing.My.MySettings + Get + Return Global.GoogleGameThing.My.MySettings.Default + End Get + End Property + End Module +End Namespace diff --git a/GoogleGameThing/My Project/Settings.settings b/GoogleGameThing/My Project/Settings.settings new file mode 100644 index 0000000..85b890b --- /dev/null +++ b/GoogleGameThing/My Project/Settings.settings @@ -0,0 +1,7 @@ + + + + + + + diff --git a/GoogleGameThing/My Project/app.manifest b/GoogleGameThing/My Project/app.manifest new file mode 100644 index 0000000..a6b46bb --- /dev/null +++ b/GoogleGameThing/My Project/app.manifest @@ -0,0 +1,76 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/LICENSE.txt b/LICENSE.txt new file mode 100644 index 0000000..fdddb29 --- /dev/null +++ b/LICENSE.txt @@ -0,0 +1,24 @@ +This is free and unencumbered software released into the public domain. + +Anyone is free to copy, modify, publish, use, compile, sell, or +distribute this software, either in source code form or as a compiled +binary, for any purpose, commercial or non-commercial, and by any +means. + +In jurisdictions that recognize copyright laws, the author or authors +of this software dedicate any and all copyright interest in the +software to the public domain. We make this dedication for the benefit +of the public at large and to the detriment of our heirs and +successors. We intend this dedication to be an overt act of +relinquishment in perpetuity of all present and future rights to this +software under copyright law. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR +OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, +ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR +OTHER DEALINGS IN THE SOFTWARE. + +For more information, please refer to