|
Hi
I had an resorce in my Assembly (Bitmap) and need to get resource ID of one, for pass to an function.How i can do this??
Please help!!!
|
|
|
|
|
There's no resources IDs like with native images - they have the name that you gave them when you compiled your assembly.
To get a list of the names, use Assembly.GetManifestResourceNames . To actually get the stream, use Assembly.GetManifestResourceStream .
This posting is provided "AS IS" with no warranties, and confers no rights.
Software Design Engineer
Developer Division Sustained Engineering
Microsoft
[My Articles] [My Blog]
|
|
|
|
|
I am trying to convert project originally written in SDK to .NET and came accross a problem that SetPixel function is not available anymore in .NET's GDI+. The function in original code was used to paint a grid (or I should better say a dot matrix) in a sort of a vector editor.
The SetPixel function is available in Bitmap class, but that won't help me, I guess.
Of course to draw a line just 1 pixel long does not work,
thus I would like to ask for any suggestion how to realise this in .NET
Lost In China
|
|
|
|
|
Probably easiest to just create a Bitmap, draw to it using SetPixel, then render it to the window (or whatever you have) using GDI+
--
Help me! I'm turning into a grapefruit!
Phoenix Paint - back from DPaint's ashes!
|
|
|
|
|
I had this problem as well. In VisualStudio 2002, I used the FillRectangle function with a rectangle that was 3 X 3 pixels. This would produce on pixel, filling the inside of the 3 X 3 rectangle fed to it, but not the rectangle border itself. In VS 2003, (using the newer .Net 1.1.1 framework) I beleve, the rectangle only had to be 1 X 1 pixel as the FillRectangle function now fills the border and the inside. You'll have to double check me on the detials, but the FillRectangle function is what your looking for.;)
|
|
|
|
|
Thanks Adam, FillRectangle(brush, x, y, 1, 1) does the job . Hope the function doesn't have too much overhead in comparison to SetPixel.
|
|
|
|
|
|
gavinJeffrey wrote:
Hi,
Erm, Hi
Can we help?
--
Help me! I'm turning into a grapefruit!
Phoenix Paint - back from DPaint's ashes!
|
|
|
|
|
I pushed enter to go to a new line but instead it posted the page (not the first time this has happened either). Yeah i did have a question but I figured it out. I also went and deleted my post straight away after I realized what I had done - dont know why it is still here though - just one of those days I guess.
|
|
|
|
|
Hi,
i want to embed a signed windows forms control (assembly with strong name, using a .snk key pair) into a html page. Using the normal <object>-tag works fine with the unsigned control, but doesn't work with the signed one! The signed control doesn't even open! In both cases i used the same html code. Is there information missing (e.g. about the key pair)?
Thanks a lot for your help!
Fridtjof
|
|
|
|
|
Hi,
here some additional informations:
1. I used sn -k key.snk for generating the key pair.
2. Then I used an attribute in the AssembyInfo.cs file to sign the control:
[assembly: AssemblyKeyFile("key.snk")]
3. In the html page the code
<object id="A" classid="http:ALib.dll#ALib.MyACtl"
width="568" height="416">
</object>
worked fine with the unsigned control. I used exactly the same code with the encrypted control. It seems to me that Internet Explorer cannot find the class "ALib.MyACtl" any more. Maybe since it is encrypted now???
Thanks for any advice,
Fridtjof
|
|
|
|
|
Hello,
I write a C# application MyApp.exe
MyApp need to read the version of an exe written in c++(VC6++)
I try with Assembly.loadFile("path\\app_vc6.exe")
but I get an error
Assembly.loadFile work corectly with an C# exe
did someone have an idea how to do it?
|
|
|
|
|
The Load methods of the Assembly type can only be used with .NET assemblies. To get the version info for any file, use: System.Diagnostics.FileVersionInfo.GetVersionInfo(fileName)
"These people looked deep within my soul and assigned me a number based on the order in which I joined." - Homer
|
|
|
|
|
Hello Everybody, this is my first time posting to the forums, so... "Hi, My name is John, and I'm a code-aholic..."
I have a question about COM performance in .Net applications. I am trying to write a program interface's with Apple's COM library for the iTunes app on windows in order to get access to the library of tracks and I am having some serious performance issues.
I am basically trying to load the library into a typed Dataset for easier manipulation in C# as the COM interface is pretty limited, and it is taking about 10 minutes to load the entire library. I am using a foreach loop over the library's Tracks collection to add them into the dataset.
I was just wondering if anyone else out there has done anything with the iTunes interfaces and if so if you have any tips on how to improve performance???
|
|
|
|
|
Can you specify the sort order of a hashtable? I’m using a string as the key and a home made class as the value.
Ronald Hahn, CNT - Computer Engineering Technologist
New Technologies Analyst
HahnTech Affiliated With Code Constructors
Edmonton, Alberta, Canada
Email: rhahn82@telus.net
|
|
|
|
|
System.Collections.Hashtable does not support sort order. It stores the data as Key, value pair.
Though I just found an article dealing with what you want.
Hashlist - Hashtable meets ArrayList
[^]
Hope this helps you.
|
|
|
|
|
Thanks!
Ronald Hahn, CNT - Computer Engineering Technologist
New Technologies Analyst
HahnTech Affiliated With Code Constructors
Edmonton, Alberta, Canada
Email: rhahn82@telus.net
|
|
|
|
|
Hi,
I want to export some data from an Excel file to a Database.
How can I connect programmatically to Excel?
How can I export from Excel to Databse?
|
|
|
|
|
I suggest you do a search for excel on codeproject. I found lots of useful articles on CP about this. I cannot remember the name of the article, but there is a good one on connecting to Excel using ODBC which I think will help you a lot, as you could load this information into a dataset, then connect to sql, etc.
|
|
|
|
|
Thanks.
But I couldn't find so in CP.
|
|
|
|
|
I dont know, I did a search and came up with a lot to do with Excel. But here is the address anyway: www.codeproject.com/csharp/Excel_using_OLEDB.asp
|
|
|
|
|
I have been using VC++6 IDE for a while. I just aquired Visual Studion.net.
I would like to start using the VS.NET IDE. What is the best way to open VC++6 projects in VS.NET?
|
|
|
|
|
try the VC, Managed C++, MFC messege boards
there are no facts, only interpretations
|
|
|
|
|
I think you can simply open the project with VS.NET which then offers you to convert it.
www.troschuetz.de
|
|
|
|
|
Dear sir,
i have created an array list called LiveClients.and i have a object(C1) which consists of attributes like (Thread Mythread,Endpoint Myendpoint,string Name,Socket MySocket).those properties are in a Class called client.
When i 'm going to add above C1 object into my ArrayList it raise exception
called nullpoint....,how do u solve this prob.
also can anyone tell me how can i find yahoo or msn imotion icons.i just
want those smiley's seperately in ico format.
AMAL@SLIIT
|
|
|
|