Search Results - VBForums

Search:

Type: Posts; User: Inferrd

Page 1 of 13 1 2 3 4

Search: Search took 0.03 seconds.

  1. Replies
    6
    Views
    185

    VS 2010 Re: Truncate zeros after decimal point

    Try margin.ToString("0.##")
  2. VS 2015 Re: add item in the listbox of listview

    Does this get you any closer:
    Dim x As String = "0 1 2" ' = ListView1.SelectedItems(0).SubItems(1).Text
    Dim z() As String = x.Split({" "}, StringSplitOptions.RemoveEmptyEntries)

    For Each c In...
  3. Replies
    16
    Views
    233

    Re: Solar position calculator

    I started teaching myself VB 12 years ago. I still make silly errors on a daily basis. ;)


    Thinking about it a little more, it'd be better to pass the date/time as an argument to the sunpos...
  4. Replies
    16
    Views
    233

    Re: Solar position calculator

    In your original code, you were fetching the date/time only once:
    Public Year = System.DateTime.Now.Year
    Public Month = System.DateTime.Now.Month
    Public Day = System.DateTime.Now.Day
    ...
  5. Replies
    16
    Views
    233

    Re: Solar position calculator

    Mine also, but if you are using DateTime.Now as input for your calculation's date/time, then you'll be an hour out due to BST (assuming you are from the UK).

    Using DateTime.UtcNow is probably the...
  6. Replies
    16
    Views
    233

    Re: Solar position calculator

    Maybe I am wrong, but my understanding of those 2 lines is they are just converting a previously calculated angle from radians to degrees by dividing by PI / 180.

    degrees = radians / (PI / 180)...
  7. Replies
    16
    Views
    233

    Re: Solar position calculator

    The following 2 lines are wrong:


    dAzimuth = dAzimuth / DefineConstants.pi / 180

    dZenithAngleParallax = (dZenithAngle + dParallax) / DefineConstants.pi / 180


    They should...
  8. Replies
    11
    Views
    264

    VS 2010 Re: [RESOLVED] Date Formatting

    If you want to parse dates that have extra spaces in them, use the overload of the PaseExact (or TryParseExact) method that takes a DateTimeStyles argument, and specify one (or more) of the styles...
  9. Replies
    8
    Views
    254

    VS 2010 Re: Use variable name with radio button name

    That's not quite true. Radio Buttons have an AutoCheck Property. If you set the AutoCheck Properties to False for all the RadioButtons in any grouping, then you can Check more than one at the same...
  10. Replies
    22
    Views
    537

    VS 2010 Re: Substring to variable endpoint fails

    :) ...and shouldn't you have 3 of AlreadyDone = OriginalMessage.Substring(0, MessageLength) before you get to Dim i As Integer = Convert.ToInt32(AlreadyDone, 16) (because you need to pull out 6...
  11. Replies
    22
    Views
    537

    VS 2010 Re: Substring to variable endpoint fails

    OriginalMessage.Remove(0, MessageLength) doesn't do what you think it's doing. It creates a new String, which you throw away. It doesn't alter OriginalMessage
  12. Replies
    9
    Views
    345

    VS 2013 Re: Excel to ListView

    You have empty cells in your spreadsheet? I see KGC mentioned this in Post#5. Missed it, sorry.

    You could try replacing the code between .BeginUpdate and .EndUpdate with the following:...
  13. Replies
    9
    Views
    345

    VS 2013 Re: Excel to ListView

    Not an Office interop guru, so this may well be somewhat naive. It's not hugely faster (about 6 times faster in tests), but might be of use to you. Works by grabbing all the cells from the Excel file...
  14. Re: Help Length of argument 'String' must be greater than zero.

    I think it's equivalent to:Private Sub readBMP()

    File = "c:\Users\Celticlord\Desktop\LghtOff.bmp" 'File must not exceed uOLED display dimensions
    ' ...
  15. Replies
    7
    Views
    396

    Re: Can't get RSS Feed (XML)

    It's just that it's GZip encoded.
    Dim url As String = "https://kat.cr/usearch/the%20flash%20category%3Atv%20user%3Aettv%20verified%3A1/?rss=1"
    Dim xml As String

    Try
    Using wc As New...
  16. VS 2015 Re: [RESOLVED] Please help with this! (Diffie-Hellman Key Exchange)

    Step #3 shouldn't involve the CreateAesKey function. You are still swapping public keys at this point.

    Also CreateAesKey is a function that returns a "key" (actually 32 bytes in an array) for use...
  17. Replies
    12
    Views
    420

    VS 2010 Re: Security Exception - unable to open folder

    Junction Points was the other term I was trying to remember.

    If you look at your error messages from the first post, they refer to "C:\Documents and Settings" and...
  18. Replies
    12
    Views
    420

    VS 2010 Re: Security Exception - unable to open folder

    Documents and Settings, My Music , My Pictures and so on aren't actually folders. They are often referred to as Symbolic Links or Reparse Points.

    My understanding is that they were added in Vista...
  19. Re: StrReverse how to make this with VB.net LINQ or an other way...

    Good point. My guess would be that it is widening the Enumerable(Of Char) to Object and running the overload of Concat that takes an Object.

    s.Reverse.ToString gives me...
  20. Re: StrReverse how to make this with VB.net LINQ or an other way...

    The overload that takes an IEnumerable(Of T) only became available with Framework 4.0. So if you are compiling to FW 3.5 or earlier then you'll get that weird output.

    Same for the String.Join...
  21. Replies
    5
    Views
    270

    VS 2008 Re: Simple Font Solution

    I think you'd typically use FontFamily.IsStyleAvailable. See:
    https://msdn.microsoft.com/en-us/library/system.drawing.fontfamily.isstyleavailable%28v=vs.110%29.aspx

    From memory, I think if...
  22. Replies
    5
    Views
    270

    VS 2008 Re: Simple Font Solution

    @.paul. I expected that to throw an error because not all fonts support style Regular. Didn't get an error, though.

    Looks like the DrawItem event handler behaves like the Form Load event handler...
  23. VS 2015 Re: Please help with this! (Diffie-Hellman Key Exchange)

    I'm not sure if you are having trouble sending the public key across the network, or having problems generating the public key in the first place.
    It really helps if you show the relevant code that...
  24. VS 2015 Re: Where can I enable the Events List for VS2015?

    Recently ran into the same problem myself: go to Tools / Options / Text Editor / All Languages / General / and tick the Navigation bar check box.
  25. Re: Beginner trying to learn SQLite database

    I see I cross posted with Wes. His advice will solve your problem in a more logical way. Just put your check for file/create db code before the code he shows in his Sub Form6_Load.
  26. Re: Beginner trying to learn SQLite database

    If you don't want a database file to be created if one does not already exist when you try to open the connection, then add


    FailIfMissing = True;

    to the end of your connection string.

    If...
  27. Replies
    4
    Views
    315

    VS 2010 Re: Help with error

    Hi George.
    As Kebo says: "Whenever you call that function the parameters you pass MUST match the calling signature both in count and in type"

    Your original code had 2 overloads of the AniMsg...
  28. VS 2010 Re: Please help with an error message "Handles clause requires a WithEvents varible"

    George,
    the Timer1 and Timer2 event handler subs should be part of the msgfrm Form code, not the msg Class code.
  29. Re: Date format to show the date in a text box in dd-mmm-yyyy fomat ...

    You pass a format string as an argument to the .ToString Method eg.:
    txtReceivedDate.Text = dt.Rows(0)("ReceivedDate").ToString("dddd MMM d, yyyy")See:...
  30. Re: Comparing DateTimePicker to text file data?

    Hi Dave,
    dday's code works by loading all the lines from the text file into an array and then working against the contents of the array using LINQ. However, your code is reading each line from the...
  31. Re: [RESOLVED] Process.Start seems to've stopped working.

    I don't know what I'd do to track this problem down. I'd probably try reinstalling VS as a first step as the others have mentioned.

    I might also try installing VS2015 alongside VS2013, and see if...
  32. Replies
    13
    Views
    311

    VS 2015 Re: Background Worker Issues

    Yeah, I didn't like the look of that either which is why I asked if the lines following that were ever hit.



    Looking at the code in your BackGroundWorker3 is executing, it seems you are:

    ...
  33. VS 2015 Re: Please help with this! (Diffie-Hellman Key Exchange)

    Yep, just ran the code and looked at the Length of the PublicKey array.


    That wouldn't work because you'll end up with just 4 bytes containing an Integer. That Integer can't be converted back...
  34. Replies
    13
    Views
    311

    VS 2015 Re: Background Worker Issues

    In the following code, have you placed a break point on the highlighted line, and is it ever hit?



    'Cancel BW1 and set a flag

    BackgroundWorker1.CancelAsync()
    ...
  35. VS 2015 Re: Please help with this! (Diffie-Hellman Key Exchange)

    Hi there, welcome to the Forum.

    Can I ask, are you aiming for a one on one with Alice and Bob, or are you ultimately hoping for a four way "chat" with Bob & Carol & Ted & Alice, or even Rita, Sue...
  36. Re: Process.Start seems to've stopped working.

    No offence taken :)


    I did include that caveat twice in my post, once in my preamble, and once in the quote from the MSDN page.


    Yes, the events were being used, but the arguments were not:
  37. Re: Process.Start seems to've stopped working.

    I'm not convinced that putting the parameters back into the event handler declaration is what fixed the problem.

    Why would leaving them out cause a problem in any case?

    Leaving out the...
  38. Thread: Array Question

    by Inferrd
    Replies
    13
    Views
    384

    Re: Array Question

    As JMC pointed out, you are using String.Format incorrectly, but you do also have a problem with your arrays.

    You declare and create an array at form scope with Dim frequency(19) As Integer, but...
  39. VS 2010 Re: System.Text.Encoding.ASCII.GetString(Bytes)

    I wasn't trying to be funny :), and I've clearly failed in my attempt to explain what I meant.

    It would only be a problem if the Byte array was declared globally and reused, and I have no evidence...
  40. VS 2010 Re: System.Text.Encoding.ASCII.GetString(Bytes)

    K. Fair point.

    I was guessing the string wasn't null terminated (apart from all the 0's placed in the Data Byte array when it was created). So if mktsgm didn't recreate the Byte array after each...
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.