|
How can |I get a lighter tone of a particular color. Like if I have a value of color in rgb wht changes I have to make to it to make the same color with the lighter tone......
|
|
|
|
|
Take a look at Christian Graus articles on C# Image Processing with GDI+
that should help.
led mike
|
|
|
|
|
R: 0, G: 0, B: 0 = Black and R: 255, G: 255, B: 255 = White, so to make it a lighter shade, you'd just increase its RGB value equally.
So, an example -
If you have a blue (R: 0, G: 45, B: 255) you'd increase the RGB value by 80 to get a much lighter blue, and since the Blue is already max'd out at 255 you'd only increase the RG values - so you'd end up with a light blue (R: 80, G: 125, B: 255).
Hope that helps
|
|
|
|
|
I believe that you can use methods in the System.Windows.Forms.ControlPaint class. Use Light(Color c) or LightLight(Color c) to get lighter variations of the specified color.
Regards,
Thomas Stockwell
Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning.
Visit my homepage Oracle Studios[ ^]
|
|
|
|
|
How would this be accomplished easily?
I want to remove all rows in a DataGridView in the DataGridView.SelectedRows property.
Then I want to put them in another DataGridView's DataSource.
The DataSource for both DataGridView objects is a DataTable.
Thanks in advance,
Pualee
|
|
|
|
|
Mainatain two datatables and add the new rows/records to your second datatable which should be the datasource for the second datagrid
Gautham
|
|
|
|
|
Hello everyone,
I have a ListView contorl which has 4 columns. I was wondering if it is possible to make one column invisiable to the user?
Thank you very much and have a nice day.
Khoramdin
|
|
|
|
|
Did you try setting it's width to 0 (Zero)?
led mike
|
|
|
|
|
Hello Mike,
I can set it to zero but if I am not mistaken user can open it. Unless I am missing a point here!
Thank you for your help.
Khoramdin
|
|
|
|
|
Ok but if you don't want the user to see it, why have it there at all?
led mike
|
|
|
|
|
Hi guys,
Need some help please
I have a file on our webserver a .dat file that has a HTTP:// path. I am trying to open,read and write to the file from a C# windows application.
Is this possible? Please advice how to go about this.
Thanks in advance.
sasa
|
|
|
|
|
You can read it by downloading the file using HttpWebRequest, but that's about it. HTTP servers usually don't let you write anything back or open files for streamed read/write. Think about the gynormous security problem that introduces.
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
Thank you Dave for your suggestion. I used the webclient class and it worked. I am reading it, I wish I could write to it though.
Thank you for your suggestion again.
sasa
|
|
|
|
|
StreamReader would take physical path. You can use HttpWebRequest and use the Stream in Response to manage the file.
|
|
|
|
|
Here is the code I'm having trouble with:
Type oBB = Type.GetTypeFromProgID("MyNamespace.MyClass");
Object o = Activator.CreateInstance(oBB);
Object oResult = oBB.InvokeMember("BuildBook", System.Reflection.BindingFlags.InvokeMethod, null, o, new object[]
{ (int)Job.JobID, @"\\folder\in\" + Job.FinalFile.ToString(), Convert.ToBoolean(Job.Contribidx) });
Type oRes = oResult.GetType();
String sName = (String)oRes.InvokeMember("cName", BindingFlags.GetProperty, null, o, null);
The problem is that when I check sName, it gives me the cName property of MyClass rather than the cName property of the object returned by BuildBook. Does anyone see any obvious mistakes in my code?
|
|
|
|
|
Shouldn't the statement:
String sName = (String)oRes.InvokeMember("cName", BindingFlags.GetProperty, null, o, null);
be
String sName = (String)oRes.InvokeMember("cName", BindingFlags.GetProperty, null, oResult, null);
-Phil
|
|
|
|
|
You da man Phil...you da man!
|
|
|
|
|
In the constructor of my main form, I do some checking.
If it doesn't pass the check, I give a MessageBox then I
want to quit the program. As I have the code now, I get
an ObjectDisposeException. What is the proper way to
quit the program?
public Form1()
{
InitializeComponents();
if(.......){
....
....
this.Close();
}
}
|
|
|
|
|
dino2094 wrote: In the constructor of my main form, I do some checking.
If it doesn't pass the check, I give a MessageBox then I
want to quit the program. As I have the code now, I get
an ObjectDisposeException. What is the proper way to
quit the program?
Override OnLoad , and do the checking there. I had the same problem and it took me awhile to figure it out.
|
|
|
|
|
|
If it is for the main form would it be better to have the exit program logic in the void main() method of the program rather than of the form.
Regards,
Thomas Stockwell
Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning.
Visit my homepage Oracle Studios[ ^]
|
|
|
|
|
I have two lists. One is a list of NT user accounts. The other is a list of files on a share.
In C# I need to run a test that proves that each user has access to each file.
Note: I don’t have the account passwords.
minmanmax
|
|
|
|
|
Check out the System.Security namespace.
|
|
|
|
|
Nope. System.Security is for adding/revoking permissions on objects. It also can be used to iterate thru and objects ACLs. And of course, lots of other cool things. I have found nothing in there that will solve my problem
|
|
|
|
|
I thought that there was a collection of classes for checking user permissions on files and directories? In fact I've used them myself for checking (albeit the current) user's permissions on files.
Perhaps it's not in the System.Security namespace.
|
|
|
|