Communicating Between GlovePIE and Application - vb.net

How can I communicate between VB.net and GlovePIE?
I know that you can send OSC (Open Sound Control-It isn't just for sound) data in GlovePIE so if you could send/receive data in VB.net without any libraries that would work but I cannot find any resources.
Please post any code that you can.
EDIT: All I want is a basic way to communicate between GlovePIE and VB.net and I found that you could send OSC data in GlovePIE but you cannot in VB.net I would accept any help that I can get. If you have a better method, feel free to tell me. I am using this guide to send the data.

After lots of creative thinking, and hours wasted, I finally came up with an idea. (Thanks to spajce for helping me realize there is no perfect solution, and I had to think outside of the box to make this work.) This is what I am going to do. (I have not written the code yet, but I will try to submit it as soon as I write it.)
How I am going to set it up:
I will have a form in VB.net that will send data to the COM port. It's GUI will have the user select the COM port and have a button to connect.
In my GlovePIE script, I will have it automatically hide itself.
For data transfer to VB.net:
GlovePIE will tell if the form is selected using the Window.Title property. If it is, it will emulate a key press. The form will be looking for the keypress.
For Data Transfer to GlovePIE:
The form will change the Me.text property to something that has happened. For exaple, I'm building a robot and if the ping sensor senses something, my Aduino will send the data over serial, to VB.net, which will change the title to "Robot Connect-OBJECT DETECTED" GlovePIE will know the multiple names the form might be, and when searching to see if it is active, it can tell if something has been detected. VB.net will change the title back to "Robot Connect" after GlovePIE signals it has recived the signal.
There will be some bugs, but VB.net is smart enough to tell if another window is the active one. If you are browsing this question, you may have to adapt this. I will have to put a couple of safety features to prevent the robot from not stopping when the VB.net window loses focus.
Thanks to anbody who tried to help.

Related

Monitor process api calls windows 7 vb.net/C# or C++

Currently i'm working on a security monitoring app that continuously monitor new processes created.
For that im using wim and event watcher, witch works fine in VB.NET.
But there are 2 features that im missing.
I need to monitor process API calls, and I've been searching the web like mad, and come up empty.
Basically i need to monitor process WaitForSingleObject, LoadLibraryA, CreateProcessW and WriteProcessMemory. And registry access/changes as well.
Im hoping this can be done without a system wide hook, but form what i can find, it cannot be done via WMI.
So the question is, how to, and what can i do with managed code.
I'm gonna focus on the second point as i don't have experience on your first.
For checking if a process is signed i am using the sigcheck.exe from Mark Russinovich, because of the various methods it uses to verify files. Some are catalogsigned, some have the key embedded, there is iirc another weird method. There is no easy way to do it yourself. Had weird false detections with trying self-built methods to cover all possibilities. Hope that info helps

VB.NET how to throw a command from a server to client?

Please, give me a head start :/ i really don't know where to start from here.
I am now a frequent user of VB.NET 2010 and now I encountered another hurdle,
my first project (Electronic Smart Card Attendance System) was successful but
now i want to experiment more on server-client vb programming.
How do I throw a VB.NET command from a server form
to client form remotely..? for example:
When I click "show button click event" on the form from server computer,
it will show the form / results that I wanted to show on the client's computer / VB.NET GUI.
I just want to know the syntax/code blocks that I may use.
I'm sorry if I sound a bit bossy but it's kinda frustrating X(
Help will be greatly appreciated <3
Check these out:
[VB.Net] Multi-Client Server Async Socket Example
[Tutorial][VB.Net] Asynchronized Server/Client Demo(using sockets)

How can I send a DataGridView WM_PAINT message, directly to a DC (device context), using Visual Basic 2010?

I want to do what I have done in the past, using the old VB6. Subclassing has changed a lot since VB6 and I still want to do the same:
I need to intercept WM_PAINT of DataGridView, send it to a memory device context (to avoid flickering), make some visual changes, like place a logo over all over the grid. With VB6, was easy to do. I have spend hours trying to convert VB6/API code to Visual Basic Express 2010 code, without success.
So, if anybody know how to do it ... let me know please.
Thank's on advance
AbĂ­lio Rodrigues
You can't send messages to device contexts, only to windows. Get the handle of the window for the control, and send the message there.

Key logging in .NET

Is it possible to write a key logger in Visual Basic.NET? Is this the right language to be using?
So far, I've gotten a console app to read input and append to a file.
1)How can I make a .NET program "catch" all keyboard input?
2)How do I make a process not show up in Task Manager?
This is not for a virus, but rather a parental control program for a specific clientele. No malicious intent here.
You need to set a Keyboard Hook.
This is extremely difficult and is not possible on 64-bit editions of Windows.
If you're really doing this with consent, this shouldn't be necessary.
Here's a sample of how to write a key logger in .net. http://www.scratchprojects.com/2008/09/csharp_keylogger_p01.php
Your best bet for making it not show up in Task Manager is to make it look like something that belongs. Call it "svchost.exe". :-)

Unattended application best practice question

We have an unattended app w/o a user interface that is is periodically run.
It is a VB.NET app. Instead of it being developed as a service, or a formless Windows application, it was developed with a form and all the code was placed in the form_load logic, with an "END" statement as the last line of code to terminate the program.
Other than producing a program that uses unneeded Windows form resources, is there a compelling reason to send this code back for rework to be changed to put the start up logic in a MAIN sub of a BAS file?
If the program is to enter and exit the mix (as opposed to running continuously) is there any point in making it a service?
If the app is developed with a Form do I have to worry about a dialog box being presented that no one will respond to even if there are no MessageBox commands in the app?
I recall there used to be something in VB6 where you could check an app as running unattended, presumably to avoid dialogs.
I don't know whether there are conditions where this will not run.
However, if the code was delivered by someone you will work with going forward, I would look at this as an opportunity to help them understand best practices (which this is not), and to help them understand that you expect best-practice code to be delivered.
First of all, you don't need it to be run in a Form.
Forms are there for Presentation, so it should not be done there.
If you don't want to mess with converting the application a Service (not difficult, but not very easy neither), you shoud create a Console Application, and then, schedule it with Windows Task Scheduler.
This way, you create a Console Application, with a Main function, that does exactly what you need.
Anyway, the programmer could show windows, so there should not be any messagebox. Any communication should be done via Logging to: local files, windows events, database.
If you want more information on any of them, ask me.
If you don't want it to be a service, nothing says that it has to be a windows service. Scheduling it to run via the Task Scheduler or something similar is a valid option.
However, it does sound like the developer should have choose a "Console App" project, instead of a "Windows Forms" project to create this app.
Send it back. The application is bulkier and slower than it needs to be, although that won't be much of an issue. It is somewhat more likely to run out of resources. But the main reason: converting it to a console app is very easy.
If you don't prefer for the Console window to popup, simply do the following.
Create a new class "Program.vb", add a public shared Main() method, and move the "OnLoad" logic from the form to this method.
Next delete the form, and change the project start up object (Available in the project properties window) to use the Program.Main instead of the Form.
This will have the same effect, without the windows forms resources being used. You can then remove the references to System.Windows.Form and System.Drawing.