Search Results - VBForums

Search:

Type: Posts; User: dbasnett

Page 1 of 13 1 2 3 4

Search: Search took 0.12 seconds.

  1. Replies
    3
    Views
    59

    Re: GetFiles error

    @OP - There was another thread I saw a few days ago about basically the same issue. I didn't respond there because the thread looked resolved. I have a class that enumerates directories if you are...
  2. Re: How to convert Timer to hour format h:m:s:ms

    In .Net you might use a Stopwatch or a Forms Timer to represent the VB6 functionality. I don't get how jumping through hoops aids backwards compatibility. What are you trying to do with the code?
  3. Re: How to convert Timer to hour format h:m:s:ms

    Why? What 'double timer value'?
  4. Re: How to convert Timer to hour format h:m:s:ms

    Dim curdttms As String = DateTime.Now.ToString("HH:mm:ss.ffffff")


    DateTime.Now returns current system time. The .ToString method formats it.
    ...
  5. Re: VS 2015,[ASK] sort() command wrong sorting the list

    Finally a use for Val that doesn't make me cringe.

    @jmc - I figured, but Shaggy put us both to shame.
  6. Re: VS 2015,[ASK] sort() command wrong sorting the list

    If you have a list of file names and they are of the form of number followed by extension, then take a look at this:



    Dim filenames As New List(Of String) From {"1.jpg", "10.jpg",...
  7. Replies
    15
    Views
    361

    Re: Which syntax is better?

    Which one in my original did you pick? Of course you knew you couldn't pick the first one, hence options C and D. FWIW - I am a big fan of Option Strict On so D isn't viable for me.

    You said, "I...
  8. Thread: The Donald

    by dbasnett
    Replies
    215
    Views
    6,543

    Re: The Donald

    What about the practical aspects of Donnie as POTUS? How long would he last?

    He comes from a world of what he says is law. Sorry Donnie you are President, not King.

    He can just decide to...
  9. Replies
    15
    Views
    361

    Re: Which syntax is better?

    Which of these do you prefer?


    Dim ss As String(4) 'sic
    'or
    Dim ss(4) As String


    I prefer the latter.
  10. Replies
    12
    Views
    453

    VS 2012 Re: Code return CRC32B instead of CRC32

    What I am trying to say is that a specific implementation of CRC is dependent upon those variables. So my base CRC32 implementation is:

    Width (in bits): Defines the width of the result CRC value...
  11. Thread: The Donald

    by dbasnett
    Replies
    215
    Views
    6,543

    Re: The Donald

    http://www.hulu.com/watch/881354
  12. Replies
    12
    Views
    453

    VS 2012 Re: Code return CRC32B instead of CRC32

    For any implementation there is (from the sunshine page):

    Width (in bits): Defines the width of the result CRC value (n bits). Simultaneously, also the width of the generator polynomial is defined...
  13. Re: İs this possible to generate a class behave like List

    And one other approach...


    Class MyList : Inherits CollectionBase

    Public Sub New()
    Me.InnerList.AddRange(Enumerable.Range(0, 9).Select(Function(n) 8 - n).Cast(Of...
  14. Re: Adding Multpile Things To List Box At Same Time

    If you have read the other posts you will see that this is an approach that gives what you want. This is just a summary of what you have already been told.


    Dim prng As New Random
    Dim...
  15. Replies
    6
    Views
    194

    Re: Converting Random Numbers to ASCII

    What do you think this line does?


    ASCnumber(i) = Asc(randnumber)

    Take a look at the documentation for Asc. https://msdn.microsoft.com/en-us/library/zew1e4wc%28v=vs.90%29.aspx

    It takes a...
  16. Replies
    12
    Views
    453

    VS 2012 Re: Code return CRC32B instead of CRC32

    This site gives full control to all aspects of CRC calculation

    http://www.sunshine2k.de/coding/javascript/crc/crc_js.html

    FWIW - -347100478 in hex is EB4FAAC2
  17. Re: How can I convert a large binary number to hexadecimal

    This will process a nibble at a time.


    'TextBox4 - binary input
    'TextBox5 - hex out
    If TextBox4.TextLength = 0 Then TextBox4.Text = "0"
    Dim pad As Integer = 4 -...
  18. Thread: short of +-*/

    by dbasnett
    Replies
    20
    Views
    473

    VS 2010 Re: short of +-*/

    $.02


    Dim num1 As Double?
    Dim num2 As Double?
    Dim opInp As String = ""
    Dim mathD As New Dictionary(Of String, Action) From {{"+", New Action(Sub()
    ...
  19. Replies
    12
    Views
    453

    VS 2012 Re: Code return CRC32B instead of CRC32

    I have some code that uses tables for calculating CRC's if you are interested.
  20. Re: Can't change Label.Text from another form

    Here is an example of a 'Form2'. Note the 'New' method.


    Public Class Form2

    Private f As Form1

    Public Sub New(otherForm As Form1)
    ' This call is required by the designer....
  21. VS 2013 Re: Getting access to specifics child nodes in XML file.

    First of all the xml you posted is not proper, the lines that look like this


    <number="1897" time="30"/>
    <factor="6000" merge="no" skip="no"/>


    are badly formatted.
  22. Replies
    6
    Views
    195

    Re: Custom TextBox BackColor

    It wasn't clear if the state could go from warning to error, then back to warning, and then normal. This should give you some ideas. It should also take care of the normal color being the color the...
  23. Replies
    1
    Views
    126

    Re: Importing data to xml file

    Here is an example of loading XML from a web service:


    Dim foo As XElement = XElement.Load("http://alerts.weather.gov/cap/mo.atom")
  24. Replies
    4
    Views
    244

    Re: measuring latency

    If you just want a number then use ping. Without details it is hard to give an answer. Is the primary purpose of your app to give latency for different network resources?
  25. Replies
    4
    Views
    244

    Re: measuring latency

    Network latency isn't something a normal application can really know or needs to know. At best you can take a measurement that is good only for that instant in time.
  26. VS 2015 Re: Protecting an Enum in a Class inheriting an object

    In general I agree with this. However this confused me...



    This won't work


    Enum fooBar
    foo
    bar
  27. VS 2015 Re: Protecting an Enum in a Class inheriting an object

    The picture threw me until I saw this and agree. If I have a Property of some Enum then I want Intellisense to show what my choices are.

    When you sticky finger after the assignment operator you...
  28. VS 2015 Re: Protecting an Enum in a Class inheriting an object

    Try it this way



    Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load
    Dim test As New fooTB
    test.InputType =
    End Sub
  29. VS 2015 Re: Protecting an Enum in a Class inheriting an object

    I agree with SJW. If the Property is public then the Enum can't be private.
  30. Replies
    7
    Views
    281

    VS 2010 Re: Help me with regex !

    This doesn't look like VB. I don't see where you have made an attempt to solve this on your own.
  31. Replies
    3
    Views
    234

    VS 2015 Re: Hex to decimal conversion

    Your question is not clear. Each byte received has a value. Hex is just a visualization of the value.


    Dim b As Byte = &H82 'hex value
    Debug.WriteLine(b.ToString) 'decimal 130...
  32. Replies
    8
    Views
    217

    VS 2013 Re: Race Condition using Parallel.For

    Have you tried typing 'Continue For' in the Parallel.ForEach? Try using a 'Return' statement where you want a 'Continue For'.

    Try to imagine that we can't see what is before you.
  33. Replies
    8
    Views
    217

    VS 2013 Re: Race Condition using Parallel.For

    See edit to post #4.

    Also, before using Parallel methods write the code without them. When that works it might be easy to add Parallel methods to improve performance.
  34. Replies
    8
    Views
    217

    VS 2013 Re: Race Condition using Parallel.For

    This wasn't what I asked for. Give specific errors and on what line the errors occur.
  35. Replies
    8
    Views
    217

    VS 2013 Re: Race Condition using Parallel.For

    Sure would be nice to know what the specific errors are?
  36. Replies
    11
    Views
    351

    VS 2010 Re: threading question

    Let me take a guess as to why.

    There is another very important rule, objects shall not be accessed from multiple threads in an unsafe manner. A simple example would be two threads, one thread...
  37. Re: char value to string in string builder in vb.net

    How about this.

    Dim ss As String = "ABCo21"

    Dim bv() As Byte = System.Text.ASCIIEncoding.ASCII.GetBytes(ss)

    Dim s As String = String.Join("", (From b In bv Select...
  38. Replies
    5
    Views
    246

    VS 2015 Re: Removing object from list

    So the example showed what we all think was the 'wrong' approach. Based on what you have said it does seem that the list might should be part of another class. Without more details of the other...
  39. Replies
    5
    Views
    246

    VS 2015 Re: Removing object from list

    If the method that checks end of life has a reference to the list then it could remove itself from the list. It would look something like this.



    Public Class clsCar
    Public Property Name...
  40. Replies
    4
    Views
    356

    Re: RDLC Reports

    What kind of aircraft? I miss flying.
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.