 |
|
 |
I have noticed when using this control with images, and than disabling control, image move at position 0,0 of control. To solve this problem I have change some code in method OnDrawTextAndImage. When control disabled this code work with images
if (this.Enabled)
g.DrawImage(this.Image, ImagePoint);
else
System.Windows.Forms.ControlPaint.DrawImageDisabled(g, this.Image, locPoint.X, locPoint.Y, this.BackColor); <----- Look this
New draw position of image is locPoint. Why? Normal position of image is ImagePoint. I change that line in
System.Windows.Forms.ControlPaint.DrawImageDisabled(g, this.Image, ImagePoint.X, ImagePoint.Y, this.BackColor);
and everything seems ok.
|
|
|
|
 |
|
 |
What is an XP buuttom? hehe
|
|
|
|
 |
|
 |
When I try to download the source code, I get a message saying that the zip file is invalid or corrupt. I wan't to download the source because I am interested in how you are setting the colors - I wish to do something similar in my code
Many thanks,
Gary
|
|
|
|
 |
|
 |
Erm... How do i use your MyXPButton? I haved inserted MyXPButton.cs and ControlPaint.cs into my project. I heard somewhere that i need to drag it to the toolbox, but that doesn't work for me... It appears disabled in the toolbox and the name of it is my filename. Any ideas?
Weiye Chen
When pursuing your dreams, don't forget to enjoy your life...
|
|
|
|
 |
|
 |
Never mind. I figured it out. I just code it manually.
Weiye Chen
When pursuing your dreams, don't forget to enjoy your life...
|
|
|
|
 |
|
 |
I have noticed when using this control that the Windows forms load slowly and it displays every control on the form drawing rather than the window showing up once it is completely loaded. I have isolated the problem to this control. Does anyone know how to change this. I am a fairly new programmer and I can not figure this out. Thanks!
|
|
|
|
 |
|
 |
I am getting build errors with this project.
|
|
|
|
 |
|
 |
Hi
I tried to use this control (pulled it in from the toolbox to my form. Built and ran fine. When I Selected the form again (was looking at the code), I got this series of errors.
They also appeared when I built the applciation (the second time). I'm using Dev Studio 2003.
C:\DotNetWork\ASA\asaSports\PointOfInterest\POInterestConfig.cs(769): The variable 'XPStyle' is either undeclared or was never assigned.
C:\DotNetWork\ASA\asaSports\PointOfInterest\POInterestConfig.cs(768): The variable 'BtnShape' is either undeclared or was never assigned.
The Generated code was:
this.browseMapButton1.AdjustImageLocation = new System.Drawing.Point(0, 0);
this.browseMapButton1.BtnShape = MyXPButton.emunType.BtnShape.Rectangle;
this.browseMapButton1.BtnStyle = MyXPButton.emunType.XPStyle.Default;
this.browseMapButton1.Image = ((System.Drawing.Image)(resources.GetObject("browseMapButton1.Image")));
It looks like the same problem that the Pinkie XP Button controls have. I'm going to try and debug, but if anyone has the answer it would be appreciated.
Thanks
Chris
|
|
|
|
 |
|
 |
I have seen this error in several of the projects that I have developed... It only happens on enums, from my experience. Its got to be a bug in the VS.net designer environment. Some time ago I was working on a project and I kept having the same thing over and over again... I thought I had figured it out, but looking at my code now it doesn't appear to be "fixed".
Even though my code doesn't look fixed, try this... My recollection was that it had something to do with where in the code you put the enums. Try taking them out of the class and put them at the namespace level and see if that fixes it. If it does, I'm a genius. If not, I'm human. Either way, let me know.
-mdb
|
|
|
|
 |
|
 |
Well......
It works!
So, you're not human, you are a genius!
Thanks.
Chris
|
|
|
|
 |
|
 |
Oh,good!
|
|
|
|
 |
|
 |
Can't get it. Still the same problem and i can't solve it.
I wrote
...............
namespace MyXPButton
{
///
/// Summary description for UserControl1.
///
///
public class emunType
{
public enum XPStyle {Default, Blue, OliveGreen, Silver}
public enum BtnShape {Rectangle, Ellipse}
}
public class MyXPButton : System.Windows.Forms.Button
{
..........
Compile with Release and then add to a started project and the same warning.
How can I fix it ?
Please !!
|
|
|
|
 |
|
 |
Move the enums outside the class, so they reside in the namespace. VS2003 has serious issues (in the designer mainly) that come from placing public enums INside public classes.
|
|
|
|
 |
|
 |
Who is author of this article?
A. Riazi
|
|
|
|
 |
|
 |
Psst! He/she is shy!
Trying to make bits uncopyable is like trying to make water not wet.
-- Bruce Schneier
By the way, dog_spawn isn't a nickname - it is my name with an underscore instead of a space. -- dog_spawn
|
|
|
|
 |
|
 |
this is very important question!!! I cant understand how did CHRIS MUNDAR allowed " " fileds
|
|
|
|
 |
|
 |
The "Unknown Author" was last seen wearing a paper bag over his head at the local internet cafe.
-rick
|
|
|
|
 |
|
 |
Aren't there any names in the source code either?
Lol. This is the first edited article from which the author doesn't want to show that he/she wrote it. Normally, authors do like to show their names everywhere, as many times as possible (above the article, biography, disclaimer, copyright, and in all source code files).
I wish I was what I thought I was when I wished I was what I am.
|
|
|
|
 |
|
 |
They link to the gotdotnet website and they list the person who uploaded the files as jibinpan...
so jibinpan thanks!
/bb|[^b]{2}/
|
|
|
|
 |