|
Hello,
I am wondering that if you could have 2 executables or programs, one accessing another one's controls, like my Vb.NET program pressing a button on notepad.exe, or menus.
Simple Thanks and Regards,
Brandon T. H.
Been programming in Visual Basic for 4 years this point forward, and is very good at it (I can even create programs completely on code, without dragging those items from the toolbox). Programming C++ for 1 year so far and the same with C#.
Many of life's failures are people who did not realize how close they were to success when they gave up. - Thomas Edison
|
|
|
|
|
Brandon T. H. wrote: I am wondering that if you could have 2 executables or programs, one accessing another one's controls, like my Vb.NET program pressing a button on notepad.exe, or menus.
Yup, that's possible, the collection of those techniques would be called "interprocess communication".
You can take a pick between TCP/IP, (Named) Pipes, SendKeys, Memory mapped files and many more. A good CodeProject-article would be ".NET Remoting in Simple English (Really, it's that simple)[^]".
--edit
not cool to see the same question twice.
Bastard Programmer from Hell
modified 4-Apr-12 17:21pm.
|
|
|
|
|
Those concepts will only work if he has access to both programs' code. If you are trying to control a program you did not create or cannot modify, you will need to use API calls such as "FindWindow"/"FindWindowEx" to locate the window and child control (also considered a "window"). You can use programs like spy++ or winspector spy to figure out the class/caption of the windows and controls. Once you have the handle (intptr) to the control, you can use other API calls to send key presses and/or mouse clicks. You'll have to google those, tho.
Hope that helps!
Ray
|
|
|
|
|
If you need to build your softphone in VB.NET you might try out the following sample program: www.voip-sip-sdk.com/p_179-windows-forms-softphone-vb-net-voip.html It’s based on an sdk which is written in .Net and therefore insures flexibility including even further developments. I don’t want to advertise just share my good experiences.
|
|
|
|
|
David_00 wrote: I don’t want to advertise
Then don't; these forums are for technical questions and discussions, not for advertising.
Unrequited desire is character building. OriginalGriff
I'm sitting here giving you a standing ovation - Len Goodman
|
|
|
|
|
David_00 wrote: If you need to build your softphone in VB.NET you might try out the following sample program: www.voip-sip-sdk.com/p_179-windows-forms-softphone-vb-net-voip.html It’s based on an sdk which is written in .Net and therefore insures flexibility including even further developments. I don’t want to advertise just share my good experiences.
You could have submitted a tip (with example code), or posted a link to the SDK in the "free tools" forum.
This forum is filled with questions on VB.NET and your post won't be visible for long.
Bastard Programmer from Hell
|
|
|
|
|
HI everyone,
I am inquiring on how to use a listbox as a groupbox so I can have inside of it a number of controls such as textbox, combobox,etc.. why is this? I want to be able to able to scroll up and down to fill out all the controls that can be placed inside of this listbox..this may not be in the form of a listbox..I am just thinking aloud on this..the bottom line is that I want a form to look clean with not so much controls on the form with the aid of a listbox or any other type of control with scroll up&down.
this is for vb.net..
Thanks a lot in advance..
Ps..I search the net but I cant seeem to get what I am looking for.
|
|
|
|
|
I would consider a scrolling-panel-inside-a-panel approach, rather than a ListBox. This article[^] will show you what I mean, it was done using C# but you could do exactly the same in any .NET language.
|
|
|
|
|
How to solve the problem of showing "The 'Microsoft.ACE.OLEDB.12.0' provider is not registered on the local machine." and "The 'Microsoft.JET.OLEDB.4.0' provider is not registered on the local machine."
|
|
|
|
|
MHKennedy wrote: Microsoft.JET.OLEDB.4.0' provider is not registered on the local machine
Means it ain't installed. Download here[^] and install.
Bastard Programmer from Hell
|
|
|
|
|
How I can change the position of the printing of datagridview? The table is printed in the center of the sheet and can not find any function to change this,
Can you change?
If I can help .. Thank you!
|
|
|
|
|
sicca wrote: How I can change the position of the printing of datagridview?
By changing the coordinates of the upper left corner.
The DataGridView doesn't support printing out of the box. That means that you must be using custom code to print that grid. Without looking at that code, we can only guess.
Bastard Programmer from Hell
|
|
|
|
|
|
Pasan148 wrote: But not on Win 7
Don't you think that "It doesn't work under Win 7" is a bit vague?
Why is common sense not common?
Never argue with an idiot. They will drag you down to their level where they are an expert.
Sometimes it takes a lot of work to be lazy
Please stand in front of my pistol, smile and wait for the flash - JSOP 2012
|
|
|
|
|
Give him a break. At least he can spot the difference betwqeen XP and Weven.
Peter
Software rusts. Simon Stephenson, ca 1994.
|
|
|
|
|
Peter_in_2780 wrote: Give him a break
I did give him a break. I merely pointed out that his question was not at all clear. It does not even follow forum guidelines. At least *I* did not vote him down.
Why is common sense not common?
Never argue with an idiot. They will drag you down to their level where they are an expert.
Sometimes it takes a lot of work to be lazy
Please stand in front of my pistol, smile and wait for the flash - JSOP 2012
|
|
|
|
|
Wes Aday wrote: At least *I* did not vote him down. Nor me.
Peter
Software rusts. Simon Stephenson, ca 1994.
|
|
|
|
|
I can't understand why it's not clear for you. I just want to modify that code to work on Windows 7 too. If you know the answer please let me know. If you don't know the answer just ignore it.
|
|
|
|
|
Pasan148 wrote: It works perfect on Win XP. But not on Win 7
Pasan148 wrote: I can't understand why it's not clear
"doesn't work" does not convey any information, that is the problem with your post. What is happening? the program refuses to launch? it throws an exception? it exits without any message? the computer explodes? or what?
"doctor, it hurts" cannot be turned into an effective diagnosis.
|
|
|
|
|
Pasan148 wrote:
It works perfect on Win XP. But not on Win 7. What's the issue here. How do I modify this code to work on Win 7 too.
Identify the part that's failing and try and write a replacement for it.
Bastard Programmer from Hell
|
|
|
|
|
I have developed one GUI in vb.net but now I want to use C as backend code along with MySql as database.
Is it possible to create such a application.
I have been using C and MySql under Fedora and I have my GUI ready in vb.net. Can you tell me how can I communicate these thing together?
For ex. I have add button on front end, when I click add button, and instead of defining functionality in vb.net I want to send input to C function and then C function will execute and return output.
|
|
|
|
|
kus_hal03 wrote: I have been using C and MySql under Fedora and I have my GUI ready in vb.net. Can you tell me how can I communicate these thing together?
Using a variety of techniques. What's the VB.NET GUI running on, is it a Windows system, or is it running on the same Fedora-machine?
Easiest way to have them communicate would be over web-services.
Bastard Programmer from Hell
|
|
|
|
|
You can also export your C classes in such a way that VB.net can use them like you would API calls. I did this on a shell I developed so that I could get the sytem tray icons. Search google for "Use C++ DLL in VB.net". Another option is to use WndProc messages between the two applications. That's the way I would go personally. The concept you'll want to research is "inter-process communication".
|
|
|
|
|
That's assuming that they're on the same computer.
Bastard Programmer from Hell
|
|
|
|
|
Hello All,
I was wondering if there is a snippet that allows your program to follow out programming when it is terminated through task manager or similar tool. For example (Not valid code):
Private Sub OnTerminate() Handles Form1
Wondering if there is such a thing you could implement into your application .
Simple Thanks and Regards,
Brandon T. H.
Been programming in Visual Basic for 4 years this point forward, and is very good at it (I can even create programs completely on code, without dragging those items from the toolbox). Programming C++ for 1 year so far and the same with C#.
Many of life's failures are people who did not realize how close they were to success when they gave up. - Thomas Edison
|
|
|
|