Implement A Sort Function In My Program?
Jan 25, 2010
I'm looking to implement a sort function in my program however I am new to VB and don't know how to. Basically I have 6 objects in my program racing across the screen and what I would like is a leaderboard showing the current top 3.
View 13 Replies
ADVERTISEMENT
Oct 20, 2010
I am trying to implement Selection Sort in vb.net using recursion. Problem is that I keep getting stackoverflow if the array I want to sort is 1000 elements. I can't find the problem. I don't know much about stack overflow or how to check it. From my research the problem could be infinite recursion but I check for that and exit the sub.Here is the main code:
Public Class SelectionSort
Inherits DefaultSort
Public Sub New(ByVal num As Integer)
[code]...
Everything should work as far as I know. It works on an array of 10 elements and an array of 100 elements.
View 1 Replies
Feb 3, 2009
I'm trying to implement a bubble sort on an 2 dimensional array. However the results after the bubble sort have not infact been sorted at all! I am trying to sort by the 7th item in the 2nd dimension. The other items are not important as they just contain other data but I would like to have the data kept together instead of creating another array for the bubble sort.
Public Function bubblesort()
Dim array(999, 7) As String
array = Home.userinfo 'Load the array from the Original form
[code]....
View 3 Replies
Feb 1, 2012
I am trying to implement map function in VB.NET and I have tried the below.
Function Map(a,f)
Dim i
for each i in a
f(i)
[code].....
But the above code is not working and saying alert is not declared.
View 2 Replies
Mar 1, 2010
I am using the Array type .Sort function to sort my array.By default it places the result Array into Ascending order Least to Greatest How do I change that to Descending order Greatest to Least?and How do I change it to Closest to logic? or does that not exist?Assume there is an Array of Numbers 0,13,21,-2,4,5,1.34 and I want them to sort closest to 0 or some other arbitray value; the Output should look similar to:
0,1.34,-2,4,5,13,21
View 19 Replies
Sep 23, 2011
How to Implement transaction in function for an XML file?
View 2 Replies
Nov 5, 2011
Im getting the following error on the code I transleted from C# to VB.NET below (original code can be found here:
Class 'QueryParameterComparer' must implement 'Function Compare(x As oAuthBase2.QueryParameter, y As oAuthBase2.QueryParameter) As Integer' for interface 'System.Collections.Generic.IComparer(Of QueryParameter)'.
[code]......
View 1 Replies
May 16, 2006
Is it possible to disable the "sort function" in datagridview that happens when pressing the header?
I would like display some data that you cant order by clicking on the columheader. Can you lock the headers somehow?
View 5 Replies
Aug 12, 2009
I'm trying to sort a list of string, which (each item) consists of a word followed by a space, then a number. I want to sort first alphabetically by the word, then numerically by the number. I tried something like this:
wordList = wordList.OrderBy(Function(x, y) CStr(x.Split(" "c)(0)).CompareTo(CStr(y.Split(" "c)(0)))).ThenBy(CInt(x.Split(" "c)(1)).CompareTo(CInt(y.Split(" "c)(1))))
View 5 Replies
Feb 2, 2010
I have the following multithreading function to implement threads fetching from a list of urls to parse content. The code was suggested by a user and I just want to know if this is an efficient way of implementing what I need to do. I am running the code now and getting errors on all functions that worked fine doing single thread.for example now for the list that I use to check visited urls; I am getting the 'argumentoutofrangeexception - capacity was less than the current size'/Does everything now need to be synchronized?
Dim startwatch As New Stopwatch
Dim elapsedTime As Long = 0
Dim urlCompleteList As String = String.Empty
[code]...
View 2 Replies
Mar 20, 2009
I need another (dozen) pair of eyes on this. The following code:
Interface iRuleEntity
Function GetRuleViolations() As List(Of RuleViolation)
End Interface
Partial Public Class Feedback
[code]....
is giving me this error:'Feedback' must implement 'Function GetRuleViolations() As System.Collections.Generic.List(Of RuleViolation)' for interface 'iRuleEntity'.
View 2 Replies
Aug 21, 2009
I am trying to implement a timer in my program and i am unable to do so till now.
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Static intCount As Integer
intCount = 10
While intCount <> 0
Dim fileReader As String
[Code] .....
How do I implement a timer that will close the IE after every 5 seconds till the count runs out?
View 27 Replies
Apr 8, 2012
I'm trying to implement a timer into my program, because I want to take a capture from a webcamdevice every x seconds.I've wandered around google all day and tried to implement all kind of timer classes (with system.threading because I can't use system.windows.forms.timer) but I won't figure it out!
View 14 Replies
Jun 16, 2009
I have an existing program, and it uses DLL files to do things I wish to implement a DLL in VB.NET the DLL's are not COM, they are standard call the method or function type DLL's
How would I implement the following in a VB.NET DLL extern "C" void __Export_TYPE HelloWorld(char *path)
View 9 Replies
Apr 8, 2009
I have the following function that loops through a directory and checks for a specified folder and file[code]...
View 1 Replies
Jul 7, 2009
I use VB.NET 2005 i need to implemente IMessageFilter for MSWord object.
View 8 Replies
Jul 16, 2009
I have an interface program written in VB .Net (VS2008xxx.dll). Is it possible to implement the Interface in a VB6 program (VB6xxx.exe)?
View 8 Replies
Jun 2, 2009
I am trying to implement a service object class for the POS for .NET library using VB9. Specifically, the BillDispenser class. I define my class and inherit from Microsoft.PointOfService.BillDispenser. As normal, it creates stubs for all the MustOverride (abstract) properties and methods that I need to override (I love that), EXCEPT for the events. Apparently thare two events defined as abstract (MustOverride) in the POSCommon base class, but VB doesn't generate stubs for them.[code]...
View 8 Replies
May 13, 2009
I try to implement undo in drawing program I want to save the bitmap after every drawing and push it to stack then when the user click the button it will change the image to the last bitmap saved in the stack here is my code
Private Sub PictureBox1_MouseUp(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles PictureBox1.MouseUp
Xend = e.X
Yend = e.Y
[code]....
View 3 Replies
Mar 30, 2010
I'd like to implement some very simple validation into a program I'm writing, but I have no experience in this area, so I'm not sure how to implement it.I'd like one to have one make sure that text entered in to a text box has only regular characters (A-Z, a-z), but I'm not sure how to go about it!
View 3 Replies
Feb 28, 2009
I want to implement copy, cut and paste in my drawing program (copy part of an image that is selected)I don't know how to start?
View 10 Replies
Oct 1, 2011
I want to implement drag and drop functionality in my program, but it isn't working. Here's the
vb.net
'I removed the code because it wasn't needed anymore ;)
I've set the AllowDrop property to true, and when I drag a file onto a program, the cursor changes to Unavailable, and I can't drop my file.
View 11 Replies
Apr 22, 2010
I'm trying to implement printing functionality into a simple program for my company. It's not necessary, but it would be a nice finishing touch for everyone. And really, in practice, my printing feature works. My problem is that each line is printed on a separate page of paper and I can't find a way to just like, print a page.
It doesn't have to be fancy. I know that I won't need word wrap, nor will anyone ever print more than one page. Here's my ginked & modified code thus far:
Private Sub PrintDocument1_PrintPage(ByVal sender As System.Object, ByVal e As System.Drawing.Printing.PrintPageEventArgs) Handles PrintDocument1.PrintPage
Dim linesPerPage As Single = 0
[Code].....
View 1 Replies
Apr 24, 2012
I want to implement the TCP KeepAlive in order to check dropped connections by running a timer.
In my case, I have a TCP Client (using socket class) and a third party server (i have no control on it).
How can i use the TCP KeepAlive on my TCP Client in order to check the connection state?[code]...
View 1 Replies
Dec 25, 2010
I'm a starting programmer, and for school I need to make a project.We need to make mastermind in VB.net.I already have one part of the task, (make it work singleplayer)but, we must make it possible to run the program with a sort of server, so 2 people can play witch each-other.I've worked hard on my multiplayer game, but if I want to startup my multiplayer I receive some strange message:url...The zip contains the server(we got that from our teachers), and my project.
View 2 Replies
May 15, 2010
i need to sort name as in the picture?
View 1 Replies
Jan 4, 2011
I want to write a program that can control port communication in a PC by blocking certain port based on the admins request and also monitor incoming and outgoing network traffic. Can i achieve this using vb.net winsock?
View 1 Replies
Nov 30, 2009
I'm a newbie in visual basic. We have a project in our school in implementing queue using circular array.
View 5 Replies
Dec 30, 2009
vb.net program to sort one string without using any built_in functions in either ascending or descending?
View 4 Replies
Mar 30, 2012
I am having a problem with the BackOrdered Function of my program. I can`t get it to say anything but 0 when I run the program. Another problem I am having is the input box pops up like 6 times and it`s only suppose to once. [Code]
View 9 Replies