Search:
Type: Posts; User: .paul.
Search:
Search took 0.11 seconds.
-
-
-
Even with something simple like a bubbleSort?
-
ProductCollection = ProductCollection.OrderBy(Function(n) n.Name).ThenBy(Function(n) n.ID)
-
Instead of…
dgScheduler.CurrentCell = Nothing
Try…
dgScheduler.EndEdit
-
If you're trying to drag a Form or a Control...
(To drag a Control is slightly different)
Private Sub Form1_MouseDown(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs)...
-
👍 That’d work. But I thought the original random numbers were 1-58 and should’ve been 1-59 inclusive
-
That would mean…
Dim allNumbers() As Integer
Would have to be changed to…
Dim allNumbers
-
Shuffling the full 59 numbers and taking the first 6 would be something like this..
Dim Lotto() As Integer
Dim allNumbers() As Integer = Enumerable.Range(1, 59).ToArray
Dim RndLotto As New...
-
There were a couple of points i noticed. Check the comments...
Dim Lotto(5) As Integer ' if you want a 6 element array
Dim RndLotto As New Random
For x As Integer = 0 To...
-
Why not a Form you’ve designed at design time? You can add controls to a Form at run time, but in most cases you wouldn’t…
-
The problem is that you haven't dimensioned the array - you're attempting to use elements that don't exist
Redim Preserve inventory(intCount)
With inventory(intCount)
.strProductNumber =...
-
First... Is this a VB.Net question??? Is this an Access VBA question???
The two aren't interchangeable - they're different technologies, and the answer to your question depends on the answer to...
-
That’s not how ExpandoObjects work. That’s how EqualityComparers and Linq work. The same methods would work with any List(Of Custom Class)…
-
You could use Linq, but I’m guessing you don’t just want to find an element? It’d make more sense to find an index…
To test for exists…
Public Function ObjExistsInListofExpando(ByVal value1...
-
Viola??? :D
et voila, ça a marché
-
If you’re trying to use ‘e’ as a variable name in an event handler sub, it conflicts with the ‘e’ for eventargs in the signature. Just use a different variable name…
-
Client Profile supports just a subset of the full framework. Changing that will have positive effects…
-
Why would you even consider converting dragdrop code?
The two operations are not similar or related. You need to write it from scratch...
-
-
As jm said, there's nothing in the framework for sorting a 2D array, but you can use a simple bubble sort for an array of any complexity...
(Defining an object would be a more professional approach,...
-
It's simple enough to do as you originally wanted, but you need to run this code every time a form loads or closes...
ComboBox1.Items.Clear()...
-
An MDI form has a built in WindowList feature, which is a part of a menu item. The ms link I provided shows you how to implement a WindowList in a menu. As JM told you, that’s available in both c#...
-
https://docs.microsoft.com/en-us/dotnet/desktop/winforms/controls/how-to-create-an-mdi-window-list-with-menustrip-windows-forms?view=netframeworkdesktop-4.8
-
Later versions of VB.Net don’t explicitly use ByVal in signatures. None of those parameters you’ve shown would be ByRef.
-
That’s what happens and also the indexoutofrange exception
-
If you remove items from a collection while looping through that collection, the indices are thrown out of alignment. Looping in reverse doesn’t cause that problem.
-
I really do need to see your code, to see where it’s gone wrong. I’m not there looking at your screen and you’re not telling me what you’re seeing, except for the errors you’re getting. I tested all...
-
You might have ambiguous names. Variables and controls named the same name, etc. Why declare an openfiledialog in the form if you want to use it in the module?
-
What is the name of the openfiledialog in form1 (or form2, wherever your dgv is)?
What is the name of the DataGridView in the same form as ofd?
Your use of modules is what is causing these scope...
-
Why use Modules? Just put the bgw in the form code for the form where the dgv resides
-
You need to post your latest code for me to see your errors
-
Public Class Form1
Private WithEvents bgw As New System.ComponentModel.BackgroundWorker
reportprogress safely passes data from your bgw thread to your ui thread...
-
This is slightly faster...
Public Class Form1
Private WithEvents bgw As New System.ComponentModel.BackgroundWorker
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e...
-
It's still not quick, but this removes the app freezing part...
Public Class Form1
Private WithEvents bgw As New System.ComponentModel.BackgroundWorker
Private Sub...
-
I'm trying to create a file with 100,000 lines and 10 fields with test data. I'll let you know when it's working...
-
I'd suggest a BackgroundWorker, and AddRange. I'd get it working for you, but i have no files to test it with.
-
Try this...
Dim rows As New List(Of DataGridViewRow)()
Dim TextFieldParser1 As New Microsoft.VisualBasic.FileIO.TextFieldParser(OFD.FileName)
TextFieldParser1.Delimiters = New String() {","}
...
-
It’s definitely the repainting. You would see much better results if you create a list(of DataGridViewrow), then use AddRange to add it all at one time…
-
The dgv repainting is the bottleneck. There's an AddRange method you could use, shown here...
https://stackoverflow.com/questions/148854/adding-rows-to-datagridview-with-existing-columns
|
Click Here to Expand Forum to Full Width
|