Thanks for both answers. I understand now ;)
The more you know the more you know how little you know, you know?
Thanks for both answers. I understand now ;)
The more you know the more you know how little you know, you know?
I'm doing a program that runs a math algorithm, and so should be very accurate. However, I'm facing this problem: 0.2+0.1<>0.3! The code: For i = 0 To 100 Step 0.1 Stop Next After the 4th stop i should be 0.3, but it's 0.30000000000000004! Of course the difference is not big, but my program should be as accurate as possible. I have no idea what can cause this.:confused: Any explanation would be welcome.
The more you know the more you know how little you know, you know?
I used the following code:
Declare Function LoadCursorFromFileA Lib "user32.dll" (ByVal lpFileName$) As IntPtr
Sub LoadCur()
Cursor = New Cursor(LoadCursorFromFileA("c:\windows\cursors\3dgarro.cur"))
End Sub
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
LoadCur()
End Sub
It works perfectly with every cursor file (even animated ones). Thanks! :-D :-D :-D
The problem is not about the golden arrow, it does not work with any cursor. :sigh: (Anyway, the golden arrow was installed with my XP Prof by default, not optional, no extra-pack or sg like that.)
Hi In my program I would like to use a cursor from windows\cursors. In the Load event I use the following code: Cursor = New Cursor("c:\windows\cursors\3dgarro.cur") (This is a built-in cursor of Windows.) However, the result is a plain black arrow instead of the 3D golden one. (I tried with other cursors too, the result is always a black arrow.) I have no idea what the problem is. :( Any advices would be welcome.
Thanks ;) ;) ;)
Hi, If there was any On Error or Try statement in my code I would understand, but there isn't! :confused: Yes, with a string array it works :-D . Tnx
Hi I'm writing a program that has a ListBox control. If the user drags a file and drops it on the listbox, the filename should be added to the list. I'm using the following code:
Private Sub ListBox1_DragEnter(ByVal sender As Object, ByVal e As System.Windows.Forms.DragEventArgs) Handles ListBox1.DragEnter
If e.Data.GetDataPresent(DataFormats.FileDrop) Then
e.Effect = DragDropEffects.Copy
Else
e.Effect = DragDropEffects.None
End If
End Sub
Private Sub ListBox1_DragDrop(ByVal sender As Object, ByVal e As System.Windows.Forms.DragEventArgs) Handles ListBox1.DragDrop
Stop 'This is called
Dim s$ = e.Data.GetData(DataFormats.FileDrop, True) 'Why does this exit the sub?
Stop 'This not
'...
End Sub
As you can see, I put 2 stop statements in the DragDrop event. The first of them is called and stops debugging, but then e.data.getdata somehow exits the sub, and so nothing happens. Is it even possible that a procedure exits the sub it is called from (without exiting the thread)??? I'm very confused :confused:; I would be grateful to anyone who could give me an explanation for this.
Hi My program should prevent certain processes' IO operations, and only perform them if the user clicks Yes in a Yes/No dialog. Can this be done? And anyway how can I check wether those processes are running? Probably there is an API or sg for that, but I'm new to this part of programming. Much thanks in advance :)
How can I set an image file as the user's desktop background image? Thanks :doh:
Sorry I didn't write clearly, my problem is the following: I've a form, and controls in it. I want to get the same image that the user sees on the screen. If I don't use graphics, I can use DrawToBitmap method. But what should I do if I use graphics too??? :doh:
Merry Christmas to everyone! Don't you know how I can get the image my form looks like? I've tried DrawToBitmap method, but with that I didn't get the graphics, just the controls. Please help if you can.
Thanks :-D
Thanks
I'll be very grateful if you send me the code. Much thanks
Hi! I've the following problem: I've two bitmap variables, and I want to check that they contain the same image or not. If I try to use the "=" operator, I get an error message. I wrote a function what examines every pixel (by setpixel and getpixel methods), but it makes the program very slow. Isn't there a faster way? Thanks in advance.
Thanks very much:->
There's a picture in a program (not mine). How can I simulate a click on the picture? (I know the coordinates) Thanks, SMA
How can I show the contents of a webpage in my program? (F. e. if I'm making a web-browser) The real $M@