Search Results - VBForums

Search:

Type: Posts; User: dbasnett

Page 1 of 13 1 2 3 4

Search: Search took 0.12 seconds.

  1. Thread: color dailog

    by dbasnett
    Replies
    1
    Views
    123

    Re: color dailog

    You can store the color as an integer using Color.ToArgb and then use Color.FromArgb once the integer value has been retrieved.


    Dim acolor As Color = Color.AliceBlue

    Dim...
  2. Sticky: Re: Contest 8 - Roman Numeral Converter - Discussion Thread

    Why not just change the rules to only 1 - 3999?
  3. VS 2008 Re: Calculating All IP Addresses in a Range (Pretty Good Start)

    FWIW - if you are working with IPv4 addresses you can treat the ip address as a number.


    ''' <summary>
    ''' converts a Net.IPAddress to an Integer
    ''' </summary>
    ''' <param...
  4. Replies
    15
    Views
    344

    VS 2013 Re: Random distribution in VB

    Having not heard of this I had to give it a try. I created this class:


    Public Class RandomSum
    ...
  5. VS 2012 Re: Letter Combinations - Comments / Suggestions

    Here is the math:



    Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
    For x As Integer = 10 To 3 Step -1
    ...
  6. VS 2012 Re: Letter Combinations - Comments / Suggestions

    I posted the wrong numbers. Both return the same count. From what I can tell testing 9 letters mine might be slightly faster.
  7. VS 2012 Re: Letter Combinations - Comments / Suggestions

    At one point I had added list = list.distinct which was great until there were 10 letters at which point I got an OOM error.
  8. VS 2012 Re: Letter Combinations - Comments / Suggestions

    It started off being recursive but with 10 letters I had issues. 9 letters produces 986,400 combos in approx. 200 ms., 10 letters is 9,864,090 in 2.7 secs.

    Hope this example answers your...
  9. VS 2012 Letter Combinations - Comments / Suggestions

    Given a set of letters produce all the combinations of those letters. These two functions satisfy this. I am asking for comments / suggestions / sanity check. Thanks in advance. This was done to...
  10. Replies
    6
    Views
    169

    Re: Integer to Byte

    The problem is the '1' which is being interpreted as integer. Unfortunately there is not a Type character for byte. One idea is to work with integers and only switch to bytes if absolutely needed. ...
  11. Replies
    14
    Views
    371

    VS 2013 Re: Loosly compare string

    All of this depends on the specifics which you did not state. Specifics for the file name guess:


    must start with lowercase uxm_
    followed by three numbers
    followed by _
    followed by three...
  12. Replies
    4
    Views
    171

    VS 2013 Re: What is Colon (:) e.KeyChar code?

    Agreed.
  13. VS 2013 Re: How to calculate time remaining for prime factor finder?

    See my signature for a fairly fast prime number calculator.
  14. Replies
    18
    Views
    530

    VS 2013 Re: Super Simple Countdown timer

    This is why I used a stopwatch. You might stop the timer from ticking but the current time keeps on going, nothing you can do about that.
  15. Replies
    7
    Views
    285

    VS 2013 Re: Dice Simulator question

    The way you have it the random numbers are likely the same. Here is a short version of what you have



    Private Sub Button3_Click(sender As Object, e As EventArgs) Handles Button3.Click
    ...
  16. Replies
    18
    Views
    530

    VS 2013 Re: Super Simple Countdown timer

    Take a look at this.


    Public Class Form1

    Dim numSecs As Integer = 10
    Dim stpw As New Stopwatch
    Dim countdownFrom As New TimeSpan(0, 0, numSecs)

    Private Sub...
  17. VS 2013 Re: Manipulating Strings from SerialPort

    Are you sending a newline after the 1-3 numbers? Are you sending ASCII chars representing the numbers?
  18. Replies
    4
    Views
    233

    Re: stopping program when using serial port

    A quick glance shows that you have a lot of things running on the UI thread and one of them, the SerialPort.ReadLine, is a blocking operation. One thing you might try is to move the...
  19. VS 2010 Re: SyncLock protecting thread counter

    Here is a simulation of what I think you want to do.


    Public Class Form1

    Private Sub GetServicesFromSingleComputer(compNM As Object)
    Debug.WriteLine("S " & compNM.ToString)
    ...
  20. Re: String.Format with one decimal value only...

    You meant
    LabelSpeedDisplay.Text = String.Format("{0:N2}", Registers(7) / 100)
  21. Thread: MSDN Logon

    by dbasnett
    Replies
    2
    Views
    151

    Re: MSDN Logon

    This happens both at home and work, and I have different anti-virus software at both. Will check it though.

    Doesn't explain why using the back button and then clicking again works.
  22. Thread: MSDN Logon

    by dbasnett
    Replies
    2
    Views
    151

    MSDN Logon

    For at least a month I have been having an issue with MSDN. I am repeatedly asked to logon even though I am already logged in.

    For example, I came across this link in a forum thread,...
  23. Replies
    9
    Views
    292

    Re: Help with factorial calculation :?

    This N! = (1^2)*(2^2)*(3^2)...*(N^2) is NOT the formula for factorial. This is:

    N! = 1 * 2 * 3 * ... N

    5! = 1 * 2 * 3 * 4 * 5 = 120
  24. Replies
    14
    Views
    242

    Re: variable for 'anyword'

    To 'Dim' a variable that can hold letters with a maximum length of approximately 2 billion letters do this:


    Dim anyword As String
  25. Replies
    14
    Views
    363

    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...
  26. 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...
  27. 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("")...
  28. 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 =...
  29. Replies
    8
    Views
    260

    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.
  30. 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....
  31. 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.
  32. 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.
  33. 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:

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

    A minute right. :)
  35. Replies
    2
    Views
    181

    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...
  36. 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...
  37. Replies
    2
    Views
    267

    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
  38. Replies
    24
    Views
    557

    VS 2012 Re: Picturebox to SerialPort

    Who is the manufacturer and what is the part number?
  39. Replies
    24
    Views
    557

    VS 2012 Re: Picturebox to SerialPort

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

    VS 2012 Re: Picturebox to SerialPort

    How are your monitors connected? Normally they are NOT connected via serialports.
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.