I'm trying to find a drag and drop cursor for use in a program. It is not in the standard Windows cursors. It's the one you see when moving a control in Visual Studio or when reordering slides in powerpoint - arrow with rectangle below. Please let me know if you know where I could locate one.
I think you can find some information, about cursors, here.
He also mentioned that you can create some cursors by yourself with Visual Studio.
You can copy it.
Create a scrap windows forms app to copy the cursor.
Add the following code:
This code is by no means special and is for one purpose. Copy the cursor image and then delete the app.
Public Class Form1
Private WithEvents t As New Timer
Private Sub Button1_MouseDown(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles Button1.MouseDown
t.Interval = 1000
Private Sub t_Tick(ByVal sender As Object, ByVal e As System.EventArgs) Handles t.Tick
Dim b As New Bitmap(Cursor.Current.Size.Width, Cursor.Current.Size.Height, Imaging.PixelFormat.Format24bppRgb)
Dim g As Graphics = Graphics.FromImage(b)
Static c As Integer = 1
b.Save("C:\cursor" & c & ".gif", Imaging.ImageFormat.Gif)
c += 1
Private Sub Form1_DragEnter(ByVal sender As Object, ByVal e As System.Windows.Forms.DragEventArgs) Handles Me.DragEnter
e.Effect = DragDropEffects.All
Private Sub Form1_DragDrop(ByVal sender As Object, ByVal e As System.Windows.Forms.DragEventArgs) Handles Me.DragDrop
After you have the image. Create a new cursor file in the project you want it in.
File/New File/General/Cursor file
Open the image you created from before in MS paint, or something else, and copy and paste it into the new cursor file. You may have to outline the image in black after you paste it. Use the hot spot tool to set the hot spot at the tip of the arrow.
Save it and close it.
If you didn't name it you should see Cursor1.cur in your project.
Click on it.
Set the Build Action to embedded resource.
Set the Copy to Output to Copy if Newer.
When you want to use it:
Me.Cursor = New Cursor(Me.GetType(), "Cursor1.cur")
by __avd: Added [code] tags.
I should say:
Hold the mouse down on button1 and while keeping the mouse held down move the mouse into the form. It should display the cursor your looking for. Keep the mouse held down for a couple of seconds and let it up. After that, You will have the cursor image saved to c:\cursor1.gif or where ever you rename the directory to.