Subject:Is there really a FORWARDKEY method?
Posted by: MissingTheFOUNDRY
Date:6/25/2015 10:12:57 PM
the mighty google cannot find even a single example of ForwardKey() in use. Anyone got a clue? The soundforge API chm shows: Method Detail: ForwardKey Process a keystroke as if the user had typed it. C# void ForwardKey( Keys eKey ) Visual Basic Sub ForwardKey ( eKey As Keys ) JScript function ForwardKey( eKey : Keys ) Parameter eKey : The keystroke to process. ----------------------- trying this Dim tester as Keys = "m" gets this error (notice the INTEGER mention ?!): " System.InvalidCastException: Conversion from string "m" to type 'Integer' is not valid. " Message last edited on6/26/2015 3:06:18 PM byMissingTheFOUNDRY. |
Subject:RE: Is there really a FORWARDKEY method?
Reply by: roblesinge
Date:6/27/2015 1:40:02 PM
Have you tried handing it a char instead of a string? Or, the System.Windows.Forms namespace has a Keys enumeration that might be what you need. https://msdn.microsoft.com/en-us/library/system.windows.forms.keys(v=vs.110).aspx -Rob. |
Subject:RE: Is there really a FORWARDKEY method?
Reply by: MissingTheFOUNDRY
Date:6/29/2015 10:42:50 AM
The namespace stuff is the kind of lead I hoped for, but the point is, any non-integer not in quotes seems to throw a compiler complaint, and while integers throw no errors, no experiment I did with them did anything... and the FORWARDKEY method seems to be trying to convert any non integer into an integer. So what is the connection between pure integers and keystrokes?? If there actually is one. Message last edited on6/29/2015 10:43:43 AM byMissingTheFOUNDRY. |
Subject:RE: Is there really a FORWARDKEY method?
Reply by: roblesinge
Date:6/29/2015 3:20:26 PM
This is just a guess, but the default underlying type of enumerations in c# is integer. So, I'd guess that's why the ForwardKeys method is expecting the Keys enum, which is then cast to an integer. -Rob. |