Search Results - VBForums

Search:

Type: Posts; User: dbasnett

Page 1 of 13 1 2 3 4

Search: Search took 0.20 seconds.

  1. Replies
    14
    Views
    228

    VS 2008 Re: [RESOLVED] Read Text File in Reverse?

    If it is OK to read the entire file then the methods presented would work. Here is an alternative that reads the file in chunks from the end. Just thrown together so it isn't tested completely, but...
  2. VS 2013 Re: How to do 16 bit Unsigned Short byte flip ?

    I was writing assembler for the Navy in the 70's also, though it wasn't my first assembler. If the Q had been about doing it in assembler...
  3. VS 2013 Re: How to do 16 bit Unsigned Short byte flip ?

    Speed comparison because I found it hard to believe that XOR would be faster:


    Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click

    Debug.WriteLine("")...
  4. VS 2013 Re: How to do 16 bit Unsigned Short byte flip ?

    The flipping part will look like this


    Dim b() As Byte = New Byte() {2, 0, 13, 78, 10, 20, 40, 80}

    For idx As Integer = 0 To b.Length - 2 Step 2
    Dim h As Byte =...
  5. Replies
    8
    Views
    135

    Re: Prevent Focus on textbox in code

    Create an invisible label on the form. If there are zero controls that can receive focus select the invisible label.
  6. Re: VB.NET Serial Port Help - Issues with open and closing then reopening and closing

    The code I posted was supposed to be ran in a new project. The intent was to prove (or not prove) that the problem wasn't with opening an closing. All you should have to do is change the port name....
  7. Re: VB.NET Serial Port Help - Issues with open and closing then reopening and closing

    In the button click handler a thread is created to open and close the port several times.
  8. Re: VB.NET Serial Port Help - Issues with open and closing then reopening and closing

    Using the code I posted can you confirm that this happens. My suspicion is that the real code is processing an event on another thread when the close is attempted.
  9. Re: VB.NET Serial Port Help - Issues with open and closing then reopening and closing

    My guess would be that the serial port is handling one of its events when you attempt to close it. To ascertain if the port will fail on close if there is no activity I wrote the following test:

    ...
  10. Re: How to make VB.NET Garbage Collector Example?

    A minute right. :)
  11. Replies
    2
    Views
    139

    VS 2010 Re: Get last line in multitextbox

    Textbox controls have a property that is the lines already, so to loop through them:


    'loop all messages that aren't blank
    For Each ln As String In...
  12. Re: Help Needed with a basic threading Problem

    This counts words based on starting letter and shows the counts with a random color. Runs fine with the synclock, and the error is reproduced if the synclock is removed or the lock object scope is...
  13. Replies
    2
    Views
    157

    VS 2013 Re: Convert string to hex byte

    This should answer your question:

    http://msdn.microsoft.com/en-us/library/c7xhf79k%28v=vs.110%29.aspx
  14. Replies
    24
    Views
    369

    VS 2012 Re: Picturebox to SerialPort

    Who is the manufacturer and what is the part number?
  15. Replies
    24
    Views
    369

    VS 2012 Re: Picturebox to SerialPort

    A complete description of the LCD screens (and / or a link) would be of great help.
  16. Replies
    24
    Views
    369

    VS 2012 Re: Picturebox to SerialPort

    How are your monitors connected? Normally they are NOT connected via serialports.
  17. Re: serialport datareceived pls help me(arduino to vb.net)

    https://social.msdn.microsoft.com/Search/en-US?query=vb%20.net%20string.length&emptyWatermark=true&searchButtonTooltip=Search%20MSDN&ac=5
  18. Replies
    11
    Views
    360

    Re: Chart impact on timer

    Not sure how you are acquiring data, but you shouldn't have a problem doing that at 50Hz, though using a timer isn't likely to be the best approach.

    Showing the results, especially with a chart...
  19. Re: Convert Text Box String into Hexadecimal Value?

    If you are converting the hex string to a byte array to send to the serialport take a look at this:


    Dim s As String = "12345678900F"
    'force even num of chars
    s =...
  20. Replies
    7
    Views
    733

    Re: Calculate Holidays

    I didn't check them all but that looks correct.
  21. Replies
    7
    Views
    733

    Re: Calculate Holidays

    2005 didn't have automatic getter / setters. If you want to use this in 2005 you will need to change each property. For example here is how name would look.

    Private _name As String 'backing...
  22. Re: Splitting Arduino data in Visual Basic? Serial connection issues?

    If the string being sent from the Arduino is not a specific length, change the Arduino Serial.print to print a newline (Serial.print('\n'); ) after the data.
  23. Re: Splitting Arduino data in Visual Basic? Serial connection issues?

    When you do .ReadExisting you may or may not be getting a full message from the device. It is likely that you will have to buffer the incoming data until you have a full message and then process...
  24. VS 2010 Re: Random.Next - Not Very Random At All... (Solved)

    If I use a random in a class I use it like this:


    Public Class someClass
    Private Shared prng As New Random 'only one

    Public Function someRand() As Integer
    Return...
  25. Replies
    19
    Views
    511

    Re: Does this justify using Goto

    test simplified

    Private Function test() As String
    Dim cases As New List(Of String) From {"A", "B", "C", "D"}
    Dim index As Int32 = 0
    Dim ret As String = "*"
    ...
  26. Re: Threading.Timer and Thread.Sleep - unexpected interaction

    I would expect that the timer tick code can be blocked if the UI thread has executed the sleep. Lets say that right before the tick is going to happen the button is pressed. It puts the UI to sleep...
  27. VS 2010 Re: [RESOLVED] How to check if the current day is the first weekday of month?

    What Kebo said.



    ''' <summary>
    ''' is Date the first Weekday (M-F) of the month
    ''' </summary>
    ''' <param name="someDate">the date to check</param>
    ''' <returns>true if...
  28. Re: [RESOLVED] Text highlighting by default... unwanted.

    The control with the lowest tabindex that is visible and enabled gets the focus when the form is shown. If two control have the sane index then the z-order is is used to pick.
  29. Replies
    4
    Views
    271

    Re: Adjusting Time

    I have to ask the obvious question, are all the machines using a NTP time service to set their clocks?

    Glad to see you weren't blown away.
  30. Replies
    9
    Views
    386

    VS 2008 Re: Error when application exits.

    Try me.close to close the app.
  31. Replies
    8
    Views
    356

    VS 2012 Re: Template with DLL Reference

    In the .vbproj file for the project that creates the template I changed the HintPath to have the absolute pathname of the DLL. I then created the template and when I used it, the resulting project...
  32. Replies
    8
    Views
    356

    VS 2012 Re: Template with DLL Reference

    The problem is that the hint path has a relative path instead of an absolute path. The path in the reference is absolute.
  33. Replies
    6
    Views
    242

    VS 2013 Re: Countdown Timer Inconsistency...

    Something to think about.


    Public Class Form1

    Private ticker As New Threading.ManualResetEvent(False)
    Private interval As New TimeSpan(0, 0, 0, 0, 20) 'timer interval in ms.
    ...
  34. Replies
    6
    Views
    242

    VS 2013 Re: Countdown Timer Inconsistency...

    I agree that it depends on your system. I have a year old Dell system, and the clock was off by 30 seconds or more in a week. I have never had a system that was much more accurate, though some of...
  35. Replies
    6
    Views
    242

    VS 2013 Re: Countdown Timer Inconsistency...

    The Windows clock is notoriously inaccurate. If this system is not using Internet Time (NTP) to set its clock then do so. You will also need to change the frequency.

    Also, if you are using a...
  36. Replies
    8
    Views
    356

    VS 2012 Re: Template with DLL Reference

    I have a project that produces the DLL. The template project has a reference to that.
  37. Replies
    8
    Views
    356

    VS 2012 Re: Template with DLL Reference

    Same machine, same account.

    When I create the new project from the template the path in the references section of the project properties says, "<The system cannot find the reference specified>"
  38. Replies
    8
    Views
    356

    VS 2012 Template with DLL Reference

    I am working on creating a new starting point(template) for all of our new applications so that as much as possible they have the same look and feel. The template has reference to a common DLL we...
  39. Replies
    3
    Views
    195

    Re: Define a colour.

    Dim Baise As Color = Color.FromArgb(50, 170, 60)
  40. VS 2010 Re: Find First and Last Day of Week

    Something like this (not thoroughly tested):

    next Sunday, previous Saturday

    Dim someDay As Date = #11/27/2014#

    Dim nextSunday As Date = someDay.AddDays(7 - someDay.DayOfWeek)...
Results 1 to 40 of 500
Page 1 of 13 1 2 3 4



Featured


Click Here to Expand Forum to Full Width

Survey posted by VBForums.