|
As far as I know the namespace will just be Excel. I have similar code.
You can browse the generated interop assembly and look what's in there. That will give you a definitive answer.
Wout
|
|
|
|
|
Introps are wrapper classes. These helps your com component talking with your managed code. in visual studio when you create reference of excel it automatically generates introp files for you.
try removing and creating excel reference again, this might help you.
- ashish
|
|
|
|
|
Hi everyone,
For debugging purposes I would like to write text in the console. But I am not developping a console application, but a windows application.
Is it possible to open/start the console from a windows application? If yes, could somebody please tell me how and maybe provide some C# code snipped.
I have already tried Console.WriteLine, Debug.WriteLine, Trace.WriteLine but all that writes into the debug window, it dosn't start the console like in a console application.
Any hints and suggestions would be much appreciated!! I am also open for other suggestions as long as I don't have to write into a file.
Thanks!!!
Diego
|
|
|
|
|
Why not create a normal console application and then add any forms as resource or manually like so:
Form form1 = new Form();
form1.Show()
...
regards
modified 12-Sep-18 21:01pm.
|
|
|
|
|
Hi
Thank you for your suggestion. I guess I need to be more specific.
This is my code I need to enhance: (it is in a dll)
using System;
using System.Reflection;
using System.Xml;
namespace Tecan.XRE.Modules
{
public class Logging : Tecan.XRE.XreModule , ICaller
{
public Logging()
{
}
public void SendMessage( string msg)
{
Console.WriteLine("The message is:\t{0}", msg);
}
}
}
|
|
|
|
|
To get a console window, you need to have a console application. So all you have to do is to change your application to a console application, and you get a console window.
---
b { font-weight: normal; }
|
|
|
|
|
Simply set the project type to be Console Application instead of Windows Application. You'll get the console for free and everything will work just as expected.
-- LuisR
Luis Alonso Ramos
Intelectix - Chihuahua, Mexico
Not much here: My CP Blog!
The amount of sleep the average person needs is five more minutes. -- Vikram A Punathambekar, Aug. 11, 2005
|
|
|
|
|
I was wondering how to retrieve the input and output streams for an already spawned console application, using C#. I have read about anonymous pipes, and they seem to fullfill my wish, however, I haven't got a clue how to implement them in C#, and none of the articles about piping went about getting an input/output from an already spawned app.
Any ideas?
|
|
|
|
|
Hi.
This is article about redirecting stdout/stdin/stderr using Process class:
http://www.c-sharpcorner.com/References/System.Diagnostic.Process.asp
Maybe this helps.
Tadas Sukys
|
|
|
|
|
Yeah, I've played around with the Process class, and got that to work, however.. I need to bind the stdin/stdout/stderr from an already running console process..
I can't use the Process class in the way the article explained, because my console app spawns another console window, and closes the first one. The Process class doesn't capture the newly spawned shell..
|
|
|
|
|
Anonymous pipes (API functions) can be used in c# using DllImport attribute:
[DllImport("kernel32.dll")]
static extern bool CreatePipe(out IntPtr hReadPipe,
out IntPtr hWritePipe,
IntPtr lpPipeAttributes,
uint nSize);
[DllImport("kernel32.dll")]
static extern bool PeekNamedPipe(IntPtr hNamedPipe,
IntPtr lpBuffer,
uint nBufferSize,
IntPtr lpBytesRead,
IntPtr lpTotalBytesAvail,
IntPtr lpBytesLeftThisMessage);
http://www.pinvoke.net/ - PInvoke signatures.
Tadas Sukys
|
|
|
|
|
Ok, I'll check out that API function! Thanks!
|
|
|
|
|
Hi
Where can i find the list of methods that the user32.dll file contains
I also would like to see the explanetion for each method in the dll (what does it do and what is the parameters rules).
Thx Alex
|
|
|
|
|
|
|
Thx That is exectly what i was looking for
|
|
|
|
|
Hi,
I have an easy question which has driven me crazy for
the whole day?
How can I clear a Windows DataGrid?
I have tried:
dataGrid1.DataSource = null;
dataGrid1.DataMember = null
dataGrid1.SetDataBinding(null, "");
Nothing seems to be working.
|
|
|
|
|
u have a datatable dont u?
datatable.Clear();
|
|
|
|
|
I want to use all the records in the DataTable where the child0 = 'Integer' and Parent is not a 'Number', I am using the following code
string strFilter = "Child0='Integer' AND Parent<>'Number'";
DataRow[] foundRows = myDataTable.Select(strFilter);
but it throws an exception i.e. my syntax is not correct, can you please tell me which operator we use when we want to compare strings saying "NOT EQUAL TO"...
- A programmer's national anthem; "AAAAAHHHHH!!!!"
|
|
|
|
|
I see no syntax error in your filter expression.
Show more of the error message you get, like the name and error text of the exception.
---
b { font-weight: normal; }
|
|
|
|
|
Here's the code:
string strFilter = "(Child0 IS NULL OR Child0='$' OR Child0='Empty') AND (Child1 IS NULL OR Child1='$' OR Child1='Empty') AND (Child2 IS NULL OR Child2='$' OR Child2='Empty') AND Parent <> 'Empty'";
DataRow e_Rows = grammerTable.Select(strFilter);
Here's the exception that I get:
An unhandled exception has occured in your application, if you click
Continue, the application will ignore this error and attempt to continue. If
you click Quit, the application will be shut down immediately.
Syntax Error in the Lookup Expression: Expecting keyword 'Parent' followed by
a single column argument with possible relation qualifier:
Parent[(relation_name)].<column_name>.
[ Details ] [ Continue ] [ Quit ]
by the way, Is "Parent" a keyword?
|
|
|
|
|
I just checked it, "Parent" is definitely a keyword, but i cannot rename the column (I dont' have sufficient privilages to the database), how can I tackle the problem?
- A programmer's national anthem; "AAAAAHHHHH!!!!"
|
|
|
|
|
Try putting Parent inside square brackets: [Parent]
Absolute faith corrupts as absolutely as absolute power
Eric Hoffer
All that is necessary for the triumph of evil is that good men do nothing.
Edmund Burke
|
|
|
|
|
Thanks for help....
- A programmer's national anthem; "AAAAAHHHHH!!!!"
|
|
|
|
|
sorry the line DataRow e_Rows = grammerTable.Select(strFilter) is actually DataRow[] e_Rows = grammerTable.Select(strFilter) . I forgot to put the square brackets before...
- A programmer's national anthem; "AAAAAHHHHH!!!!"
|
|
|
|