473,473 Members | 1,970 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Passing commands between apps

Hi

How can I send simple commands like GotoClient 10, GotoSupplier 53 etc to a
WinForm app?

Thanks

Regards
Jul 26 '08 #1
7 1009
command line arguments ???
For Each argument As String In My.Application.CommandLineArgs
' do something
Next

or you can make your app read the clipboard

"John" <in**@nospam.infovis.co.ukwrote in message
news:##**************@TK2MSFTNGP03.phx.gbl...
Hi

How can I send simple commands like GotoClient 10, GotoSupplier 53 etc to
a WinForm app?

Thanks

Regards

Jul 26 '08 #2
The app is already running when command needs to be sent to it so command
line arguments are perhaps not workable here...

"Gillard" <gillard_georges@@@@@@@@@hotmail.comwrote in message
news:eh**************@TK2MSFTNGP05.phx.gbl...
command line arguments ???
For Each argument As String In My.Application.CommandLineArgs
' do something
Next

or you can make your app read the clipboard

"John" <in**@nospam.infovis.co.ukwrote in message
news:##**************@TK2MSFTNGP03.phx.gbl...
>Hi

How can I send simple commands like GotoClient 10, GotoSupplier 53 etc to
a WinForm app?

Thanks

Regards


Jul 26 '08 #3
Ideally app is not aware of incoming commands and is nudged when command is
available to avoid valuable app resources being used to monitor incoming
commands...

"Gillard" <gillard_georges@@@@@@@@@hotmail.comwrote in message
news:eh**************@TK2MSFTNGP05.phx.gbl...
command line arguments ???
For Each argument As String In My.Application.CommandLineArgs
' do something
Next

or you can make your app read the clipboard

"John" <in**@nospam.infovis.co.ukwrote in message
news:##**************@TK2MSFTNGP03.phx.gbl...
>Hi

How can I send simple commands like GotoClient 10, GotoSupplier 53 etc to
a WinForm app?

Thanks

Regards


Jul 26 '08 #4
Have you looked at Windows Communication Foundation?

http://msdn.microsoft.com/en-us/library/ms735119.aspx

"John" <in**@nospam.infovis.co.ukwrote in message
news:%2******************@TK2MSFTNGP03.phx.gbl...
Hi

How can I send simple commands like GotoClient 10, GotoSupplier 53 etc to
a WinForm app?

Thanks

Regards

Jul 26 '08 #5
Many thanks. Is there a vb.net around? Trying to convert code to vb.net
using automatic converter hasn't worked.
You could compile it in C# and then use Reflector to view the generated code
as VB.NET
Pete

Jul 27 '08 #6
Using remoting for this might be complete overkill. Sometimes I think a lot of .net programmers never did regular windows programming. If you just want to receive simple messages you can use WndProc. Register a custom windows message and send it to any window you want. Use win32 PostMessage to send it.

protected override void WndProc(ref Message m)
{
//calling the base first is important, otherwise the values you set later will be lost
base.WndProc(ref m);

//if the window message id equals the myCustomMessage message id
if((UInt32)m.Msg == myCustomMessage)
{
m.Result = (IntPtr)1;

// do something with the data
string text = m.WParam.ToInt32().ToString();
}
}
http://www.codeproject.com/KB/vb/Sen...y_message.aspx

-------- Original Message --------
Hi

How can I send simple commands like GotoClient 10, GotoSupplier 53 etc to a
WinForm app?

Thanks

Regards

Jul 28 '08 #7
"John" <in**@nospam.infovis.co.ukwrote in message
news:%2******************@TK2MSFTNGP03.phx.gbl...
How can I send simple commands like GotoClient 10, GotoSupplier 53 etc to
a WinForm app?
To help you broaden your search, what you're looking for is technically
known as "interprocess communication."
Jul 28 '08 #8

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: stealthwang | last post by:
I'm still very new to Python, after decideding to learn a true programming language (rather then a scripting language, i like to think i'm a intermediate PHP user). I decided for my first project I...
6
by: igarrison | last post by:
I'm working on an application for browsing encrypted files (HTML and PDF mostly)on a DVD. My plan is to decrypt the files to memory and stream them to the AxWebBrowser component which should be...
19
by: Jaime Stuardo | last post by:
Hi all.. I have created a business logic component that is used from my ASP.NET webform. It works, but connection string to the database is hard coded, as in this method : public DataSet...
2
by: Rich | last post by:
Hello, I have an oleDBDataAdapter (da1) which gets data from an Access mdb and fills a dataset (ds1) with integer data from "tbl1" in Access. Data displays in textboxes on a form. The...
15
by: John Alway | last post by:
Hello, I'm using a DLL I wrote in C++, and am attempting to call and use it from VB. This works fine for functions where I pass parameters by value, but I can't get pointers to work. I get...
7
by: Pontifex | last post by:
Hi all, I heard or read that the next version of HTML will provide long-overdue drawing commands. Which version of Firefox, Opera or IE supports such new fancy stuff? Thanks!
2
by: Hakan Örnek | last post by:
Hi , I want to parameter passing to my windows sevice. I call service commands like this ; '------------------------------------------------------------ Dim sc As ServiceController sc = New...
46
by: ahmed.maryam | last post by:
Hi all, I have 2 C# applications that I need to pass data between. Specifically XML information such as a document or node name. How can I do that? Thanks in advance! ~ Maryam
0
by: daniel gabriel | last post by:
Hello. I'm working on a distributed application consisting of a single server, a single client, and a number of local applications. The client and the local applications are on the same machine,...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
0
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.