|
Hi..
i Need to load all the available system colors and system brushes into the combobox, can any one help me...
regards
Vinayskvs
|
|
|
|
|
SystemColors , SystemBrushes , KnownColor
|
|
|
|
|
I can use System.Colors, system.KnownColor, etc but i need to populate the entire Systembush names in the dropdown list..
|
|
|
|
|
You have to use reflection (add using System.Reflection to top of file)
List<Color> webColours = new List<Color>();
foreach (PropertyInfo property in
(typeof(Color)).GetProperties(BindingFlags.Public | BindingFlags.Static))
{
Color colour = Color.FromName(property.Name);
webColours.Add(colour);
comboBox1.Items.Add(colour);
}
List<Color> systemColours = new List<Color>();
foreach (PropertyInfo property in
(typeof(SystemColors)).GetProperties(BindingFlags.Public | BindingFlags.Static))
{
Color colour = Color.FromName(property.Name);
systemColours.Add(colour);
comboBox2.Items.Add(colour);
}
DaveBTW, in software, hope and pray is not a viable strategy. (Luc Pattyn)Expect everything to be hard and then enjoy the things that come easy. (code-frog)
|
|
|
|
|
how to convert string to SystemColors
|
|
|
|
|
It's in the snippet I gave you!
Color colour = Color.FromName(property.Name);
DaveBTW, in software, hope and pray is not a viable strategy. (Luc Pattyn)Expect everything to be hard and then enjoy the things that come easy. (code-frog)
|
|
|
|
|
this is fine with Colors but i need it for SystemColors..
please help me..
|
|
|
|
|
SystemColors are just Colors. The second half of the code gets those and populates the second comboBox.
MSDN[^]: Each property of the SystemColors class is a Color structure that is the color of a Windows display element.
DaveBTW, in software, hope and pray is not a viable strategy. (Luc Pattyn)Expect everything to be hard and then enjoy the things that come easy. (code-frog)
|
|
|
|
|
|
hi,
I have textbox and richtext box (asp.net)
I want drag text "{start}" from textbox then while dropping in the rich text it should display as "{start} Enter text {end}.
I want to implemnt in web applications(c#)
Can anybody help me to solve the issue.
thank you
Prabhakar
|
|
|
|
|
|
prabhkar272 wrote: I want to implemnt in web applications(c#)
You won't be implementing this in C#. You're intending to run this on a web page, so you will use JavaScript for this. There are many samples available, so just Google for drag drop javascript. BTW - it shouldn't be a RichTextBox you're using.
|
|
|
|
|
Hi,
Can anyone tell me if this is possible in a C# windows app.
I have a large gridview in C# but only a small amount of space to display this grid in.
What I want to do is change the background colour of a "header cell" to indicate any errors which may exist in the grid that may be out of view - this will help the user so they do not have to scroll up & down the grid to see any possible errors.
I have googled & googled & I still can't find out how to do this.
Any help would be great!
Thanks
Janet
Lady Programmers are a rare breed!
|
|
|
|
|
But_Im_a_Lady wrote: What I want to do is change the background colour of a "header cell" to indicate any errors which may exist in the grid that may be out of view - this will help the user so they do not have to scroll up & down the grid to see any possible errors.
The GridView doesn't support this action on its own. Popbably, you will need to write your own code to do this(If it is possible somehow)
Another thing what you can do is that you can programitically scroll to the row which has the error.
Please remember to rate helpful or unhelpful answers, it lets us and people reading the forums know if our answers are any good.
|
|
|
|
|
Well, like the topic says, is it possible to play a video (any format, e.g. .avi) directly from a stream (preferably FileStream)?
I was thinking there was somethink like Microsoft.DirectX.AudioVideoPlayback.Video.OpenStream(Stream str)
Because somewhere "down the road", some sort of stream must be opened anyway, so why not as an argument??
|
|
|
|
|
I don't think that's on offer, no.
Christian Graus
No longer a Microsoft MVP, but still happy to answer your questions.
|
|
|
|
|
not with directshow.net or anything?
|
|
|
|
|
I believe it can be done with MCI (Media Control Interface).
MSDN says "MCI can open AVI files by using a file-interface pointer or a stream-interface pointer".
Sounds promising?
DaveBTW, in software, hope and pray is not a viable strategy. (Luc Pattyn)Expect everything to be hard and then enjoy the things that come easy. (code-frog)
|
|
|
|
|
Hello,
I am not very well in ASP.
Do some one help me to create something in asp like a job in sql that run at 12:00PM
(Any link or any title)
Best regards
dghdfghdfghdfghdgh
|
|
|
|
|
Do you mean ASP or ASP.NET ? Either way, you're in the wrong forum. I know that even though I can't work out what you actually want here.
Christian Graus
No longer a Microsoft MVP, but still happy to answer your questions.
|
|
|
|
|
Christian Graus wrote: I can't work out what you actually want here
Somebody to think for her.
|
|
|
|
|
You can search a vb script code for the task scheduling.Put this vbs file in your task scheduling at specific time at every day.
|
|
|
|
|
First of all, you are in the wrong forum. For ASP.NET use the ASP.NET forum. For classic ASP use the web development forum.
Second, ASP is not suitable for running something at a specific time.
Despite everything, the person most likely to be fooling you next is yourself.
|
|
|
|
|
In my application, client enters some data and submit them. As a result of this action, .html file is generated.
I need to fax this .html file (contains images), but without client knowledge.
Thanks in advance.
"...And then she'd say, it's Ok, I got lost on the way
but I'm a supergirl, and supergirls don't cry. ..."
Reamonn
|
|
|
|
|
How do you mean, without client knowledge ? They will notice when a fax arrives.
I am not sure if an fax api is built in, or if you need to buys a library. I imaging you'd need to render your web page in IE and do a screen shot to turn it into a bitmap.
Christian Graus
No longer a Microsoft MVP, but still happy to answer your questions.
|
|
|
|