Search:
Type: Posts; User: squared
Search:
Search took 0.01 seconds.
-
Here are some Adobe-style controls I created. Feel free to suggest new ones. This is a work in progress.
Unfortunately, I don't have the correct font right now. It will be packaged with the next...
-
Cleaner and type-safe code would be this:
Dim r As New Random()
Dim r1 As Integer = r.Next(1, 7)
Dim r2 As Integer = r.Next(1, 7)
Me.Label1.Text = r1.ToString()
Me.Label2.Text = r2.ToString()...
-
Here is a bit of code to use for 9-slice scaling. For now, all corners must have the same dimensions, but I hope to change that later on.
Module Extensions
...
-
-
Using the SendKeys class is a bad way to do anything. Instead, you may use Graphics.CopyFromScreen to do the same thing, and Bitmap.LockBits to increase performance:
Private Function...
-
The start you have could lead to some confusion, as this:
Me.InchesNumericUpDown1.Text = Me.InchesNumericUpDown1.Text
Would actually change the value. I believe you are better off handling the...
-
Reference types default to Nothing, and value types to 0 (numeric) or Empty (structure types with all the fields at the default value). So there is no need for an = Nothing, = xxx.Empty, or = 0...
-
I would also suggest removing the = Nothing initializers, using bytes(1023) instead of bytes(1024) (in VB.NET, you define the upper boundary and not the length), using IO.File.WriteAllText instead of...
-
Me.(Name of Button).Enabled = (Me.(Name of Listview).Items.Count > 0)
Put this in a Sub and call it whenever you change the ListView.
-
There is a convenient second parameter to the method that will remove the $ sign for you and also is more globalization-friendly:
Decimal.Parse(item.ToString(),...
-
So what is the problem now?
-
That seems incredibly lazy of you, and I don't blame you for wanting to avoid it.
-
Firstly, as far as I know, without "manually" recursing through the files (as opposed to using SearchAllSubdirectories) you cannot have any sort of progress indicator or thread pool threading. So you...
-
May we see the code you are using to draw the graphics? With any lag at all on a computer like that, you are doing something wrong.
-
Here is a simple "frame" for what you want (assumes Imports System.IO and System.Threading):
Private Sub SearchFolder(ByVal folder As Object)
Dim di As DirectoryInfo = DirectCast(folder,...
-
@Zach_VB6, unlike C#, in VB.NET when you define an array you are defining the upper boundary, not the length, of the array. So the code is fine as is.
-
Alternatively, you can use FindWindow and Form.FromHandle and click the button using .Controls("button name").PerformClick() as usual.
-
Personally, I would use:
Dim p As New Security.Cryptography.SHA1Managed()
Dim r() As Byte = p.ComputeHash(System.Text.Encoding.Unicode.GetBytes("String to hash"))
Return (From x As Byte In r...
-
Option Strict-compliant, safer, and more customizable version:
Private Sub MakeRound(ByVal c As Control, Optional ByVal radius As Integer = 20)
Dim p As New Drawing2D.GraphicsPath()
...
-
I'm sorry, but could you please state your question a bit more clearly? What exactly do you mean this custom control to do?
-
I don't quite understand your question - do you mean that you want to run the files as they are being downloaded? I will assume that your question is not to run the files without downloading them...
-
Create an HttpWebRequest and request the directory. If an exception is thrown, it does not exist.
Try
Dim w_rq As WebRequest = WebRequest.Create("http://forum.com/directory")
...
-
I would have thought that was obvious:
Using saveDialog As New SaveFileDialog()
If saveDialog.ShowDialog() = DialogResult.OK Then
Using wc As New Net.WebClient()
...
-
It is exceedingly simple:
Using wc As New Net.WebClient()
wc.DownloadFile("http://example.com/page.html", "C:\savefile.html")
End Using
-
Here it is, though I didn't implement merge. Maybe I will in a future project, this is a good idea.
On my computer, it took about 7 minutes to identify duplicates in my personal folder...
-
I'm currently writing an example program for you, but it's proving to be quite a large task, compared to what I originally thought.
-
MD5 checksums would be very reliable in this case. Create an index of the files on the hard drive along with their MD5 hash values, then compare each item to all the other items to see if they are...
-
Use List(Of t) instead of ArrayList, BTW.
-
No. Even on Windows XP, you could not access some modules. In your For loop, instead of this:
If target.Modules(d).FileName.Contains("mydll") Then
ModHandle =...
-
You should give it a try, first - I have created many tower defence games that redraw the whole screen, and with DoubleBuffered=True, there is no noticeable performance difference.
-
I believe that the easiest way to solve this is to just create a custom dialog. There are many Explorer-style-control examples in various programming forums, including this one.
-
I suggest using GIFExplode (http://www.gifexplode.com/) to convert your GIF into a series of images, and then use the Graphics object to display the frames, staggered for each instance of the image....
-
Write a Javascript interpreter in an object-oriented way. That should be quite a challenge.
Personally, I'm writing a syntax highlighter + IntelliSense + cross-browser-verification editor for...
-
Let me clarify. You are looking for a way to count a node's child nodes, correct? What information do you have? Do you have the node whose children you want to count? A child of that node? The name...
-
So, what information do you have? The child of the parent?
(childnode).Parent.Nodes.Count
-
I believe what you want is this (although I'm not quite sure - your question is not very clear):
var toExtend = [/* array of strings of the functions to extend */];
for(var i = 0; i <...
-
@sapator: Just because a directory's name ends in "simon" doesn't mean it's the directory he is looking for - a more accurate check would be If d.ToLower() = "simon". However, I believed the variable...
-
Did you want to search recursively? If so:
Dim s As New Stack(Of IO.DirectoryInfo)
s.Push(New IO.DirectoryInfo(sDir))
While s.Count > 0
Dim pdi As IO.DirectoryInfo = s.Pop()
For Each...
-
Using wc As New Net.WebClient()
wc.DownloadFile("http://theegyptianlegend.co.cc/iPhodroid/downloadi", "C:\tempFile.zip")
End Using
Then http://www.vbforums.com/showthread.php?t=360169
-
I was just wondering if mixing SyncLock blocks and Monitor.Enter/Exit statements is dangerous. I know SyncLock uses Monitor and a Try block in the background, but are there any problems with using...
|
Click Here to Expand Forum to Full Width
|