|
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.
|
|
|
|
|
Plan your project with CF only. It will automatically work with full .net.
|
|
|
|
|
That's what I said.
Yeah, you can make a .DLL that will work on both, PROVIDED you don't use anything that won't work in CF. In that case, what's the point? All you're doing is writing code for the least functional framework. You're not actually targeting different frameworks. You're targeting the CF only, and the resulting .DLL just happens to work on the full .NET CLR.
|
|
|
|
|
Dave Kreskowiak wrote: what's the point?
Well, code re-use, ease of maintenance, etc etc etc. If you don't need anything that isn't in the CF then I would say there's a LOT of point, especially if like me you have classes and data structures that you need to use on both.
|
|
|
|
|
If only it was that easy. There's a LOT more to it than just adding a reference and making sure you don't call a method in the class that isn't supported on CF.
I'll leave it up to you to try a quick test and find out. It shouldn't take you but more than 20 minutes to put together a class in the full .NET class library project, then try it in a CF app.
|
|
|
|
|