|
OK, it's an ASP.NET question. You should ask those in the ASP.NEt forum, or at least make that clear.
Why on earth would you send a BMP through a web page anyhow, when gif and jpg are smaller ? I would not be surprised in the browser does not support them, I think BMP is a windows format ( it's raw data with a header which I think is Windows specific ).
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 )
|
|
|
|
|
I have seen that a way to make dynamic images is to use an aspx page with a Response.OutputStream and then assign that page as the ImageUrl in a Image Component. It works for JPEG and GIF. My problem is transparency. JPEG and GIF output results in a black background.
I guess I could ask, how do I get the background of my outputed JPEG or GIF image to be transparent?
Or do you know another way to make my own image and output it on a custom control?
And I did forget to mention it is a ASP.NET app, so keep that in mind.
The only way to speed up a Macintosh computer is at 9.8 m/sec/sec.
|
|
|
|
|
There certainly is no transparency support in BMP. I believe PNG is the only format that has transparency built 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 )
|
|
|
|
|
.NET has a method MakeTransparent(Color), when you use that method it simply doesn't draw the pixels with the color passed to MakeTransparent.
I have another idea. How can I pass a Color from one page to another?
The only way to speed up a Macintosh computer is at 9.8 m/sec/sec.
|
|
|
|
|
Ok, I made a variable and it always used the default I set to it since I commented out a line for testing. I uncommented have it works. Those are the errors I love!
The only way to speed up a Macintosh computer is at 9.8 m/sec/sec.
|
|
|
|
|
Hi all,
i have two classes(one for form that i draw on it,
and other class)
so i want to make invalidate in the first class to draw by
onpaint method in the first class
Generator
|
|
|
|
|
Can't be done. Instead, create a delegate between the classes, so the class that forced invalidation either calls a method that calls invalidate in the second class, or passes it's graphics object to the second class for painting. You can't make the event args in the second class contain the graphics object of the first class.
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 )
|
|
|
|
|
how can i create like a beep sound, but make it play through the speakers and not the computer's internal speaker? (so, obviously, Console.Beep() is not what i need).
|
|
|
|
|
You can P/Invoke MessageBeep() . The declaration can be found on pinvoke.net, for example.
Regards,
mav
--
Black holes are the places where God divided by 0...
|
|
|
|
|
But those are just system sounds...how can i create my own sound?
|
|
|
|
|
Ok, if the standard beep isn't good enough for you , you can still use the System.Media.SoundPlayer class.
Regards,
mav
--
Black holes are the places where God divided by 0...
|
|
|
|
|
Again, i don't want to load an external file, i want to CREATE a sound at runtime
|
|
|
|
|
If you said precisely what you want and what you don't want we wouldn't have to guess...
Anyway, in that case you should start reading about the WAV format. Basically you create a buffer for the audio data, write a WAVEFORMAT (look it up in MSDN) to it and add the samples you want to play. That's the most flexible you can get.
Regards,
mav
--
Black holes are the places where God divided by 0...
|
|
|
|
|
sharpiesharpie wrote: how can i create like a beep sound, but make it play through the speakers and not the computer's internal speaker?
Is this article on a simple beep[^] what you are looking for?
|
|
|
|
|
i have Byte[]
and i want to convert it to image ( using System.Drawing )
how that can be done
thanks
|
|
|
|
|
Just a guess:
using (MemoryStream memoryStream = new MemoryStream(bytearray))
{
Image image = Image.FromStream(memoryStream);
}
"Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning." - Rick Cook www.troschuetz.de
|
|
|
|
|
it really works... good guess
thanks allot
|
|
|
|
|
Hi,
I go through a collection of toolstripmenuitems and if its the correct item, i set it to be checked.
foreach (ToolStripMenuItem sortItemDropDown in sortItem.DropDownItems)
{
if (sortItemDropDown.Name.Equals(tickSortBy))
{
sortItemDropDown.Checked = true;
}
}
The problem is that the sortedItem.DropDownItems has a Seperator in it, thus i get an exception telling me i cant convert a seperator to a menuitem. Is there a work-around ?
Regards,
Gareth.
|
|
|
|
|
In the foreach loop use the common base type ToolStripItem and only cast to a ToolStripMenuItem if the current item is really a ToolStripMenuItem .
foreach (ToolStripItem sortItemDropDown in sortItem.DropDownItems)
{
if (sortItemDropDown.Name.Equals(tickSortBy) && (sortItemDropDown is ToolStripMenuItem))
{
((ToolStripMenuItem) sortItemDropDown).Checked = true;
}
}
"Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning." - Rick Cook www.troschuetz.de
|
|
|
|
|
|
You can check on the type of the toolstripmenuitem. For the separator this is System.Windows.Forms.ToolStripSeparator.
|
|
|
|
|
I'm not sure about your problem, but may I ask, why not use .NET remoting? Remoting is built atop sockets, yet abstracts away the underlying byte transfers, allowing you to simply call theServer.DoSomething() on the client, or call client.DoSomethingElse() from the server.
|
|
|
|
|
Hi there,
i wonder if there is a way to include the windows-explorer in your own application.
i need the abilty to show some folders with files in my app and it´s quite a lot
of work to do the stuff with the ListView control.
is there any way to include windows explorer in my app? maybe through some kind of
activex?
thanks
jkersch
|
|
|
|
|
C# File Browser[^]
"Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning." - Rick Cook www.troschuetz.de
|
|
|
|
|
I am implementing a custom IExtenderProvider derived class so I can dynamically set the following properties on a control:
Required (using an ErrorProvider)
Description (ToolTip)
Errors (using an ErrorProvider)
Caption
I have everything working except for the caption. Ideally, I would like to add a Label control to the form for the given UI element. I know how to draw the label text myself, but that doesn't give me any of the accessability features that I gain when using a label.
The problem I'm running in to is that I can get the label to appear at design time but not at run time. Essentially, when I detect that a new control has been added I try to add a new label control (positioned appropriately) to the parent's Controls array. This works fine at design time but at run time the Parent property of the control I'm extending is null.
I'm trying to do this using an IExtenderProvider so I don't have to create subclassed versions of the UI controls to add a caption. In case you want the background, the project I'm working on needs to allow a dynamically rendered UI based on various pieces of meta data contained in the business object. The business object can be customized by the end-user through an admin interface, so I will never know what fields will be present and what their captions should be until it is time to actually render the screen.
Has anybody done anything similar to this? I've pretty much exhausted the information available on Google, which isn't much beyond creating a simple provider.
-----------------------------
In just two days, tomorrow will be yesterday.
|
|
|
|