I used the example on Bob Powell's site to draw a gradient on the background
of the parent form in my survey app. Now, I would like to have a logo
docked in the corner, but have the background of the logo be the gradient,
not the base color of the window. The logo is a gif set with a transparent
color. Any suggestions? 5 1049
"Martin Williams" <wi******@nospam.net> schrieb; Now, I would like to have a logo docked in the corner, but have the background of the logo be the gradient, not the base color of the window. The logo is a gif set with a transparent color.
Instead of putting a pixturebox onto the form, use the 'Graphics' object's
'DrawImage' method to draw the image on top of the gradient (similar to
drawing the gradient). You can use 'Image.FromFile' to load an image from
disk, .NET will draw the image transparently automatically.
--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://dotnet.mvps.org/dotnet/faqs/>
thanks, that did it. But, I have another Q...
On the last form of the survey, there are some textboxes. When the form is
activated, I set the focus to the "Finish" button to avoid seeing the
insertion point in the textbox right away. However, when I tab through the
controls, that first press of the tab button causes a momentary flicker on
the screen, then it goes away. Any idea on what causes that?
"Herfried K. Wagner [MVP]" <hi***************@gmx.at> wrote in message
news:%2****************@TK2MSFTNGP11.phx.gbl... "Martin Williams" <wi******@nospam.net> schrieb; Now, I would like to have a logo docked in the corner, but have the background of the logo be the
gradient, not the base color of the window. The logo is a gif set with a transparent color.
Instead of putting a pixturebox onto the form, use the 'Graphics' object's 'DrawImage' method to draw the image on top of the gradient (similar to drawing the gradient). You can use 'Image.FromFile' to load an image from disk, .NET will draw the image transparently automatically.
-- M S Herfried K. Wagner M V P <URL:http://dotnet.mvps.org/> V B <URL:http://dotnet.mvps.org/dotnet/faqs/>
One more question - is there a way I can get the logo that was drawn with
DrawImage to be in a relative position?
"Martin Williams" <wi******@nospam.net> wrote in message
news:CO********************@comcast.com... thanks, that did it. But, I have another Q...
On the last form of the survey, there are some textboxes. When the form
is activated, I set the focus to the "Finish" button to avoid seeing the insertion point in the textbox right away. However, when I tab through
the controls, that first press of the tab button causes a momentary flicker on the screen, then it goes away. Any idea on what causes that?
"Herfried K. Wagner [MVP]" <hi***************@gmx.at> wrote in message news:%2****************@TK2MSFTNGP11.phx.gbl... "Martin Williams" <wi******@nospam.net> schrieb; Now, I would like to have a logo docked in the corner, but have the background of the logo be the gradient, not the base color of the window. The logo is a gif set with a transparent color.
Instead of putting a pixturebox onto the form, use the 'Graphics'
object's 'DrawImage' method to draw the image on top of the gradient (similar to drawing the gradient). You can use 'Image.FromFile' to load an image
from disk, .NET will draw the image transparently automatically.
-- M S Herfried K. Wagner M V P <URL:http://dotnet.mvps.org/> V B <URL:http://dotnet.mvps.org/dotnet/faqs/>
"Martin Williams" <wi******@nospam.net> schrieb: One more question - is there a way I can get the logo that was drawn with DrawImage to be in a relative position?
You will have to listen for the window's 'Resize' or 'SizeChanged' event and
call the form's/control's 'Invalidate' method there in order to repaint the
background.
--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://dotnet.mvps.org/dotnet/faqs/>
Thanks again!
"Herfried K. Wagner [MVP]" <hi***************@gmx.at> wrote in message
news:%2******************@TK2MSFTNGP14.phx.gbl... "Martin Williams" <wi******@nospam.net> schrieb: One more question - is there a way I can get the logo that was drawn
with DrawImage to be in a relative position? You will have to listen for the window's 'Resize' or 'SizeChanged' event
and call the form's/control's 'Invalidate' method there in order to repaint
the background.
-- M S Herfried K. Wagner M V P <URL:http://dotnet.mvps.org/> V B <URL:http://dotnet.mvps.org/dotnet/faqs/> This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: Cecile Muller |
last post by:
I've been trying to just open a png and display it, that way:
<?
header ("Content-type: image/png");
$im = imagecreatefrompng('empty.png');
imagepng($im);
?>
But the transparency is not...
|
by: Piotr Wolski |
last post by:
how to make my page that it was correct with every browser standard?
for example when i change HTML's table size it has no effect when i see
it under mozilla and has effect under Internet...
|
by: Matthias Czapla |
last post by:
Hi!
I want to resize uploaded GIF images. Currently I do it like this:
<?php
// ...
$img = imagecreatefromgif($path);
$img_scaled = imagecreate($new_width, $new_height);...
|
by: Robin Becker |
last post by:
Has anyone done transparency with PIL & TIFF? I'm using PIL to generate
a preview TIFF for embedding into an eps file and am being asked for the
TIFF to support transparency.
--
Robin Becker
|
by: Mr. x |
last post by:
Hello,
I would like that my image's background color will be transparent.
What I have is only paintbrush.
My image is *.jpg format (I have tried to save it as *.gif format, and I got
less...
|
by: Nathan Sokalski |
last post by:
I am trying to create graphics with GDI+ that include transparency. However,
the transparency never seems to show up, even though my colors have an alpha
value of 0. How can I generate a graphic...
|
by: tommaso.gastaldi |
last post by:
In a previous post I have been asking about a way to test Alpha
Transparency.
Bob and Michael have kindly provided some ideas.
Here I would like to share the function I have prepared, for the...
|
by: ZikO |
last post by:
Hi.
I've experienced one problem. Im using three froms. Two of them are
maximized, whereas one is normal form with transparency. Transparency stops
working, that is I can see the color which...
|
by: dragze |
last post by:
Hi,
On one of the pages of my site i use two javascripts, one makes transparency of png's work in IE, and the other embeds a flash player.
Now use one of the scripts it works fine, use both and...
|
by: Martijn Mulder |
last post by:
When I populate a ToolStrip with ToolStripButtons with a .png-image on
it, will Windows understand the transparency of the .png file?
|
by: taylorcarr |
last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
|
by: ryjfgjl |
last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
|
by: ryjfgjl |
last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
|
by: BarryA |
last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
by: Hystou |
last post by:
There are some requirements for setting up RAID:
1. The motherboard and BIOS support RAID configuration.
2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
|
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,...
| |