473,320 Members | 2,071 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

Is there an Icon control?

What's the best way to put an Icon in the client area of a form (not in the
ControlBox)? Everything I've tried seems to produce unsatisfactory results.
A picture box doesn't give me the icon size I want. I've been using a
PictureBox, hooking its Paint event and doing it manually. Is there a better
way?
Thanks,
Jacob
Nov 16 '05 #1
4 2050
Jacob,

If the picture box doesn't give you what you want, have you considered
painting the icons yourself?

Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"Jacob" <js@hotmail.com> wrote in message
news:uY*************@TK2MSFTNGP09.phx.gbl...
What's the best way to put an Icon in the client area of a form (not in
the ControlBox)? Everything I've tried seems to produce unsatisfactory
results. A picture box doesn't give me the icon size I want. I've been
using a PictureBox, hooking its Paint event and doing it manually. Is
there a better way?
Thanks,
Jacob

Nov 16 '05 #2
Ya, as I mentioned.... that's what I've been doing. Anything else?

Thanks,
Jacob


"Nicholas Paldino [.NET/C# MVP]" <mv*@spam.guard.caspershouse.com> wrote in
message news:eh**************@TK2MSFTNGP15.phx.gbl...
Jacob,

If the picture box doesn't give you what you want, have you considered
painting the icons yourself?

Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"Jacob" <js@hotmail.com> wrote in message
news:uY*************@TK2MSFTNGP09.phx.gbl...
What's the best way to put an Icon in the client area of a form (not in
the ControlBox)? Everything I've tried seems to produce unsatisfactory
results. A picture box doesn't give me the icon size I want. I've been
using a PictureBox, hooking its Paint event and doing it manually. Is
there a better way?
Thanks,
Jacob


Nov 16 '05 #3
Jacob,

That's pretty much about it. I'm curious though, what are the results
that you are getting with the picturebox which are unsatisfactory?

Other than that, I would make sure to refactor the code out into another
user control so that you can easily reuse the code.

--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"Jacob" <js@hotmail.com> wrote in message
news:eJ**************@TK2MSFTNGP11.phx.gbl...
Ya, as I mentioned.... that's what I've been doing. Anything else?

Thanks,
Jacob


"Nicholas Paldino [.NET/C# MVP]" <mv*@spam.guard.caspershouse.com> wrote
in message news:eh**************@TK2MSFTNGP15.phx.gbl...
Jacob,

If the picture box doesn't give you what you want, have you considered
painting the icons yourself?

Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"Jacob" <js@hotmail.com> wrote in message
news:uY*************@TK2MSFTNGP09.phx.gbl...
What's the best way to put an Icon in the client area of a form (not in
the ControlBox)? Everything I've tried seems to produce unsatisfactory
results. A picture box doesn't give me the icon size I want. I've been
using a PictureBox, hooking its Paint event and doing it manually. Is
there a better way?
Thanks,
Jacob



Nov 16 '05 #4
What I was referencing when I said unsatisfactory results is when the icon
returns the incorrect size. The Icon class is supposed to automatically
choose the best icon size and bit-depth. Sometimes it doesn't. There is an
Icon constructor to request an icon of a certain size, but no method to know
which sizes there are.

Most of the time, if you create an Icon it will be the 32x32 copy which is
the system default in most cases. It just seems that there is no simple
approach.

Jacob
"Nicholas Paldino [.NET/C# MVP]" <mv*@spam.guard.caspershouse.com> wrote in
message news:eS**************@TK2MSFTNGP09.phx.gbl...
Jacob,

That's pretty much about it. I'm curious though, what are the results
that you are getting with the picturebox which are unsatisfactory?

Other than that, I would make sure to refactor the code out into
another user control so that you can easily reuse the code.

--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"Jacob" <js@hotmail.com> wrote in message
news:eJ**************@TK2MSFTNGP11.phx.gbl...
Ya, as I mentioned.... that's what I've been doing. Anything else?

Thanks,
Jacob


"Nicholas Paldino [.NET/C# MVP]" <mv*@spam.guard.caspershouse.com> wrote
in message news:eh**************@TK2MSFTNGP15.phx.gbl...
Jacob,

If the picture box doesn't give you what you want, have you
considered painting the icons yourself?

Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"Jacob" <js@hotmail.com> wrote in message
news:uY*************@TK2MSFTNGP09.phx.gbl...
What's the best way to put an Icon in the client area of a form (not in
the ControlBox)? Everything I've tried seems to produce unsatisfactory
results. A picture box doesn't give me the icon size I want. I've been
using a PictureBox, hooking its Paint event and doing it manually. Is
there a better way?
Thanks,
Jacob



Nov 16 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
by: MightyKitten | last post by:
L.S I'm not sure who I should contact, but it seems the valid-html401 icon is missing at http://www.w3.org/Icons/valid-html401 --
1
by: Brahm | last post by:
Hello, I have an application with a main class subclassing the System.Windows.Form and i changed the Icon setting for the application to point to a different icon file. Now, when my application...
2
by: quilkin | last post by:
Hi I have an control app which starts up with a small info message then sits down as a tray icon while it does its work. When started manually (e.g.from a shortcut) this always works fine. However...
3
by: Ravi Shankar | last post by:
Hi, I have a windows form application it uses AxShDocVw AxWebBrowser control. The control navigates to web pages at a specified interval set in Timer control. The form uses a notify icon. On...
1
by: steve bull | last post by:
I created a control and added to my toolbox and it worked fine including the controls icon until I decided to merge the project that contains the control into an existing project. I have included...
3
by: Tony Lugg | last post by:
I have an application with a document management form. When users add documents to the form, I call the API function SHGetFileInfo to get the associated large and small icons for the file. These...
2
by: Mamatha | last post by:
Hi I want to add an icon to the textbox's text. I don't know how to display icon in textbox in VB.NET. If any one knows please let me know. Thanks in advance. Mamatha
1
by: Rich | last post by:
Hello, I noticed a round looking icon with a downward chevron symbol immediately to the left of the control box on the form title bar. When I click it the form seems to unload - whether in...
1
by: Frank Burleigh | last post by:
A while ago I installed Net 2.0 to our Server 2003 web machine, but the Control Panel folder icon for configuring Net 2.0 never made it to the Control Panel folder. Thinking this might indicate a...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.