|
like the title:
I use DataTable to set windows form datagrid datasource ,
i want to create a summary Row for windows form datagrid,
but i donot know how to do it?
who can give me a example using C#??
thank you very much??
|
|
|
|
|
What do you mean by summary row? You mean you wanna filter your datatable?
tablename.DefaultView.RowFilter = "filter expression";
Mazy
No sig. available now.
|
|
|
|
|
This has been asked before, and as I told the previous person, you should consider using Label controls below the DataGrid . If you have a data-bound DataGrid and programmatically add a row, you must do so to the DataGrid.DataSource , which will add the row. If you then update that data source (say, to a database or XML file), it will contain that summary row. This is hardly what you want, I assume.
So, just use some values below it. That's what we do in our application, and there are many other benefits as well. First, it separates the summary of columns making it easier to see, and it doesn't scroll or resize like a DataGrid could, thus hiding certain summations. Second, one rarely needs to summarize ALL fields (for example, how would you summarize a name field for a person, company, etc.?), so just include enough labels to summarize what you need.
To summarize columns, just enumerate the rows and keep track of what you need to, then assign that value (or whatever) to a label that shows the value (or, if you use one label for the text label and value, use String.Format or something to assign the "Label: Value", "Label=Value", or whatever format to the Label.Text property).
-----BEGIN GEEK CODE BLOCK-----
Version: 3.21
GCS/G/MU d- s: a- C++++ UL@ P++(+++) L+(--) E--- W+++ N++ o+ K? w++++ O- M(+) V? PS-- PE Y++ PGP++ t++@ 5 X+++ R+@ tv+ b(-)>b++ DI++++ D+ G e++>+++ h---* r+++ y+++
-----END GEEK CODE BLOCK-----
|
|
|
|
|
hi
I get everytime a Exception error shortly after successfully compiling
i just get it, when the compile mode is on release and not debug
this is the error (translated by me, orign was german):
An not controlled Exception of the type 'System.ArgumentException' occurred in system.drawing.dll.
Additional Information: false paramter used.
that's the error, even before Form1_Load can happen
the disassembly also tells me something
Adress: System.Drawing.Bitmap..ctor
and a yellow arrow is beside of the following line:
00000067 push dword ptr [ esp + 10h ]
posting the sourcecode is a very bad idea, more than 1200 lines in 5 different files and no part is highlighted when the eception occours
i hope anyone can help me with handling the error
|
|
|
|
|
beta3 wrote:
that's the error, even before Form1_Load can happen
It may happent in your InitializeComponent(),You may use some GDI+ there.
Mazy
No sig. available now.
|
|
|
|
|
thx, that was the error
and now everything is working
|
|
|
|
|
You sent some code for me. Where was the problem in your codes?
Mazy
No sig. available now.
|
|
|
|
|
there wasn't a real program, just a little mistake, because i forgot something
but i could solve it by myself
|
|
|
|
|
Hi,
Any ideas on how to exclude documentation of private and internal members
of the classes while generating docs from the "Tools|Build Comment Webpages.."
option of VS.Net?
Thanks,
Sridhar.
|
|
|
|
|
That utility sucks. Use a good - and free - one like NDoc[^]. A lot of people and companies use it. It can generate both HTML Help and Help 2 documentation (the latter is what VS.NET, MSDN Library, and a couple others use now), as well as a few other formats. By default, private and internal members are documented, but you can opt to include or exclude these individually (as well as protected and public members...and many, many other options!).
-----BEGIN GEEK CODE BLOCK-----
Version: 3.21
GCS/G/MU d- s: a- C++++ UL@ P++(+++) L+(--) E--- W+++ N++ o+ K? w++++ O- M(+) V? PS-- PE Y++ PGP++ t++@ 5 X+++ R+@ tv+ b(-)>b++ DI++++ D+ G e++>+++ h---* r+++ y+++
-----END GEEK CODE BLOCK-----
|
|
|
|
|
Hi Heath,
Thanks a lot for the info. i was trying to build the .sln provided by the
NDoc community but couldn't add the MSHelpCompiler.dll to the references.
Anyways, i installed it and could use it now; it's pretty cool.
thanks once again. if u have any idea of how to get the dll i mentioned plz
let me know.
i was busy with some thing else so couldn't let you know abt this early.
tks,
Sridhar.
|
|
|
|
|
Just use the 1.2 installation at http://ndoc.sourceforge.net/download.html[^]. We're always updating features and testing new things, and building any open-source project with the latest non-stable code is at your own risk. I even use the installation for my actual documentation and I actually write code for the project (though it's been a while).
-----BEGIN GEEK CODE BLOCK-----
Version: 3.21
GCS/G/MU d- s: a- C++++ UL@ P++(+++) L+(--) E--- W+++ N++ o+ K? w++++ O- M(+) V? PS-- PE Y++ PGP++ t++@ 5 X+++ R+@ tv+ b(-)>b++ DI++++ D+ G e++>+++ h---* r+++ y+++
-----END GEEK CODE BLOCK-----
|
|
|
|
|
Yeah, i am doing that.
Thanks.
|
|
|
|
|
Hi
I know...
...How to read the data of an image from a disk file and store it to an XML file after the data is encoded to base64.
The Problem is...
...To read an Image/picture object from a PowerPoint presentation and store the data (base64 encoded) in an XML file.
Thanks in advance
Mohammed Ali
2nd Flr, Gopur Apts,
Ghole Rd, Shivaji nagar,
Pune - 5. (MH) India.
|
|
|
|
|
Look over the PowerPoint and Office APIs. You could use VBA in PowerPoint to write a macro that does something like this. If you want to read-in the PPT from your program, you'll have to interop the PowerPoint and Office assemblies (there are PIAs - primary interop assemblies - for Office apps on Microsoft's site). You should then read the Office Programming documentation. If I remember right, you can also use the Microsoft.VisualBasic.Compatibility assembly (even from C# - it's just IL after all) to use the IPicture (or is it IStdPicture ? ...don't remember) if PowerPoint still uses that.
-----BEGIN GEEK CODE BLOCK-----
Version: 3.21
GCS/G/MU d- s: a- C++++ UL@ P++(+++) L+(--) E--- W+++ N++ o+ K? w++++ O- M(+) V? PS-- PE Y++ PGP++ t++@ 5 X+++ R+@ tv+ b(-)>b++ DI++++ D+ G e++>+++ h---* r+++ y+++
-----END GEEK CODE BLOCK-----
|
|
|
|
|
I have all the Office and other PowerPoint Interops added to my C# Library.
And I am able to read all the other shapes of PowerPoint and save to XML except the Images/Pictures.
I wanted to read the contents of the Images/Pictures that are available in the presentations and store the Base64 encoded data in XML.
Hope I made the issue a little clear now. Sorry for ambiguity.
Project Manager
INTRINSIC - An IMC Company
2nd Flr, Gopur Apts,
Ghole Rd, Shivaji nagar,
Pune - 5. (MH) India.
|
|
|
|
|
There was no ambiquity, I knew exactly what you were talking about. What I'm saying is that you should read the documentation for the property type that the image/picture properties return. That may have a Save method or something. Keep in mind, however, that you can't just serialize the type returned - you have to serialize the image represented by the property type, which is implementation specific. For example, I'm pretty sure you can save an image to a file but you might have to read that in and then base64-encode it. It probably supports writing to a stream, but this is a COM IStream , not a .NET Stream which works differently (so you'd have to define a COM-like IStream and implement that, perhaps wrapping the .NET Stream object).
What I can't figure out is how the Shape ties into this. Just looking at the interop assembly, it would seem that a picture is translated to a Shape, which might not preserve the actual image format (so, if you try to create an Image from a stream, it wouldn't work because it's no longer a JPG, BMP, GIF, etc.).
All I can say is read the PowerPoint and Office object model documentation. I couldn't find much, but I'm not sure I have the PowerPoint programming documentation installed (although I thought I specified a Complete install).
-----BEGIN GEEK CODE BLOCK-----
Version: 3.21
GCS/G/MU d- s: a- C++++ UL@ P++(+++) L+(--) E--- W+++ N++ o+ K? w++++ O- M(+) V? PS-- PE Y++ PGP++ t++@ 5 X+++ R+@ tv+ b(-)>b++ DI++++ D+ G e++>+++ h---* r+++ y+++
-----END GEEK CODE BLOCK-----
|
|
|
|
|
I have all the Office and other PowerPoint Interops added to my C# Library.
And I am able to read all the other shapes of PowerPoint and save to XML except the Images/Pictures.
I wanted to read the contents of the Images/Pictures that are available in the presentations and store the Base64 encoded data in XML.
Hope I made the issue a little clear now. Sorry for ambiguity.
Mohammed Ali
|
|
|
|
|
Hi
This is seema..I am intended to design user interface in C#.net for some hardware.For that I have to draw 24 filled rectangles on the form.I can do it simply using FillRectangle().But my aim is to draw one rectangle using some user defined function then when it will appear on the form then i want to copy it and past it on the form itself to creat more 23 rectangles and set there properties according to my wish(like length width and ID).Again I have to do specific event like mouse click event on those rectangles....So can anyone please suggest me how to do it?...I went through many site but not getting exactly what I want.PLZ PLZ tell me if anyone knows....
Regards.
Seema
seema kumari
|
|
|
|
|
Your question is not clear for me,You want those Rectangles for some copy/pasting,width prperties.... why don't you simply use TextBox. But what ever your task is,youcan create a Windows Control and derive it from Control or TextBox class,and add properties in that or customize their existing properties,then it is easy to have 24 of it and set properties for each of them.
Mazy
No sig. available now.
|
|
|
|
|
|
Hello buddies,
I have some important questions and will be thankful if you help me get answers soon and accurate:
If I develop a commercial control for .NET platform,
1. How can I protect my code inside the .dll assembly (MSIL) from being decompiled and visible? there are some softwares out there that can reverse engineer a compiled .dll into a good source code.
2. How they give license and perform protective actions for such controls while if anyone purchase it can give the .dll to friends and they use it wihout any payment.
(If somebuddy can give a good source on web about these sort of commercial related knowledge I really appreciate)
3. Is it possible to make a control not to obey its container transparency? I mean a control that can have any opaque value independent of it's container's opaque value.
---
"Art happens when you least expect it."
|
|
|
|
|
Den2Fly wrote:
2. How they give license and perform protective actions for such controls while if anyone purchase it can give the .dll to friends and they use it wihout any payment.
Search for LicFileLicenseProvider class.
Den2Fly wrote:
3. Is it possible to make a control not to obey its container transparency? I mean a control that can have any opaque value independent of it's container's opaque value.
Look for ControlStyles Enumeration.
Mazy
No sig. available now.
|
|
|
|
|
Den2Fly wrote:
1. How can I protect my code inside the .dll assembly (MSIL) from being decompiled and visible? there are some softwares out there that can reverse engineer a compiled .dll into a good source code.
Compilers that target the CLR ALL produce Intermediate Language, or IL. This - like Java bytecode - allows the system to JIT the IL to native code and execute it, so that it can be run on any OS (Microsoft's problem with .NET is that it relies too much on native OS resources, but it does provide a consistent UI). The Microsoft .NET Framework SDK even comes with a disassembler, ildasm.exe. For those of us who can read IL, we don't even need decompilers like .NET Reflector[^] (though it is nice at times!). There are just as many problems that can output this source code as well, although I have yet to see one that does an impeckable job with more advanced source code (using all the tricks of the languages).
All you can do - which is true of any program in any language - is make it hard and, therefore, costly to do so. I remember the words of Bruce Schneier with questions like these, who basically says that anything is crackable - it's just a question about the cost of resources to do so.
Make your program work well and hide your important code in complexity, or write native DLLs and P/Invoke or interop (use COM to make this easy) the functions and components in those native DLLs. Keep in mind, though, that they too can be decompiled (though decompiling C/C++ libs is more difficult, more expensive, and less correct than with IL and bytecode).
You can get obfuscators to obfuscate private members, but for every obfuscator there is a de-obfuscator (and they've really never stopped me - and I'm sure others - anyway, from seeing how something is done for academic reasons).
-----BEGIN GEEK CODE BLOCK-----
Version: 3.21
GCS/G/MU d- s: a- C++++ UL@ P++(+++) L+(--) E--- W+++ N++ o+ K? w++++ O- M(+) V? PS-- PE Y++ PGP++ t++@ 5 X+++ R+@ tv+ b(-)>b++ DI++++ D+ G e++>+++ h---* r+++ y+++
-----END GEEK CODE BLOCK-----
|
|
|
|
|
Maybe this is a dumb question Heath:
With ildasm.exe I can see functions and variables that are used in my assembly for each lines of codes,but not the VALUE of them. Does decomling with other tools are the same or they can show the value of them too?,for example Can I store a password in my codes in a varibale?
Mazy
No sig. available now.
|
|
|
|