|
hi
How can i build colourful context menu for notification icon(System Tray Icon). Plz share any idea with u. I am getting sooo trouble on it
thanks
evilinside
|
|
|
|
|
You are going to have to read up on custom controls.
"Any sort of work in VB6 is bound to provide several WTF moments." - Christian Graus
|
|
|
|
|
Hai friends
I am working for one private software company where in i a need to do the chatting program. I am new to .NET platform. please help me by sending either an sample program or by sending the coding. I need the thing in ASP .NET using C# coading.
Sathiya
|
|
|
|
|
go to google.com and search "multithreaded chat application in c# " you may get your answer.
evilinside
|
|
|
|
|
go to www.questpond.com if you wanna need whole project on chat application.
Regards
Chintan
www.visharadsoft.com
(Nothing is so purify as KNOWLEDGE)
|
|
|
|
|
What s session time? How to calculate the session time? wat s the duration of session? Pls reply soon...
Thanx
|
|
|
|
|
session time relates to web dev, it means how long the web app regards you as being connected when you stay idle. It can be configured on the server.
Christian Graus - Microsoft MVP - C++
"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 )
|
|
|
|
|
The mysterious error i've found in the database that is.
This group section cannot be printed because its condition field is
nonexistent or invalid. Format the section to choose another condition field.
Error in File C:\DOCUME~1\ADMINI~1.ABC\LOCALS~1\Temp\temp_ef660b00-652e-4d6f-ba7c-e56310031a98 {583537DD-DED3-4230-BB59-FC225EDD5F1E}.rpt:
Invalid group condition.
Can any one help me against this gaint i'd worked very hard for solving it out but failed..... .
Help Help Help.... .
Thank
Syed Shahid Hussain
|
|
|
|
|
Hi,
I have a custom button, that can have any background Color. Now user can pick background color, byt I don't want user to pick it's forecolor (text color) . I want to calculate that color myself. Can you help me out with some algorithm to do this = to calculate a fore color that is diffrent enough from specified background so that it is perfectly readable for human eye ?
I understand HSL Color scheme and tried to create something by myself but it was not good enough and I don't want to put it here so you won't be influenced by my sollution.
My only requirement is to keep that text color in grayscale.
thanx
PS: I've tried luck at Graphics department but not much people visit that forum...
|
|
|
|
|
I would take the bitmap color, invert it and convert it to greyscale.
So, go 255-x on each of the red, green and blue components, then google for the algorithm to convert that color to greyscale ( my first image processing article has it, but I don't know it off the top of my head )
Christian Graus - Microsoft MVP - C++
"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 )
|
|
|
|
|
Thanx , I'll try that
btw your articles are great, I've learned a lot about colors from them
|
|
|
|
|
Hi,
I would compare the background brightness (Color.GetBrightness) with some middle
value, say 0.5f; if larger (=brighter), choose ForeColor=Color.Black,
else choose Color.White
|
|
|
|
|
Hi,
thats basicaly what I did and the problem is that some Colors are at constant Saturation, Luminacne values (Hue differs) were diffrent for human eye
e.g. :
try
constant Sat : 1f;
constant Lum : 0.5f;
=======
0.66 Hue - pure blue - very dark color, perfectly fits with white text color event if luminance is about 0.6f.
=======
0.5f Hue - cyan (something between blue and green)- very bright color, perfectly fits with black text color
even if luminance is about 0.4f.
|
|
|
|
|
Hi,
the way .NET calculates brightness gives about 0.5f for those colors
that have the three RGB components equal two one or two zero values
and two or one 255 values (that is red, green, blue, cyan, magenta, yellow).
For some of these colors you definitely want black foreground, for some it
is more or less undecided. I suggest you use Black for brightness (not luminance!)
above 0.4f or 0.45f
Alternatively you can calculate a fake brightness (in range 0-765) by
adding the RGB components of the background;
if that exceeds say 500 choose black, otherwise white.
This results in black foreground for cyan, magenta, yellow backgrounds (sum 510),
but white for red, green and blue (sum 255).
|
|
|
|
|
I know what's the diffrence between HSL and HSB, and I thought Color.GetBrightness() corresponds to HSL luminance. When creating HSL from a .NET Color,
i use :
this.Luminance = color.GetBrightness();
this.Saturation = color.GetSaturation();
this.Hue = color.GetHue();
so, is this incorrect approach? Ii thought it's just naming diffrence, I never tried to compare values when created color from HSL values if luminance and color.GetBrightness() match.
that fake brightness looks interesting, I'll try that, thanx
|
|
|
|
|
Hi,
I once looked into the brightness/luminance matter, and they are different;
HSL and HSB are not the same thing. Google and this article[^] may enlighten you on this.
Furthermore what .NET returns as Brightness did not match with my expectations;
but maybe I was biased by Java at that time, which IIRC returns the largest
of the three RGB values (which is strange by itself since then red and white
have the same brightness...)
|
|
|
|
|
Hi.
Anyway, fake brightness solved my problem, thanx a lot
|
|
|
|
|
Why C# does not support the multiple Inheritance
|
|
|
|
|
C# does not having more than one super class tats y we r using interfacing concept to overcome this.
|
|
|
|
|
Because it was easier not to, I suspect. You should use interfaces as a poor substitute. Interfaces are cool and useful, but they do not replace multiple inheritence.
Christian Graus - Microsoft MVP - C++
"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 don't know... Stroustrup did it way back in the early 80s. Surely MS in the new millennium should have been able to do it? I think Chintan has the right answer below.
Cheers,
Vıkram.
After all is said and done, much is said and little is done.
|
|
|
|
|
let assume following class
class base1{}
class base2{}
class derive{} :base1,base2
Here if both base class has one common method say Method1().Now,during execution if derived class excess Method1(),then derived class will get confuse as from which base class i should get Method1(),therefore they were taken out from C# as well as from java.
Regards
Chintan
www.visharadsoft.com
(Nothing is so purify as KNOWLEDGE)
|
|
|
|
|
There also the case where 2 base classes inherit from the same base, you then inherit from those 2 classes.
-----
If atheism is a religion, then not collecting stamps is a hobby. -- Unknown
|
|
|
|
|
> Here if both base class has one common method say Method1().Now,during execution if derived class excess Method1(),then derived class will get confuse
Not really. This problem has already been solved at a same matter with multiple inheritance interfaces. It could be solved (IMHO with more willing).
For example:
class base1
{
void Method()
{
DoSomethingGood();
}
}
class base2
{
void Method()
{
DoSomethingVeryGood();
}
}
class derive : base1, base2
{
new void base1.Method()
{
DoSomethingBad();
}
new void base2.Method()
{
DoSomethingVeryBad();
}
}
|
|
|
|
|
It is VERY easy to abuse multiple inheritance and end up in "M.I. Hell" -- circular references, inheriting methods from each class that have the same name, destructors being called twice because two bases derive from the same base. All of this can be avoided with careful design, but I think it was a case of protecting the programmer from himself (herself).
-Phil
PS. I thought I'd save some time/code while programming a strategy/card game in C++ by having the card inherit from the actual unit so it could read it's stats and display it -- since the Card interface had the same accessor names for these stats I had to overload everything in the card in order to call the correct "versions" of these functions, and no time was saved.
|
|
|
|