Search ProofOfProgress Blog

Friday, April 22, 2016

Having trouble invoking static methods in VB.net

Static Methods. AKA: "shared" in vb.net termonology.
Here is the paste bin: http://pastebin.com/RC9p74sE

Update: I was being stupid. The static methods were throwing an error because I was writing the statements within the class, but NOT within a function.
Fix here:http://pastebin.com/2MsCzaMm

CodeEval VB.Net Sample Code Bug Fix

On CodeEval.com: Compiler error around this location, the compiler hasn't implemented the error message, nor error recovery, so the compiler will probably crash soon.
Reason:
The sample code for VB.NET has a typo in it.
GetCommandLneArgs should be: 
GetCommandLineArgs 
Module Challenge
    Sub Main()
        Dim test As String
        Using fileStream As New System.IO.StreamReader(System.Environment.GetCommandLneArgs()(1))
            Do Until fileStream.EndOfStream
                test = fileStream.ReadLine
               'test' represents the test case, do something with it
               ...
               ...
            Loop
        End Using
    End Sub
End Module

Thursday, April 7, 2016

Entity Data Model Wizard Shortcut

Can't seem to find the shortcut mapping command for: "Entity Data Model Wizard" within visual studio. I wish there was some type of "Echo all commands" in visual studio like there is in 3DSMax. Then I could see what commands were issued to open what windows. Tried getting the actual class of the window using Auto Hot Key. While it gave me some information, none of it that I could use to identify the window I want. Sucks because I know I should be able to wire this window to a hotkey. Once that window is already open though, you have a lot of shortcut options. http://stackoverflow.com/questions/23528347/keyboard-shortcuts-in-edmx-designer

Tuesday, April 5, 2016

Get Class Of Active Window AHK

So, I was reading all through the documentation looking for a:
WinGetActiveClass
Since there is a WinGetTitle
And a WinGetClass


Turns out:
WinGetClass's behavior IS to get the class of the active window.

This sample code will display the class name of the active window
when you press the enter key:

enter::
{
 ;theClass = class of active window.
 WinGetClass, theClass, A
 msgBox %theClass%
}