How do send keystrokes if a computer setting does not allow? - vb.net

I am trying to create a VB.net program to help me fill the properties form in my Solidworks Model. My program uses pixel by pixel comparison to find out where should fill the information and then send keystroke to fill the properties form.
My program works in my home computer. However, it does not work in my company computer. I found out that my company computer does not run "SendKeys.Send". Is there anyway to get around it?

I had the same issue but I was trying on a school computer try to make a game. I would bother tying to get around it "That makes your program malware. – jmcilhinney"
Your company computer has security measures for a reason. Don't try to by pass them ever!

Related

Camera feature on UWP

I am a student that is currently developing an UWP application. And I am trying to build a camera feature within my program. I have tested out this set of sample codes from Microsoft
https://github.com/Microsoft/Windows-universal-samples/tree/master/Samples/CameraStarterKit
But I want to modify a little from the codes.
Here is what I am trying to do:
I wish to have a preview screen to show the user the photo their have taken and if they are not satisfied with it they can retake it. I am not very sure how to show a preview of the photo taken.
I do not wish to save the photo on my local storage, but instead, allow the user to send the photo they have taken to their email by typing in their email address. The main question will be, do I have to store the picture somewhere in order to send them out?
I can tell you already have the hard part figured out. Let me answer with some advice: save the file to a local folder. You can easily save the file to the Temp folder. It costs you nothing, and you don't balloon your memory footprint while you are at it. When the user wants to send, you can send it from the folder - and that is easy. Don't make things harder on yourself with difficult requirements that don't do anything but add complexity and fragility to your app. I hoe this makes sense, please take it with the utmost respect.
Best of luck!

Memory leak in windows web browser using VB

I have built a basic web browser using vb, say like IE6, where I don't have tabbed windows.
I have option of creating new window.
When I open one window and navigate to the Google page, the task manager shows 33,546 K memory usage.
On opening second and navigate to gmail, it shows 54,786K.
On opening third and go to facebook, it shows 70,191K.
But when I close any one of them, say like facebook, it is only releasing around 4 MB memory and task manager shows 66,672K. on closing second, it shows 62,890K.
What I actually want to happen is when I close facebook, memory usage should go back to around 54,000K.
I am very new to programming VB, and don't even know if what is actually happening is memory leak or not. But anyway, is there anyway to make what i want happen, that windows release their maximum memory?
Do help.
I am using dispose method to close the windows. There were solutions which asked to create two separate applications and called the browser windows in parent and there take care of events and memory based on some method i wasn't able to understand.
If that's the way then can someone point me to a tutorial where I can learn how to do that?

output to a web site from winforms app

I have an winforms VB application that outputs a string of characters to a serial port and it goes through RS232 port to another computer and writes to a portal on the other computer -- I'm not sure if it writes one character at a time or the whole string. At any rate, there is a device between the 2 computers that emulates a keyboard input.
The character (or string or characters) is output wherever the cursor has focus on the other computer. I'm not sure whether I'm explaining this clearly, but the basic idea is to automate the typing of data into a web portal (it works very well).
However (to make a long story short), the goal is to eliminate the second computer, using extended dual screens. The application and the web portal would be open on the same computer (instead of 2) and output from the winforms application would be directed to the web portal and written where the focus is on the web portal.
The way that I imagine it should work is like this: a process would write text to a stream, but instead of redirecting the text to a file or the console, it would write it to wherever the cursor's focus is.
My question is what method could I use to do this? I've been looking into the ProcessStartInfo Class, but I'm not sure if I'm on the right track.
Any help would be sincerely appreciated.

Smart card, PIN, Secure HTTP, Login and Downloading and manipulating the source html - need a suitable coding langugage

I am now motivated to explore a coding language so that I can make the best solution possible.
But I am not sure of the capabilities of all coding langugages, so I am asking for advice.
I want to automate some of the daily processes I do at the office. There is an external database on the internet that we use. We access it with a smart card and secured http.
In short, these are the actions that I do each time I restart the browser or a session ends:
Open a Secured HTTP. /....jsp
After being promted I choose an installed certificate
A smart card is called and I enter a PIN. /charismatics smart security interface/
The page asks me to log in with a username and password.
I open the desired link.
I extract the data from the opened webpage manually.
Is it possible to have all these action automated by code?
THANK YOU FOR ANY SUPPORT
If you get a PIN screen from the charismatics smart card security interface instead of from the operating system then it it may be very hard to automate this. Your program is unlikely to get access to the PIN popup Window.
If you get the PIN prompt from a CSP (as you mentioned in the comments) then it may be possible to automate the PIN login. The PIN is normally used to set up the SSL/TLS connection, so having it open in the browser won't help you much, unless you program the browser itself.
If you are bound to CSP's it may be best to keep to C#/.NET. There are of course bindings for other runtimes, but it is better to have as much control as possible.
You may want to take a look at topics such as parsing HTML, because that's something you certainly need to do. Life becomes a lot harder if the web-pages are filled in using JavaScript, so you may check for that first.
Now if you want to manually choose a link you may want to render the page in your own application and handle the download yourself.
This is certainly not a task I would recommend when starting off on an unknown programming language. I would find this a tricky task - there are a lot of ifs left with this description.

VB.NET Send keys to other application with focusing on it

I want to send keys to other application with focusing on it with VB.NET. I want to be able to send a Keydown message and a KeyUp message. But without focusing on the application I want to send keys to.
The following example focuses on the application when it is sending the keys. I don't want that.
http://www.codeproject.com/Articles/18366/Sending-Keystrokes-to-another-Application-in-C
The reason for this is I want to be able to Login with 2 games/windows onto 1 server and play with both of them. I have macros keys so I can set them to run this code. which will for example move the character on the 2nd game window while I control the character on my 1st game window. Like send "W" to move the 2nd character forward.
Any help?
In a quick research (I bet you dit it as well), I haven't found it possible.
SendKey is a way to simulate inputs at OS level, and not application level.
A possible workaround
That said, one way you could accomplish that would be creating a Virtual Machine and then run your automation script on it, keeping the host OS free. I'm just affraid that depending of the resources required by the game your are running (3D renderization), the VM specs maybe won't fit.
(Since I hate answers as "you can't do that", I just found interesting to share this palliative)