Jump to content
Xtreme .Net Talk

snufse

Members
  • Posts

    10
  • Joined

  • Last visited

About snufse

  • Birthday 06/09/1951

Personal Information

  • Occupation
    programmer
  • .NET Preferred Language
    vb

snufse's Achievements

Newbie

Newbie (1/14)

0

Reputation

  1. TimerObject It worked. I had to tweek it a little (running VB). Here is the code: Public Sub myTimeHandler(ByVal sender As Object, ByVal e As EventArgs) myTimer.Stop() If myLoopCounter < myLoopNumber Then ListBox1.Items.Add("Hello World") 'example but code goes here myLoopCounter += 1 myTimer.Start() 'or use the myTimer.Enabled = True End If End Sub Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click AddHandler myTimer.Tick, AddressOf myTimeHandler myTimer.Interval = 1000 'milliseconds myTimer.Start() 'or use the myTimer.Enabled = True End Sub
  2. I have an application that loops through a set of code a certain number of times. After each loop I need to pause the process for number of seconds and then iterate through the loop again. In VB 2003 I used Thread. Sleep(no of seconds) and it worked fine. I also used Thread.Suspend and Resume which are not supported in VB 2005. Any ideas how I can do the same in VB 2005 without using Threading? Thanks.
  3. Fantastic, it worked !! Thank you ......
  4. I have a CheckedListBox where I select/click an item (line) and perform some function. When done I want to reset the CheckedListBox. I use the CheckedListBox.ClearSelected() but my checkmark does not get removed? Any ideas.
  5. I Have a FormView and an insert template. I need to validate the input (using the Inserting event). What is the syntax for accessing each column in a data row ?
  6. I am using the FormView control to insert data into a table. One of the rows is a date/time field. This value will have to be programatically inserted (and not by the user). I am using the OnItemInserting="GetDateTime" to execute a sub Public Sub GetDateTime(ByVal sender As Object, ByVal e As FormViewInsertEventArgs) MyDateTime = Today End Sub From here how do I get the data into the row ????? I have tried using the edit data binding wizard and the custom binding option like "Eval(MyDateTime)" but I get error.
  7. I am using the following code to get the elapsed time for a process. The difference is calculated and added to a list box. On first pass the difference in time is calculated and on all subsequent passes elapsed time shows as zero? Here is the code: Do Dim FromTime As DateTime = DateTime.Now ... Here goes the code wich is a call to a stored procedure .... Dim ToTime As DateTime = DateTime.Now Dim TimeDifference As TimeSpan = ToTime.Subtract(FromTime) Dim DifferenceInMilliseconds As Double = TimeDifference.TotalMilliseconds ListBox1.Items.Add("Processing Time: " & DifferenceInMilliseconds.ToString & " ms") Loop
  8. I am trying to configure a connection to an AS/400 (DB2). I am trying to add an assembly reference opening a list of .Net components. I am looking for "IBM DB2UDB for iSeries .Net Providers" but cannot see it. This will allow me to use the wizard to configure the connection. Any ideas why it does not show up in the list? Do I specifically have to download this component? Thanks.
  9. I have a program where a loop should iterate every 30 minutes. Can I use a Sleep or Wait? Thanks.
  10. I need to calculate performance on a stored procedure call and looking for ways to calculate elapsed time in milliseconds. I am using following code that gives me only seconds: Dim FromTime As Date = Now executeROApproval() Dim ToTime As Date = Now Dim DifferenceInSeconds As Long = DateDiff(DateInterval.Second, OldTime, NewTime) Dim SpanFromSeconds As TimeSpan = New TimeSpan(0, 0, DifferenceInSeconds) Any good ideas? Thanks.
×
×
  • Create New...