Leaders snarfblam Posted August 8, 2003 Leaders Posted August 8, 2003 Does the .net framework directly support colored mouse cursors? Quote [sIGPIC]e[/sIGPIC]
Administrators PlausiblyDamp Posted August 8, 2003 Administrators Posted August 8, 2003 the msdn link http://ms-help://MS.VSCC.2003/MS.MSDNQTR.2003FEB.1033/cpref/html/frlrfsystemwindowsformscursorclasstopic.htm seems to indicate only Black and White. Quote Posting Guidelines FAQ Post Formatting Intellectuals solve problems; geniuses prevent them. -- Albert Einstein
Madz Posted August 9, 2003 Posted August 9, 2003 But we still have an option to use our Custom Colorful Cursons in our Windows Froms Application Quote The one and only Dr. Madz eee-m@il
Diablicolic Posted August 9, 2003 Posted August 9, 2003 We can change the cursor?! How what?! Quote "Reality is fake, Dreams are for real"
Madz Posted August 9, 2003 Posted August 9, 2003 Well I guess this would help us adding a new colorful cursor in our application. Quote The one and only Dr. Madz eee-m@il
Diablicolic Posted August 9, 2003 Posted August 9, 2003 Oh cool, do you know how to use the cursor files, like how to make them work on the application? Oh dur... On the form I just remembered there was an icon property, well I'll brb I'm going to check it out. Trying out myself --> MSDN --> Google --> Then I'm back here. Quote "Reality is fake, Dreams are for real"
*Experts* mutant Posted August 10, 2003 *Experts* Posted August 10, 2003 You have to use the Cursor property of your form to set it. You would have to set the custom cursor from code as you cant do it in the designer. Me.Cursor = New System.Windows.Forms.Cursor("filename, stream or handle to the cursor") Quote
Diablicolic Posted August 10, 2003 Posted August 10, 2003 Dangit, just when I figured things out lol. This is what I got: 1) Right-click solutions, add either new item (cursor file), or an existing cursor file that you can browse. 2) Select the cursor that's on the solution explorer, make the file an embedded source. 3) Now if your project name is: Cursorz And the cursor name in your project is: Cursor1 Then this code should work 100%: Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Dim s As System.IO.Stream Try s = Me.GetType().Assembly.GetManifestResourceStream("Cursorz.Cursor1.cur") Me.Cursor = New Cursor(s) Catch Ex As Exception MessageBox.Show(Ex.Message, "No Stream!") Finally If Not IsNothing(s) Then _ s.Close() End Try End Sub BTW I copied this from: Here Quote "Reality is fake, Dreams are for real"
Leaders dynamic_sysop Posted August 10, 2003 Leaders Posted August 10, 2003 you dont really need to even add the IO.Stream , here's 2 ways to add the new cursor.... way1 : MyBase.Cursor = New Cursor(Me.GetType().Assembly.GetManifestResourceStream("count_down.Cursor1.cur")) way2: MyBase.Cursor = New Cursor(GetType(Form1).Assembly.GetManifestResourceStream("count_down.Cursor1.cur")) hope it helps. Quote
Leaders snarfblam Posted August 19, 2003 Author Leaders Posted August 19, 2003 Back to the black and white thing... I used code along these lines: me.cursor = new cursor(filename.cur) and even though the file contained a colored cursor, it displayed in black and white. Will using any other methods on this page result in colored cursors? Quote [sIGPIC]e[/sIGPIC]
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.