|
p_s_i_20070730 wrote: If I take the ".ico" file in a MemoryStream. Then can I convert this MemoryStream to contain the cursor result?
No.
I dont know ANY way to programmatically convert from or to cursor format.
|
|
|
|
|
The point your missing is that the data expected by the Stream constructor requires that it contains certion information and is formmated exactly how it expects as a stream of bytes. The data you're giving this constructor is not formatted for a cursor file and is not in the proper format. You simply cannot use the Stream constructor how you want.
You have to build an array of bytes, or write to a MemoryStream and write the data from the .ico file, massaged and reformatted for the .cur format. You must also place the bytes describing the click hotspot into this array in the place that the .cur file format expects. THen you can pass the MemoryStream to the Stream constructor of the Cursor class.
In order to do what you want, you have to be familiar with the file formats of both .ico and .cur files, down to the byte.
|
|
|
|
|
Hi Dave,
seems we are missing a Cursor constructor that takes an image
plus some extra parameters as arguments.
We can convert an image to an icon without knowing the icon format,
it takes say 5 lines of code using a stream. We would like to be able
to do something similar for image-to-cursor.
Do you have the code available to do it at the byte level ?
|
|
|
|
|
I don't have any code for it and don't know of any. I just posted how I would approach the problem.
|
|
|
|
|
thanks dave.
Can you please let me know if there is any code where the same has been implemented? it'll be of great help. some piece of code to convert the ico stream to cur stream
|
|
|
|
|
I don't have any code for it and don't know of any. I just posted how I would approach the problem.
|
|
|
|
|
You seem to have a very similar post just a minute back.
|
|
|
|
|
Hi,
I have a query. Can we convert a Memory Stream containing a ".ico" file to the Memory Stream acceptable by the System.Windows.Forms.Cursor constructor that accepts a stream containing ".cur" file?
|
|
|
|
|
hi
yes and no
the ico and cur have the same file structure.
two things are different:
1. in the header info the type is 1 (for ico is 2)
2. windows can only handle B/W cursors, therfore the lenght of the cursor file is smaller.
hier is a good example of manipulating icons in windows.
you also finde the file structure for icons
http://www.codeproject.com/cs/library/IconLib.asp
regards
|
|
|
|
|
I have a TreeView control that I have a set number of nodes in. How would I go about programmatically selecting a node with a known FullPath.
Thanks in advance for the help.
John 3:16: "For God so loved the world, that he gave his only begotten Son, that whosoever believeth in him should not perish, but have everlasting life."
using Earth.Internet.WWW.CodeProject;
|
|
|
|
|
hi
i am new developer of Asp.net technology........
i am a student of B.E.Information technology ...........
i am trying to make project on onine gaming using c# .net and Asp.net....
so please give me suggetions of information for developing my project in betterway
thank you
purvi
|
|
|
|
|
purvi barot wrote: i am trying to make project on onine gaming using c# .net and Asp.net....
What kind of game are you thinking of?
"Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon
|
|
|
|
|
I have not much more idea but i want to develope a game by using concepts of directX or OpenGL .... some what simple game for learning or say introductory game... If you have an idea suggest me game by which i can clear my concepts of my lannguage and this directX and OpenGL.....
puzzle type or some what logical ...........
my project target is uploading of game to website....... learning ASP.Net .... but i am somewhat interested in graphics so i want to develop a game so please give me idea and your suggetion
thank u for reply....
purvi
|
|
|
|
|
Hello purvi,
following are the points to speed up your execution
Avoids most of the If..Else..EndIf loops,
don't use goto
use "StringBuilder" class than "string"
Take the use of scripting(Mostly Javascript)
Use VisualStudio 2005 than VS 2003
Avoids unnecessary database connections and server trips
Best of Luck,
regards,
koolprasad2003
If the message is useful for U then please Rate This message...
Be a good listener...Because Opprtunity knoughts softly...N-Joy
|
|
|
|
|
Hi,
I am calling the FolderBrowserDialog.ShowDialog method and I am getting an intermittent SEHException - Control has raised an error, or something similar to that. I have Googled this, and have found some data saying that this may be a 64-bit windows problem (I'm running 64-bit Vista), and a suggested fix that says to use a static method to show the dialog. Both comments seemed to be from some poor soul like myself who has been struggling for a solution. Does anyone abouth this?
Cheers
SamM
|
|
|
|
|
What say you?
|
|
|
|
|
What?
--------------------------------
txtSignature
|
|
|
|
|
I think he wanted to know which would be better for enterprise development, WinForms or WPF...
"Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon
|
|
|
|
|
Have you seen the WPF articles that have been published here? They are all pretty slick and maybe the way to go soon
"Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon
|
|
|
|
|
Keep the business logic and code separate from the UI and either direction would be just fine. I'm going with WinForms for now, simply due to the component market being pretty minimal at this point for WPF.
|
|
|
|
|
I use PERFMON utility to have a look at Performance Counter values.
Please can anyone explain the difference between these performance counters :
# of current Logical Threads
and # of current Physical Threads
For Performance Object : .NET CLR LocksAndThreads
Vikas M Pai
Software Engineer
|
|
|
|
|
The .NET Framework allows more than one managed thread (i.e. a Thread created through the .NET Framework), referred to here as a Logical Thread, to run on top of an operating system thread created by CreateThread , referred to here as a Physical Thread.
I'm not sure that the CLR itself does this when self-hosting, but the possibility is allowed so that a hosting environment such as SQL Server can perform its own user-mode scheduling (when processing a query, and a thread would have to block to wait for data to arrive from disk, SQL Server switches that thread to processing a different query).
|
|
|
|
|
First of all I will like to Thank You for answering my question.
Now the difference is clear between Physical and Logical Threads.But further one question that popped in my mind as soon as I read your reply is at core level it is the responsibility of the OS to create Threads and schedule threads and processes
And if CLR generates logical threads by itself on the top
of threads created by OS is it not like interfering with the normal OS functionality.
Vikas M Pai
Software Engineer.
|
|
|
|
|
what string function or any expression that returns the first letter of each word in uppercase, all other letters in lowercase in reporting services?
thank you in advance
jyn
|
|
|
|
|
You may feel dirty after doing this, but you can import the Microsoft.VisualBasic namespace and use StrConv function with the VbStrConv.ProperCase option.
Don't tell anyone I told you.
|
|
|
|