I have the following code that generates a bitmap on which I'm drawing
a graph. The graph has one point for each minute in a day so the
bitmap is 1440 pixels in height. Therefore I'd like to place the
bitmap in a scrollable control. I tried with a panel
Panel panel = new Panel();
panel.Controls. Add(bitmap);
but it doesn't work. So, can anyone tell me how to do it or point me
in the right direction? Thanks :)
public partial class _Graph : System.Web.UI.P age
{
protected void Page_Load(objec t sender, EventArgs e)
{
DrawGraph();
}
void DrawGraph()
{
Bitmap bitmap = new Bitmap(500, 1440);
Graphics graphics;
graphics = Graphics.FromIm age(bitmap);
graphics.Clear( Color.White);
// Draw graph here
Response.Conten tType = "image/jpeg";
bitmap.Save(Res ponse.OutputStr eam, ImageFormat.Jpe g);
bitmap.Dispose( );
}
} 3 1726
You can probably try changing the style property on the panel and use
the css to specify scrollbars when size of control overflow ...
Mathias wrote:
I have the following code that generates a bitmap on which I'm drawing
a graph. The graph has one point for each minute in a day so the
bitmap is 1440 pixels in height. Therefore I'd like to place the
bitmap in a scrollable control. I tried with a panel
Panel panel = new Panel();
panel.Controls. Add(bitmap);
but it doesn't work. So, can anyone tell me how to do it or point me
in the right direction? Thanks :)
public partial class _Graph : System.Web.UI.P age
{
protected void Page_Load(objec t sender, EventArgs e)
{
DrawGraph();
}
void DrawGraph()
{
Bitmap bitmap = new Bitmap(500, 1440);
Graphics graphics;
graphics = Graphics.FromIm age(bitmap);
graphics.Clear( Color.White);
// Draw graph here
Response.Conten tType = "image/jpeg";
bitmap.Save(Res ponse.OutputStr eam, ImageFormat.Jpe g);
bitmap.Dispose( );
}
}
I'll try that, once I find a way to add the bitmap to the panel :)
Anyone?
On 3 Nov 2006 14:01:55 -0800, "donet programmer" <ar******@gmail .com>
wrote:
>You can probably try changing the style property on the panel and use the css to specify scrollbars when size of control overflow ...
Mathias wrote:
>I have the following code that generates a bitmap on which I'm drawing a graph. The graph has one point for each minute in a day so the bitmap is 1440 pixels in height. Therefore I'd like to place the bitmap in a scrollable control. I tried with a panel
Panel panel = new Panel(); panel.Controls. Add(bitmap);
but it doesn't work. So, can anyone tell me how to do it or point me in the right direction? Thanks :)
What is the problem? What do you expect and what do you observe?
--
Eliyahu Goldin,
Software Developer & Consultant
Microsoft MVP [ASP.NET]
"Mathias" <ne*@tak.duwrot e in message
news:s0******** *************** *********@4ax.c om...
I'll try that, once I find a way to add the bitmap to the panel :)
Anyone?
On 3 Nov 2006 14:01:55 -0800, "donet programmer" <ar******@gmail .com>
wrote:
>>You can probably try changing the style property on the panel and use the css to specify scrollbars when size of control overflow ...
Mathias wrote:
>>I have the following code that generates a bitmap on which I'm drawing a graph. The graph has one point for each minute in a day so the bitmap is 1440 pixels in height. Therefore I'd like to place the bitmap in a scrollable control. I tried with a panel
Panel panel = new Panel(); panel.Controls. Add(bitmap);
but it doesn't work. So, can anyone tell me how to do it or point me in the right direction? Thanks :)
This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: objectref |
last post by:
hi to all,
i have a picture box in a scrollable panel control.
I can drag and drop the picture box inside the panel to the correct position
by taking the MousePosition point and evauatint the relative edge of the
main form
So far so good.
The problem is that if i scroll down the panel a little, my picture box
cannot place itself
|
by: Brian Henry |
last post by:
Hello,
I want to make a control that has a scrollable Gantt type display (not
really one but will look similar to one) this is going to be custom drawn (i
already have the drawing procedure completed for the overriden onpaint
event) but the problem is this can be a very long scrollable viewport (part
that scrolls inside the control) while the control will be relatively
800x600 in size)... i tried to do this with a panel scrolling inside...
|
by: Hamed |
last post by:
Have I posted the message to wrong newsgroup?
Or
Does the question is so much strage?
Would someone please kindly direct me to a true newsgroup or resource?
Best Regards
Hamed
|
by: Dave Harvey |
last post by:
I have developed a standard .NET control which displays medical images and
works fine in applications, but increasingly, my customers are wishing to use
it in an ASP.NET environment, so I am looking to make a WebControl based
equivalent.
So, assuming that I need to render using HTML - how can I pass "bitmap" data
into such a control for it to be displayed. I'm open to all possible routes,
but I've not yet found one which works. Ideas...
|
by: Tina |
last post by:
I have a System.Drawing.Bitmap myImage;
I also have a webcontrols.Image on my web page.
I want to put the bitmap into the image but the image can only get it's
bitmap from ImageURL which can be a fileName or a webpage that writes. But
I don't want to have to write my bitmap to a file, I just want to put it
into the image.
Can this be done? It seams that an image control should be designed to that
it could accept a bitmap (duh) but I...
| |
by: =?Utf-8?B?U2hhcm9u?= |
last post by:
Hello,
I'm using a control (black box control) in my form (an ActiveX/Com control).
and I need to take the control as an image.
The controls is showing some kind of graph, and I want to create a bitmap
file out of this control, so the bitmap will show what the control is showing.
I tried this:
/////////////////////////////////////////////////////////////////
AxTheControl.AxControl ctrl = new AxTheControl.AxControl();
|
by: Rune Jacobsen |
last post by:
Hi all,
In my project I have a control (described in an earlier post) which
basically consists of three "subcontrols": One big area where the vital
data is displayed (scrollable, since it will usually be larger than the
window containing the parent control), a time strip on top of it, and a
resource list on the left. Long story short - when someone scrolls the
scrollable data control, the time strip and resource lists are hooked to
keep...
|
by: MikeB |
last post by:
Hello All, want to be able to pull images from the database and load them
into a bitmap through a stream which I have working. I then want to take
the bitmap and load it into a Image control without haveing to save the
bitmap as a file. Is this possible? Currently, I just display the bitmap
by calling Bitmap.save however, if users do not know to click the image they
can not see the full size. If I can create a bitmap from the stream I...
|
by: LonelyRanger |
last post by:
Hi Everyone,
Thanks for your time. My question is based on VB.NET, pictureboxes and a scrollablecontrol.
I have several pictureboxes inside a scrollable control. The scrollablecontrol is docked to form1. When i resize the form, then scrollablecontrol resizes aswell. What i need is for the pictureboxes to set themselves up so that they wrap again according to the available width of the scrollable control. I have it already...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
| |
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
| |
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |