|
I just referenced the commbase.dll and added using JH.CommBase. Then inherited from CommLine and hooked into the NewLineCallback event which gave me a callback every time a new line was received. I'm sure that you don't have to take input a line at a time.
|
|
|
|
|
VB.net and C# use the same runtime libraries and are almost entirely interchangable with keyword subsitutions. THere're a number of programs available that do the conversion automatically.
|
|
|
|
|
|
Hi,
In a small Windows Application, I am using UnhandledExceptionEventArgs to trap any UnhandledExceptions and display a friendly messagebox to the user. In this eventhandler, I am just 'eating' off the exceptions to 'Debug.WriteLine()'.
But whatz happening is -- The JITer (JIT Debugger) first traps and tries to debug the exception and only on click of Cancel for JITer prompt, my messagebox comes up.
How to disable this debugging prompt? The Windows application should not get wired up to any debugger.
Vasudevan Deepak Kumar
Personal Web: http://www.lavanyadeepak.tk/
I Blog At: http://deepak.blogdrive.com/
|
|
|
|
|
Crystal reports doesn't support MySql for reporting, is there some reporting tool that does? I have to use it througgh .NET with MySql...
Thanks in Advance...
- A programmer's national anthem; "AAAAAHHHHH!!!!"
|
|
|
|
|
This is a C# 2005 Problem:
I have an MDIForm and 5 child forms in my project. what i have to do is, during MDI Form's "MdiChildActivate" event I have to set some value to private a variable in my active child form. But when i write a statement like this : this.ActiveMdiChild.childVariableMode="0";
I get an error-"No defination For childVariableMode found in activemdichild". In vb.net i can do this by:
dim a as object
a=me.ActiveMdiChild
a.childVariableMode="0"
But i C# if i do same as VB.NET i get the same error, please solve my problem.I am in very hurry, my whole project is depended on this.
Thanks in Advance.
Sheel
Sheel Gohe
Sheel Gohe
|
|
|
|
|
The best way is to cast ActiveMdiChild down to the class which has the childVariableMode variable. If ActiveMdiChild can be one of several classes, where only some have the variable defined, then your best bet is to declare a base class from which all MDI children derive from and place the childVariableMode variable in the base class.
A quick hack would be to use reflection to do what you want. Simply query for the variables in the object using the variable name ("childVariableMode") and then set the value of the variable.
Regards
Senthil
_____________________________
My Blog | My Articles | WinMacro
|
|
|
|
|
The ActiveMdiChild property returns a Form object which contains no definition for childVariableMode. To access this variable you have to cast the returned form object to one of your child form types.
Because you don't know which one is currently the active child, you need a way to treat all child form types equally.
One possibility is to define a common base type for all child forms which contains the childVariableMode property and then cast the return value of ActiveMdiChild property to this type.
Another way is to define an interface with the childVariableMode which then gets implemented by all child forms and in this case cast the return value of ActiveMdiChild property to interface type.
www.troschuetz.de
|
|
|
|
|
I am writing an interpreter for a language of my own language. It will be basically a command line application. What if I wanted to embed it in a Windows application?
I don't know how to creat a command line application which I can integrate with other windowns form application. CAn anyone help me with any tutorials with that purpose?
AMit
|
|
|
|
|
I don't know if you're expecting the actual command line shell (cmd.exe) to be embedded in an application. If you just want the UI, this[^] might help.
Regards
Senthil
_____________________________
My Blog | My Articles | WinMacro
|
|
|
|
|
Dear Senthil,
Thanks for your reply. In fact your code is my inspiration. I just don't want a command line interpretor like cmd.exe.
I want a more powerful add-in components. I am trying to write a computational software. My idea is something like this.
>> A=[1,2,3;3,4,5;6,7,8];
output should be displayed in the command prompt
A=[1,2,3;<br />
3,4,5;<br />
6,7,8];
This should define a matrix A .
>>Inverse(A)
this should call function Inverse and display the result from the function Inverse.
So, i want to know how modification I need to make in your code to understand these kind of commands at my command promt in the software.
Regards,
Amit
|
|
|
|
|
The control that I wrote takes care of the UI part. What you do in response to user commands is up to you.
You need to subscribe to the CommandEntered event, there, you'll get the command the user entered (in your case, Inverse(A)) as part of CommandEnteredEventArgs . You can then do whatever processing you want and print to the console using the WriteText method.
Regards
Senthil
_____________________________
My Blog | My Articles | WinMacro
|
|
|
|
|
Dear Senthil,
Thanks a lot. I think your last message cleared almost everything I wanted to know.
Right now, I am trying to understand your code. The command promt control tool, you have designed , is it a multiline textbox control? I wanted to fundamental building unit of the command promt you have used to make the shell command.
Regards,
Amit
|
|
|
|
|
Yes, it is a multiline textbox. The code is not that big, you should be able to quickly understand what's going on. I only hope you're not planning to write your own user control, because then the purpose of me writing a user control will be lost
Regards
Senthil
_____________________________
My Blog | My Articles | WinMacro
|
|
|
|
|
Thanks Senthil! As a matter of fact, I want to use your control for one of my applications. But I have seen one problem with that, I can't come out of the directory in which the testapp.exe is staying, i.e. as I start the application and type the following command.
>>> cd ..
it does not work. I woudl like to hear from you before I get into your code and figure out what is going on. And also I had asked this question in the forum and Nobody could answer me. Can I change the opacity of the control?
Regards,
Amit
|
|
|
|
|
amitmohanty wrote:
As a matter of fact, I want to use your control for one of my applicatio
Great
amitmohanty wrote:
I can't come out of the directory...
That's because the sample application that uses the control spawns a new shell (cmd.exe) for every command, so it doesn't remember previous commands. Hitting cd.. will make the current cmd.exe go up one directory, but then the next dir will run on a new cmd.exe and therefore would show the same directory.
If you want to, you can spawn a single cmd.exe and redirect output/input to just that single exe, that would do what you want.
amitmohanty wrote:
Can I change the opacity of the control?
I don't know if we can modify opacity for individual controls within a window, but you can try pinvoking SetLayeredWindowAttributes /
Regards
Senthil
_____________________________
My Blog | My Articles | WinMacro
|
|
|
|
|
|
Thanks Zitniet
|
|
|
|
|
Does anybody know a quick routine to convert from numbers like "1000$" to "One thousand dollars"?
I need this to print invoices
Thanks in advance
|
|
|
|
|
Please don't post to every forum on the site. This is a common piece of homework, and so I'm sure you could find some code with google, although it's pretty straightforward to write. ( Yes, I understand you're saying it's not homework, I'm saying the fact that it often is increases the odds of a snippet existing online )
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
What happened to sharing?
I know it is straight-forward and I know it is given as homework to university students, but also know it will waste my time since it only deals with the basic programming operations...I'm trying to avoid going deep into things that are easy and take up a lot of time and was wondering if somebody could help...Right now i'm swammed in datagrid lousy events and too much SQL problems, I'd rather stick my nose into something else...that's all...
|
|
|
|
|
Please send me your email i will send you an example numbers to letters. Ok
....
Muhamad Waqas Butt
waqasb4all@yahoo.com
|
|
|
|
|
|
ok All Right Buddy.....
Muhamad Waqas Butt
waqasb4all@yahoo.com
|
|
|
|
|
Hadi Fakhreddine wrote:
What happened to sharing?
What do you mean ?
Hadi Fakhreddine wrote:
but also know it will waste my time since it only deals with the basic programming operations...
I don't *have* an example here, I was just suggesting that you would find one easily. If I had one, I would have posted it. I see you followed my advice anyhow, and found an example online.
Christian Graus - Microsoft MVP - C++
|
|
|
|