|
do you have a link or some help for explanation
I'm not an expert yet, but I play one at work. Yeah and here too.
|
|
|
|
|
|
Treat each color value as a percentage 0=0%, 255=100%
So, a certain color might be (20%, 30%, 90%) in RGB
if you want to intersect that with another color (100%, 60%, 0%) the intersection will be the averages:
(60%, 45%, 45%)
Make sense?
|
|
|
|
|
heres a rough equation i got from my friend:
average the "Reds" - aa+11= bb bb/2 = 5D
bb+22 = DD dd/2 = 6e
cc+33 = ff ff/2 = 7f
so the average =c #aabbcc and #112233 = #5D6E7F
I'm not an expert yet, but I play one at work. Yeah and here too.
|
|
|
|
|
Yeah, it's pretty much the same thing.
(Ra + Rb)/2 = Ri
(Ba + Bb)/2 = Bi
(Ga + Gb)/2 = Gi
It makes sense since if you intersect a red line (255,0,0) with a black line (0,0,0) then the result should be a darker red line (128,0,0)
|
|
|
|
|
just mix them
Color c1=Color.Green;
Color c2=Color.Yellow;
Color mix=Color.FromArgb( (c1.r+c2.r)/2,(c1.g+c2.g)/2,(c1.b+c2.b)/2);
//Roger
|
|
|
|
|
I am experiencing a problem when trying to open a file using StreamReader inside a newly created thread.
My main program creates the thread as follows:
Thread t = new Thread(new ThreadStart(ProcessFileThreadOperation));
t.Start();
Pretty straight forward. If I remove the thread altogether and simply call
ProcessFileThreadOperation();
then everything works great, so I know that the code inside this method works fine. However when I call the method so that it can be run on a separate thread, I get an error as soon as it tries to open the StreamReader with the error:
Error: Logon failure: unknown user name or bad password.
So now my best guess is that file security permissions are not passed on to threads? If that's the case, anyone have any suggestions on a workaround? Any help would be _greatly_ appreciated...
Thanks,
Julie
|
|
|
|
|
I am having what appears to be a strange problem when I do File and or directory management using System.IO.
For example if I have the following lines of code:
Directory.Delete()
File.Copy()
Use the File
If the directory to be deleted is very large, it appears that while the directory is being deleted, the code jumps to the next line which is copy a file and the following line which is use the File. But since the directory deletion is not complete the File Copy or use hte file fails.
I cannot reproduce the problem in debug mode so am not sure what the hell is happening.
Have also noticed the problem when I was doing server maintenance and was deleting a few gigs of files manually. At the same time I was running my code that was writing files to the drive. Since the drive was busy it was taking time to write the files. What was strange is that it attempted to use the file before it finished writing it. Which is the same problem as I mentioned above. It seems to jump over a line of code to the next without completeing teh first, implying that the File IO is asynchronous or that something else is very evil in there
Is Directory.delete asynchronous? Is there a global setting that makes it asynchronous? Any ideas?
Thanks.
|
|
|
|
|
hi !
i have some troubles concerning dll-dependencies:
there is the main SIMULATOR class, which needs a lot of other classes (Class1,Class2,...)
this Simulator registers a channel for a remote object (COMMUNICATOR) and handles over a self-reference.
now. when i connect my GUI (on another pc) with this Communicator it seems that i need not only the simulator-class but all Class1,Class2 classes as a dll.
(because of the simulator-reference in communicator)
is this realy true, or is there another possibility
Class1
\
Class2 -- Simulator - Communicator <---REMOTE--->GUI
/
Class3
THANKS A LOT !!!!!!!!
|
|
|
|
|
hi !
can a constructor call another constructor of the same class?
in java it used to work as follows:
this(....);
--->
public class Test {
String Fname;
String Lname;
int id;
public Test(String Fname, String Lname) {
this.Fname=Fname;
this.Lname=Lname;
}
public Test(int id, String Fname, String Lname){
this(Fname,Lname); //!!!!!!!!!!!!!!!!!
this.id=id;
}
public static void main(String[] args){
Test t = new Test(1,"Tim","Taylor");
}
THANKS !
|
|
|
|
|
Sure. Here[^] is the language spec on the subject.
class Text
{
public Text(): this(0, 0, null) {}
public Text(int x, int y): this(x, y, null) {}
public Text(int x, int y, string s) {
}
}
α.γεεκ Fortune passes everywhere. Duke Leto Atreides
|
|
|
|
|
thank you!
i didn't find this anywhere.
|
|
|
|
|
I have made a custom control, which have a property named Items. Items is a collection. This collection can in the designer be changed by using the collection-editor accessed from the property viewer.
My problem is when I add items through the designer(collection-editor) in the property viewer. After adding a new item, it is shown in the control, but do I reload the form(by closing the window, and open it again), the item is not present - not visually in my control and not in the collection-editor.
I see that after adding items using the collection-editor, no code are added to the InitializeComponent function. I wonder if you need to do something specific to have it added correctly to the parents InitializeComponent function?
Thanks in advance,
Gooky
|
|
|
|
|
[DesignerSerializationVisibility(DesignerSerializationVisibility.Content)]
does the trick...
Gooky
|
|
|
|
|
What do you add this to, the control's class or the property itself?
Thanks,
Alvaro
Hey! It compiles! Ship it.
|
|
|
|
|
the property
Actually, you also need to make a typeconverter. I found an excelent article about it:
http://www.divil.co.uk/net/articles/designers/collectioncontrols.asp
Gooky
|
|
|
|
|
hello
i search how to detect the connection and the deconection of the modem .
because i want to make an application who can tell if the connection is on or no?
|
|
|
|
|
check out a search on your pc for wininet.h
I'm not an expert yet, but I play one at work. Yeah and here too.
|
|
|
|
|
[System.Runtime.InteropServices.DllImport("wininet.dll")]
public static extern bool InternetGetConnectedState(IntPtr lpSFlags, int dwReserved);
|
|
|
|
|
I created a dataviewmanager because i have dataset and want to provide different views on that that dataset. Is it possible to get the rows in a dataviewmanager? That is, I want to see the contents of the dataviewmanager. Does any one have any sample code?
|
|
|
|
|
I have ccoCustomers and cboStoreLocation
Customer has multiple store Locations
if I have 2 DataTables one CUstomer(ID) and the other SotreLocation(CustomerID)
what is this best way to bind these together?
nick
I'm not an expert yet, but I play one at work. Yeah and here too.
|
|
|
|
|
Just reading up on "active directory - DirectoryEntry", come across this code fragment:
DirectoryEntry de = new DirectoryEntry();
String schemaNamingContext = de.Properties["schemaNamingContext"][0].ToString();
String defaultNamingContext = de.Properties["defaultNamingContext"][0].ToString();
What's:
a. schemaNamingContext
b. defaultNamingContext
Don't have anything from MSDN...
norm
|
|
|
|
|
|
|
Funny, I'm using active directory to log people on my application and I was looking for something like that.
nick
I'm not an expert yet, but I play one at work. Yeah and here too.
|
|
|
|