MatP Posted January 28, 2005 Posted January 28, 2005 I've created a new UserControl, in my project I added a new cursor file, and draw it myself. Now, I would like the cursor to be added in the DLL file when my project is compiled. And, I want to be able in my UserControl to refer to the cursor that I added in the project, not to the filepath of the cursor wich would mean I must distribute the DLL file AND the Cursor File... a kind of: myCursor = Cursors.LoadFromThisProject("myCursor.cur") and not myCursor = New Cursor(Application.StartupPath & "\myCursor.cur") because this one tells me, when I try to add my control to a form, that it couldn't find "C:\program files\Microsoft Visual Studio .Net 2003\common7\IDE\mycursor.cur" file. I tried adding an imageList then adding Cursor files, but it doesn't seem to work like the ICO file. I can't add .CUR file to the imagelist. Thanks for the help, Quote
donnacha Posted February 1, 2005 Posted February 1, 2005 You probably need to make it an embedded resource that is compiled into the dll and then use the resource manager to access it. Quote Hamlet
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.