|
I was just asking for info's sake. I think I will use the library you suggested.
|
|
|
|
|
An alternative to the previously mentioned SharpZipLib is DotNetZip[^]. I worked with it on a recent project and found the API a little bit easier to understand and use.
|
|
|
|
|
SharpZipLib and DotNetZip as suggested before are probably your easiest bets, but since you asked, yes the .Net framework does have built-in classes for handling zip files. However, they are J# classes and use java.util.zip. Here's an article on using the J# classes in a C# application: http://msdn.microsoft.com/en-us/magazine/cc164129.aspx[^]. Don't blame me. I voted for Chuck Norris.
|
|
|
|
|
Gentleman,
I have an application that stacks a series of tab pages. On one tabbed page that has a Data Grid, I have a select link that extracts data from the Grid View and uses it to run an SQL query and then loads the information into a form that is in another tabbed page. To view this page automatically, I am using the following code:
string thisItem = string.Empty;
int row = this.dataGridView1.CurrentCell.RowIndex;
if (this.dataGridView1["Id", row].Value.ToString() != "")
{
thisItem = this.dataGridView1["Id", row].Value.ToString();
}
MethodA(thisItem);
tabControlB.BringToFront();
tabControlB.SelectTab(1);
It seems I used this code before, but now I cannot get control tabControl B to load on top. I have tried loading the tabControl from both inside and outside (pictured) the Method. I have done a line by line debug and there are no errors.....just no results...any ideas? Thank you, Pat
|
|
|
|
|
I believe it should be
tabControlB.SelectedItem = 1; .45 ACP - because shooting twice is just silly ----- "Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997 ----- "The staggering layers of obscenity in your statement make it a work of art on so many levels." - J. Jystad, 2001
|
|
|
|
|
Thank you for your suggestion, John. Unfortunately, that does not work either. I don't think the issue is as much with the tab as it is with the top loading. The "BringToFront()" property does not seem to be working. I am using the [.SelectTab()] property in other places and the syntax is correct according to the intellisense. It has 2 overloads for either a string (Name) or Integer (Index). Of course, I would abandon it for anything else that works. If you come up with anything else, let me know. I appreciate your reply.
Best Regards, Pat
|
|
|
|
|
Well, if tabCopntrolB is a TabControl , my method should work. BringToTop() (it's a method, not a property) has nothing at all to do with selecting a tab..45 ACP - because shooting twice is just silly ----- "Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997 ----- "The staggering layers of obscenity in your statement make it a work of art on so many levels." - J. Jystad, 2001
|
|
|
|
|
Well, it does not work, John. First, you have to have the proper tab control on top so you can see it, which is why I am using BringToTop(). Yes, this is a Method, but my original question was why this is not working. I supplied the code I am using for this and I cannot understand the problem. THEN...once it is there, selecting the tab can be done, but not with "Selected Item", since that property does not exist in Tab Control (check it out). There is "Selected Index", "Selected Tab" and "Select Tab". That's it. Appreciate your input. Pat
|
|
|
|
|
Have you accidentally set the tabControlB.Visible property to False by any chance?
|
|
|
|
|
Way to go Rod!
Damn..I am walking though the house kicking myself in the Butt. I actually have not looked at this program for quite a while and I forgot the logic I used to load the pages. First, MAKE VISIBLE...then CHANGE Tab Controls...and THEN select the correct tab for the task. Actually, now all the original code works perfectly. Thank you for being able to see the obvious. Sometimes, I do not see the forest through the trees...LOL. I marked your answer as correct. Thanks again. Best Regards, Pat
|
|
|
|
|
Hello,
I need to get each pixel (as 1's and 0's) and package them as bytes. For example, I have a bitmap with a resolution of 64x64 pixels and convert it into an array of 512 bytes.
Sorry for the bad english
EDIT: I did forgot something. The solution for my problem was in this article[^].
modified on Saturday, April 24, 2010 10:12 AM
|
|
|
|
|
If it is that small, then why not just use Bitmap.GetPixel?
If you are doing a lot of them, or they are bigger you may have to directly access the bitmap bytes to save processing time.You should never use standby on an elephant. It always crashes when you lift the ears. - Mark Wallace
C/C++ (I dont see a huge difference between them, and the 'benefits' of C++ are questionable, who needs inheritance when you have copy and paste) - fat_boy
|
|
|
|
|
How to access directly to the bytes of the bitmap?
Through the Bitmap.LockBits() method?
The purpose of this conversion is to create binary images for use in programs for the Casio fx-9860G (graphic calculator)
|
|
|
|
|
Yes. If they are black and white, then specify the System.Drawing.Imaging.PixelFormat.Format1bppIndexed mode. You should never use standby on an elephant. It always crashes when you lift the ears. - Mark Wallace
C/C++ (I dont see a huge difference between them, and the 'benefits' of C++ are questionable, who needs inheritance when you have copy and paste) - fat_boy
|
|
|
|
|
See the link below.
It is a test image which I want to convert to binary image
I forgot to mention something. The binary image is to be used in C++ source files.
http://img176.imageshack.us/img176/744/boxm.png[^]
Here is the expected result:
unsigned char box[27] = {
0xf8,0xff,0x3,
0x6,0x0,0xc,
0x1,0x0,0x10,
0x1,0x0,0x10,
0x1,0x0,0x10,
0x1,0x0,0x10,
0x1,0x0,0x10,
0x1,0x0,0x10,
0x1,0x0,0x10 };
|
|
|
|
|
ant-damage wrote: The binary image is to be used in C++ source files.
Does this mean that you want to use this as an image in your application - for a button or other control? Because if so, you don't have to convert it to binary.You should never use standby on an elephant. It always crashes when you lift the ears. - Mark Wallace
C/C++ (I dont see a huge difference between them, and the 'benefits' of C++ are questionable, who needs inheritance when you have copy and paste) - fat_boy
|
|
|
|
|
I want to use it as a sprite for my CASIO fx-9860G calculator. It is to be used in add-ins.
|
|
|
|
|
I've now created a class that can convert bitmaps (*.bmp; *.png) to binary images (0xFF 0x89 0x78 0x65), but now my problem is that some bitmaps have grey, and to display it on a B&W LCD I need to emulate the grey effect by using double-buffering (I've mastered the double-buffering issue).
Both buffers are displayed to the screen with an especial delay, to created the grey effect.
|
|
|
|
|
|
Your memory is completely fading now, he wants binary, not grayscale.
|
|
|
|
|
My memory may be failing but last time I checked that article provided a fast way to get all pixel information as well as write out said pixel information. The actual grayscale conversion is trivial when compared to the rest of the code. And if I recall the question, it was how can I quickly ... which the article addresses. As for binary image that is an exercise left to the reader. But then again, if you keep the gray scale logic you can then apply your threshold statement and get the binary result as well.
|
|
|
|
|
Of course.
BTW: he may be needing a dynamic threshold to get acceptable results on more difficult images, e.g. when luminance is varrying wildly.
|
|
|
|
|
Hi all,
Is it feasible to have a single DLL project which targets both .NET desktop and .NET CF through different configurations?
TIA!
|
|
|
|
|
I've never done it, but I can see problems with doing so. Since .NET CF is a subset of the full version of the framework, your .DLL would be limited to code, classes, and methods that only work and exist in the CF version of the framework. You'd be using the exact same .DLL for both devices.
So, just as a result from a thought experiment, I'd say no, you can't.
|
|
|
|
|
From Google and experiment, you can, because you can add a reference to a CF DLL to a full .NET project, so it is possible provided you only need to reference stuff from the CF.
|
|
|
|
|