|
You may want to check out the Tao Framework[^], it's a OpenGL wrapper for .NET.
regards
modified 12-Sep-18 21:01pm.
|
|
|
|
|
I know that the Graphics class cannot take indexed images (I dont really know why). So I need to convert the indexed image to a color image, then convert it back to indexed image.
How would I go about doing this conversion into color then back into indexed? Would there be data loss during the conversions?
When i was doing it using Photoshop, every time i switched between indexed and RGB, the image got darker and darker, which meant data wasn't being preserved.
|
|
|
|
|
gigahertz205 wrote: I know that the Graphics class cannot take indexed images
Are you sure?
Indexed to RGB shouldn't cause any visible change.
RGB to indexed may cause a change, since a best-fit color table
needs to be created.
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
How can I find a Unicode Code of a chracter in a string
For exmple Unicode of (њ) is 5A 04
Is there any way to find it programmatically
Hello Friends
|
|
|
|
|
You can use the Encoding class, like this:
byte[] bytes = Encoding.UTF8.GetBytes("њ");
I haven't tested it, so the syntax might be a little bit different.
regards
modified 12-Sep-18 21:01pm.
|
|
|
|
|
Thanks alot.
it worked
Now I want to convert this code to hex. How can I do it?
Hello Friends
|
|
|
|
|
Convert it to int like Guffa said, then display it as hex. To display an int as hex i think you can use .ToString('X');
My current favourite word is: Nipple!
-SK Genius
Game Programming articles start - here[ ^]-
|
|
|
|
|
SK Genius wrote: .ToString('X');
That works fine - I prefer Convert.ToString(value, base) as you don't have to remember the silly string formats and you can specify base 2, 8, 10 or 16 so is more flexible.
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)
|
|
|
|
|
Characters are unicode, so you can just convert it to int:
int code = (int)'њ';
Despite everything, the person most likely to be fooling you next is yourself.
|
|
|
|
|
It is probably better to use: char.ConvertToUtf32(string, int)
|
|
|
|
|
but why?
i also usually cast the char to int to get its unicode value
Harvey Saayman - South Africa
Junior Developer
.Net, C#, SQL
you.suck = (you.passion != Programming)
|
|
|
|
|
Harvey Saayman wrote: but why?
Because .NET has Unicode surrogate pairs, meaning sometimes it takes 2 combined characters to form a complete Unicode code point.
|
|
|
|
|
Hello
I wna tto show a gif file in my C# aplication but is is not in animated form.
Can any one have the idea about that????
Thanks
Syed Shahid Hussain
|
|
|
|
|
Use a picture box to show Gif image, it will show animation effect.
-Dave.
------------------------------------
http://www.componentone.com
------------------------------------
|
|
|
|
|
i making a game in C# and directx 9 and need to know about collision detection in C# 2005. please help.
Software Engineer
|
|
|
|
|
|
your in the wrong forum! try graphics[^]
Harvey Saayman - South Africa
Junior Developer
.Net, C#, SQL
you.suck = (you.passion != Programming)
|
|
|
|
|
i google things like: application commands, drag & drop, console command, etc. But no clue on geting what i needed, also if any1 know how its this called, & a lilte example in this site ill be so tankful
|
|
|
|
|
Command-line argument[^]
You get them in your program by using this Main signature
static void Main(string[] args)
{ }
Eslam Afifi
|
|
|
|
|
ty so much, now i can google it & get good info, thx again
|
|
|
|
|
You're welcome
Eslam Afifi
|
|
|
|
|
Hi,
I created the Gridview and has some boundfield columns to display(invisible or visible). I used a parameter to pass to display some particular fields. However, I need to search the column index before visible it. How am I going to do that?
protected void Page_Load(object sender, EventArgs e)
{
String selectcolumn = this.Request.QueryString["Selected"];
string[] columnID = commaStringToArray(selectcolumn);
// how to find the datafield of each column and visible them.
}
private string[] commaStringToArray(string strComma)
{
string [] strArray;
strArray = strComma.Split(new char[] {','});
return strArray;
}
In the web, they were all searching the headertext. But, I want to do the datafield.
|
|
|
|
|
|
I have a textbox with AutoCompleteSource set to CustomSource. AutoCompleteCustomSource has to be of type AutoCompleteStringCollection. During suggestions, .NET uses--I believe--sort on strings and gives suggestions. So if the string collection contains: 22, 26, 2162, 2052, 2002 and user types in 2 it will suggest 2002, 2052, 2162, 22, 26 because this is ascending order for strings. However, I want it to suggest in ascending order for integers so suggestion will be: 22, 26, 2002, 2052, 2162.
Even if the source for AutoCompleteCustomSource is sorted it get resorted based on string sort. Any ideas how I can show them in ascending order of integers?
|
|
|
|
|
Hello,
This will not be possible to implement. Reason being that the AutoCompleteSource only takes String
collection and would sort the colection only in string format.
Regards,
Allen Smith
ComponentOne LLC
www.componentone.com
|
|
|
|