|
Yup! I'm with you and had done that.
|
|
|
|
|
I have an aspx page with controls on it and then a webcontrol on it.
The webcontrol needs to change the value from one of the controls on the parent.
When I just try to refer to the control by its name I get the following error - "The name 'UltraWebTab1' does not exist in the current context"
I'm assuming thats because the UltrawebTab1 is on the aspx page so the ascx doesnt know about the UltrawebTab1.
I know theres a way to do this but I must br using the wrong terms when I google. Whats the mechanism to do that ?
|
|
|
|
|
My first thought is to create a delegate in the web control with a listener on the web page. i.e. raise an event in the control that the page handles.
|
|
|
|
|
Hello
I tried converting a 24bpprgb format image into 8bpp grayscale format… the code compiles well…it even saves the resulting 8bpp image but still the image is not gray scale rather it has some colors in it… would any one pls help… the code that I tried is kind of like this
code:
BitmapData b1 = b.LockBits(new Rectangle(0, 0,b.Width, b.Height), ImageLockMode.ReadWrite, PixelFormat.Format24bppRgb);
Bitmap newB = new Bitmap(b.Width,b.Height,PixelFormat.Format8bppIndexed);
BitmapData b2 = newB.LockBits(new Rectangle(0, 0, newB.Width, newB.Height),ImageLockMode.ReadWrite,PixelFormat.Format8bppIndexed);
int stride = b1.Stride;
int stride2 = b2.Stride;
unsafe
{
byte* ptr = ( byte *) b1.Scan0;;
byte* ptr2 = (byte*) b2.Scan0;;
int offset = stride - b.Width * 3;
int offset2 = Stride2 - newB.Width;
byte blue, red, green;
for (int i = 0; i <b.height; i++)
="" {
="" for="" (int="" j="0;" <="" b.width;="" j++)
="" blue="ptr[0];
" green="ptr[1];
" red="ptr[2];
" ptr2[0]="(byte)" (.299="" *="" +="" .587="" .114="" blue);
=""
="" if="" (ptr2[0]="" ptr3[0]="0;" if(ptr2[0]="">128)
ptr3[0]=1;
ptr+=3;
ptr2++;
}
ptr += offset;
ptr2 += offset2;
}
b.UnlockBits(b1);
newB.UnlockBits(b2);
newB.Save(@"C:\ima1.bmp");
Waiting for reply … thanx
haseeb
|
|
|
|
|
Just because it's 8bpp doesn't mean it's greyscale. 8bpp means you have 255 possibilities of colour. You need to convert it to greyscale manually.
|
|
|
|
|
IF you're saving it as 24/32 bits per pixel you need to set the all 3 of the RGB bytes to the gray value. If you're saving as an 8bit image, IIRC you need to provide a pallet in the file to define the color mapping to be anything except the default colors.
--
Rules of thumb should not be taken for the whole hand.
|
|
|
|
|
hello... i get the idea but don't know how to provide a palette and yeah how to do the mappin in palette... would u plz provide snippet...
thanks for the replay and still waiting for one
haseeb
|
|
|
|
|
Use google to find one. The last time I did anything like this was over a decade ago using turbo pascal for dos.
--
Rules of thumb should not be taken for the whole hand.
|
|
|
|
|
What on earth is ptr3, a conversion to monochrome ?
The issue is, you are doing the right conversion, but for 8 bit, you need to put those colors into the palette, the value you're inserting into the bitmap is not a colour, but an index into the palette. Change the palette to go from 0,0,0 to 255,255,255, and then this code will work, as the paletter will map directly to the numbers you're passing in.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
hello... sorry for the ptr3... my mistake... i pasted the code from ide and forgot to remove the junk code....
thanx for the reply.... i am getting the idea that u are trying to give but still don't know how to manipulate the palette... would u please provide a snippet... I am a bit new to dealing with images in C#...
Thanx
haseeb
|
|
|
|
|
|
Hi,
I have a solution with a web site and a DLL project.
Under my web site I add a reference to an external web service and I get my web reference displayed under App_WebReferences with a .discomap file and a .wsdl file.
I do the same under my DLL project and I get a web reference but there are no files listed, just an icon rather than the files!
If I then go into my web site's code, I can reference the web service just fine. If I go into my DLL project's code, I cannot reference the web service.
What's going on?
|
|
|
|
|
How about generating proxy class from webservice and add it to DLL Project?
- Go To "Visual Studio .NET 2003 Command Prompt"
- Type wsdl "http://a.b.c/webservice.asmx" (note: Type the exact URL of webservice. And C# is default. If you wanna generate VB.NET Proxy then please specify " /language:vb" )
- Hit "Enter"
[The proxy will be generated for your webservice. So, Add this file to your DLL project. Then, use it. ]
Hope it would help..
Let me know the result..
Thanks and Regards,
Michael Sync ( Blog: http://michaelsync.net)
If you want to thank me for my help, please vote my message. Thank you.
|
|
|
|
|
Thanks, worked great!
Wonder why it didn't work so well by adding it from solution explorer?
Visual Studio 2005 by the way.
|
|
|
|
|
>>Wonder why it didn't work so well by adding it from solution explorer?
I'm not very sure about it. maybe, your Visual Studio has some problems.
AFAIK, Adding web ref from solution explorer and generating proxy manually are the same.. When we are adding webref from solution explorer, VS IDE automatically generate the proxy class.
Thanks and Regards,
Michael Sync ( Blog: http://michaelsync.net)
If you want to thank me for my help, please vote my message by clicking one of numbers beside "Rate this message". Thank you.
|
|
|
|
|
I want to create an email and send it from a C# desktop app. I am using VS2003 and have .net 1.1.4322.
What namespace would I be using? I have tried System.Web, but Mail is not there.
Is this even possible?
Thanx in advance!
Jude
|
|
|
|
|
|
Hmmm....I looked at all of the classes...I don't see anything that does the job there.
Jude
|
|
|
|
|
For .NET 1.1 it's in the System.Web.Mail namespace but you have to have a reference to System.Web.dll.
|
|
|
|
|
|
How do I import or reference that into an .exe? When I use using System.Web.Mail, I get a compiler error "Mail does not exists..."
Thanx for the replies!
[ EDIT ]
Played around and found it!
Thanx for all the help!
-- modified at 15:32 Thursday 22nd February, 2007
Jude
|
|
|
|
|
I am writing a small utility to retrieve all classes and methods from .NET assemblies, using reflection.
Is there a way I can retrieve the XML comments associated with the classes as well as methods? I have seen few websites displaying the .NET classes, methods and a short desription. I am pretty sure they did not hand type those descriptions for those thousands of methods!
Any help would be appreciated.
|
|
|
|
|
I was under the impression that the comments would be stripped out by the compiler. If you inspect the assembly in ILDASM, you would not see the xml comments.
- Malhar
|
|
|
|
|
T John wrote: I am writing a small utility to retrieve all classes and methods from .NET assemblies, using reflection.
Is there a way I can retrieve the XML comments associated with the classes as well as methods?
No. Comments are not saved in the compiled assembly. Any documentation found in the source code would normally be saved to a seperate XML file to be used with Intellisense or some other documentation tool. If all you have is the assembly .EXE or .DLL file, there are no comments to get.
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
As mentioned, it's not possible.
But if you for some reason need a sort of runtime documentation reading you can create your own attribute classes and apply them to methods and read them using reflection.
|
|
|
|