|
I was looking to make one myself (perferably not asp .net, one to work with winforms) but thanks for the link.
|
|
|
|
|
Well then open an excel file binarily because you have formatting at the beginning.
And really is it worth the development time?
I'm not an expert yet, but I play one at work. Yeah and here too.
|
|
|
|
|
For me yes, it's just a little somthing a friend asked me to do for him so there is no real budget for it.
|
|
|
|
|
You have a number of options available to you :
- use Excel automation. After all, that's what it is for. Of course, this supposes the machine executing your code has Excel installed on it. To know the automation code, just record an Excel macro and translate the resulting VB code into C#. Simple and fast.
- Use ODBC / Excel and create a query that writes to a .xls file
- translate this tiny and fast code[^] into C#. (If you do so, remember to share it on CodeProject).
RSS feed
|
|
|
|
|
I build a C# user control,and use it on a .aspx
because I need a parameter from the request
how can I get the parameter and set it to my control ?
|
|
|
|
|
|
Hi List:
I have a 2 listboxes (removed item from one, goes to another one) like many 2listBoxes! I hope u get what I mean!
I cant do it correctly! it sis what I've done:
1_ Filled dataset by a DataAdapter!
2_ Made 2 DataViews
3_ Filter DataView1 to flag = 0(false)
4_ Filter DataView2 to flag = 1(true)
but it isnt work properly bc listbox.SelectedIndex is not equal with DataView Row Position!
What should I do to set this?!
Any help appreciated;)
Always,
Hovik.
|
|
|
|
|
Well I'm not an expert but I would say your sorting the listboxes when you should be sorting the dataviews. Never sort the list or combo when databinding, always sort the underlying data source or you answers get FOOBAR'd.
Also if one shows then the other are you creating 2 different views for that?
Just offer suggections no solid answers
I'm not an expert yet, but I play one at work. Yeah and here too.
|
|
|
|
|
Has anyone written a Windows Service that calls a custom DLL. I wrote the service in C# that responds to a timer every 30 minutes (this worked without any problems). Once I try and call my C# DLL which I striped down to the simplest form (it just writes an entry into the event log) it hangs and will not process. I have searched the web and MSDN and have found no answers. Any help would be greatly appreciated.
Mike.
|
|
|
|
|
What I'd do is attach to the service with a debugger and trace thru it.
I gather your C# service is an EXE, and it's connecting to a different C# DLL. Is the EXE built with a reference to the DLL, or are you trying to do something different? Do they exist in the same directory?
One possibility is there is some problem locating the DLL. There's a tool called FUSLOGVW that helps in tracking this sort of thing.
Another thing to check is what account the service is running under. Some accounts, like the XP local and network service accounts have enough privilidge to write to an existing event log source, but not enough to create a new source. Creating of the new source typically happens at installation time.
Hope some of that helps you.
Burt Harris
|
|
|
|
|
Burt, Thanks. I finally got it to work over the weekend. It had to do with the account the service was running under. Acts a lot differently from XP to NT.
|
|
|
|
|
I need a collection to point to individual items in another collection.
How would I write the ionline c++ code inside a c# function
Or can I write a c++ managed code function inside a dll and will it work with my c# application
I'm not an expert yet, but I play one at work. Yeah and here too.
|
|
|
|
|
Ista wrote:
I need a collection to point to individual items in another collection.
How would I write the ionline c++ code inside a c# function
Or can I write a c++ managed code function inside a dll and will it work with my c# application
Please redefine the question!!! Else the answer will be 42.
leppie::AllocCPArticle(Generic DFA State Machine for .NET);
|
|
|
|
|
I have a collection A which have the sam items in each collection
order detail class contains a detail description. In each detail description there is a collection ther we call collection A.
Well in order for the data grid to work I need to create a collection B inside order details class. In each item of collection b I want to simple point to the correct item of collection A.
nick
I'm not an expert yet, but I play one at work. Yeah and here too.
|
|
|
|
|
|
well if someone could help me with example on how i reference a collection item to another collection item I wouldnt resort to c++ pointers, but pointers are easy anyhow.
I'm not an expert yet, but I play one at work. Yeah and here too.
|
|
|
|
|
An object reference is a pointer to an object anyway, so:
If you want the entire collection B to be the same as collection A:
CollectionB=CollectionA;
If you want to only reference certain items from Collection A in Collection B, just add references to those objects to Collection B:
CollectionB.Add(CollectionA[index];
If you want to change items in Collection A, so that you're actually changing what's in Collection A, not just the objects themselves, the best thing to do is have Collection B store the indexes of the elements in Collection A, so that you can modify Collection A's contents based on the indexes stored in collection A.
"Blessed are the peacemakers, for they shall be called sons of God." - Jesus
"You must be the change you wish to see in the world." - Mahatma Gandhi
|
|
|
|
|
actually the second answer doesnt work because you cant reference an indexer. already tried that one
I'm not an expert yet, but I play one at work. Yeah and here too.
|
|
|
|
|
I wasn't talking about referencing an indexer - I was talking about a collection of indexes corresponding to the indexes of the items in collection A.
"Blessed are the peacemakers, for they shall be called sons of God." - Jesus
"You must be the change you wish to see in the world." - Mahatma Gandhi
|
|
|
|
|
jdunlap wrote:
If you want to change items in Collection A, so that you're actually changing what's in Collection A, not just the objects themselves, the best thing to do is have Collection B store the indexes of the elements in Collection A, so that you can modify Collection A's contents based on the indexes stored in collection A.
I mean yeah I could override the indexers to pass through but I don't like that pattern. I would much rather access an array of pointers instead. I mean that is simplistic c++ code rather than having object forwarding with extra type casting and the whole works.
I mean if I have to take the time to write a collection that then accesses another collection based on its index or an object type. Then theres much more debugging involved and if I do indexof then it compares objects and that defeats the whole purpose of it all. That and it involves more coding.
Using a collection or array of pointers doesnt create a mess of code and I can simply check the value to see if its actually pointing to a null address which is one line of code to debug. That and if the object is changed to be a new one the address wont repeat itself while an index could.
My thoughts and opinions about this whole thing.
So how do you declare a c++ code block in c#. I know its possible but dont know how to set it up?
nick
I'm not an expert yet, but I play one at work. Yeah and here too.
|
|
|
|
|
|
Well, if you really want to use pointers, you can do so in exactly the same way you would do it in C++, only when you declare a variable, you will want to add the fixed keyword to the variable declaration, to keep GC from moving the memory while you're still using it.
A method that uses pointers must have the unsafe keyword, or else the code must be in an unsafe block:
public unsafe void Foo()
{
}
...OR...
unsafe
{
}
You also must check the "allow unsafe code" option in project options, or compile with the /unsafe compiler option.
"Blessed are the peacemakers, for they shall be called sons of God." - Jesus
"You must be the change you wish to see in the world." - Mahatma Gandhi
|
|
|
|
|
thank you sir
I'm not an expert yet, but I play one at work. Yeah and here too.
|
|
|
|
|
|
its a bad link
I'm not an expert yet, but I play one at work. Yeah and here too.
|
|
|
|