473,554 Members | 2,877 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Mixing .net languages

Tim
Hi

I have a program that I had written in Managed C++ that writes messages to the console while running. I wanted to allow the user to enter commands at the console as well, but this became difficult since the console was continuously being updated with messages. I thought to write a VB front end for the program to have a console-like window (textbox) to display the messages, and a box that will allow the user to enter commands uninterrupted. My problem is mixing the two languages. If I am correct, I can compile the C++ application as a .dll file that gets imported into the VB application for use. But the original program is the one that does the writing to the console - how do I capture that and redirect it to a VB textbox? I thought about setting up a Stream to a textbox, since Managed C++ can work with Streams - but I do not know if this is possible. Any ideas

Thank you
Tim
Nov 20 '05 #1
3 1142
On 2004-01-26, Tim <an*******@disc ussions.microso ft.com> wrote:
Hi,

I have a program that I had written in Managed C++ that writes messages to the console while running. I wanted to allow the user to enter commands at the console as well, but this became difficult since the console was continuously being updated with messages. I thought to write a VB front end for the program to have a console-like window (textbox) to display the messages, and a box that will allow the user to enter commands uninterrupted. My problem is mixing the two languages. If I am correct, I can compile the C++ application as a .dll file that gets imported into the VB application for use. But the original program is the one that does the writing to the console - how do I capture that and redirect it to a VB textbox? I thought about setting up a Stream to a textbox, since Managed C++ can work with Streams - but I do not know if this is possible. Any ideas?

Thank you,
Tim


Tim,

System.Diagnost ics.Process is your friend... You can launch your app
and redirect it's stdout/stdin.

HTH
--
Tom Shelton [MVP]
Nov 20 '05 #2
* Tom Shelton <to*@mtogden.co m> scripsit:
I have a program that I had written in Managed C++ that writes
messages to the console while running.


System.Diagnost ics.Process is your friend... You can launch your app
and redirect it's stdout/stdin.


Something like that:

<http://www.mvps.org/dotnet/dotnet/samples/miscsamples/downloads/RedirectConsole .zip>

--
Herfried K. Wagner [MVP]
<http://www.mvps.org/dotnet>
Nov 20 '05 #3
Tim
Thank you both. Now I can get this working ;)

-Tim
Nov 20 '05 #4

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

Similar topics

14
2602
by: Pierre Rouleau | last post by:
I have a problem writing self-testable modules using doctest when these modules have internationalized strings using gettext _('...'). - The main module of an application (say app.py) calls gettext.install() to install the special _ function inside Python builtin. Other modules, taken from a general purpose collection of Python modules,...
4
23633
by: Rudolf | last post by:
Is it possible to add a vb.net source code module to a c# project and if so how? Thanks Rudolf
2
1100
by: Loyd Christmas | last post by:
As a non-techie, I am curious if my developers can mix VB.Net and C# in the same project and be OK. Seems to be some disagreement here.
11
1480
by: gg | last post by:
Hi, I'm sure this must be one of the most popular questions... I've developed the application in VB and have some C# code which I want to incorporate. Visual Studio seems to allow you either a VB or C# project, neither of which can contain files from the other language. The official method of combining languages is to create two...
7
1489
by: BK | last post by:
I have a .NET project named FormattedOuput with output type set to Class Library. In it, I have a source file named ExcelOutput.Vb. This class produces an Excel object and manipulates it based on some input I provide. It works fine and has been fully tested. Meanwhile, another programmer was writing a source file named RTFOutput.Cs, a C...
28
3052
by: ziman137 | last post by:
Hello all, I have a question and am seeking for some advice. I am currently working to implement an algorithmic library. Because the performance is the most important factor in later applications, I decide to write it in C instead of C++. However, I thought it might be convenient to use some C++ code at some misc places. I'm aware...
3
2088
by: jason | last post by:
I've been working with C# for over a year now without touching vb.net code. I had a few light years of vb.net before that. No real vb6 or windows form experience. Suddenly, I have an assignment where I've been asked to create a few new pages on an exsisting website. The website is written in vb.net with vb.net codebehind and classes. My...
2
1057
by: Newbie19 | last post by:
I was wondering what is the best concept or idea to mixing visual basic with ASP.net page that runs a SQL query on a database. The Visual Basic would be pulling data from another source that is not a database and needs to place the data results along with the SQL Query results. Any advice would be helpful. Thanks.
6
2016
by: =?iso-8859-1?B?QW5kcuk=?= | last post by:
I've encountered a problem using gettext with properties while using a Python interpreter. Here's a simple program that illustrate the problem. ============== # i18n_test.py: test of gettext & properties import gettext fr = gettext.translation('i18n_test', './translations',
0
7497
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
1
7530
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
7862
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
6119
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
1
5414
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
3530
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
1994
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 we have to send another system
1
1111
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
812
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 can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

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.