Search Results - VBForums

Search:

Type: Posts; User: Inferrd

Page 1 of 13 1 2 3 4

Search: Search took 0.03 seconds.

  1. VS 2010 Re: Connecting to an FTP Server for access of a URL

    That really doesn't help anyone to help you. You should always explain what you expected to happen, what actually happened, and if an error occurred you should include the error message (copy/paste...
  2. Replies
    7
    Views
    214

    Re: ASCII preferences?

    The simplest solution is to use the ChrW() method instead of the Chr() method.

    Chr() relies on the code page that is being used by the application's current thread. This is usually the same as the...
  3. Replies
    25
    Views
    425

    VS 2013 Re: Problem Detecting words in Lowercase

    Not your fault :). it's the forum software. Large images added as attachments are shrunk to the point that their content often becomes unrecognisable. Large images that are in-lined lead to the whole...
  4. Replies
    25
    Views
    425

    VS 2013 Re: Problem Detecting words in Lowercase

    I'd agree with dday on that.


    However, if you want to stick with your current code, then a couple of points:
    (with apologies for my forced formatting of the post. The handling of images
    on this...
  5. Replies
    4
    Views
    198

    Re: Date subtraction to create integrer

    Interesting how Val works with dates :). Wrong though, as you say.

    Look into Visual Basic's DateDiff Method

    Or, look into using .NET's TimeSpan Class. (Date2-Date1) results in a TimeSpan, and a...
  6. Replies
    15
    Views
    362

    VS 2010 Re: Should check File version be so slow?

    I could be totally wrong here, but after a bit of tentative testing it looks to me like the call to FileVersionInfo.GetVersionInfo pulls the file across the network two times.

    So, how big is your...
  7. VS 2010 Re: hide/unhide taskbar icon not working properly

    Maybe this will get you started. After a quick Google, I came up with:
    Imports System.Runtime.InteropServices

    Public Class Form1


    Private Sub Button1_Click(sender As System.Object, ByVal...
  8. Replies
    11
    Views
    374

    VS 2010 Re: [RESOLVED] Getting the Unicode ID from HEX

    Ah, of course. I got the significance of &H81, but I was also thinking you were using &HA as another demarcation point between Japanese and ASCII. I should have twigged what you meant, given you...
  9. Replies
    11
    Views
    374

    VS 2010 Re: [RESOLVED] Getting the Unicode ID from HEX

    Yep, I think I see what you are doing...sort of. I have very limited experience with Shift JIS (or any other of the CJK code pages come to that), so I'm a little lost as to what you are doing with...
  10. Replies
    11
    Views
    374

    VS 2010 Re: [RESOLVED] Getting the Unicode ID from HEX

    What exactly do you mean by "the text length"? Do you mean the number of bytes that correspond to text? Or do you somehow know how many characters are in the text? Note that the number of bytes and...
  11. Replies
    11
    Views
    374

    VS 2010 Re: [RESOLVED] Getting the Unicode ID from HEX

    Good to hear :)

    One small concern, and forgive me if you've already accounted for this: my understanding of Shift JIS is that it produces either 1 or 2 bytes per character depending on the...
  12. Replies
    7
    Views
    202

    VS 2010 Re: [Resolved] String to byte array help

    Glad you have it sorted.


    I wouldn't go that far, but then, if it wasn't challenging, it wouldn't be fun. ;)
  13. Replies
    7
    Views
    202

    VS 2010 Re: [Resolved] String to byte array help

    Any and all |'s will be converted to line feeds before the string is converted to a byte array. If there are no |'s, the original unaffected string will still be converted to a byte array as expected.
  14. Replies
    7
    Views
    202

    VS 2010 Re: String to byte array help

    Yes, that's pretty much what I meant.

    You don't don't need the last line though, because the line btText = encText.GetBytes(str.Replace("|", vbLf)) creates a new string (behind the scenes) with ...
  15. Replies
    11
    Views
    374

    VS 2010 Re: Getting the Unicode ID from HEX

    Interesting question. I don't know the answer, so you've given me something to play with later on. :)

    U+30B3 represents the Unicode code point for the character "コ", and I think that 0x8352...
  16. Replies
    7
    Views
    202

    VS 2010 Re: String to byte array help

    You could always replace the | character before converting to a byte array:
    btText = encText.GetBytes(str.Replace("|", vbLf))

    Are you sure UTF8 is appropriate? UTF8 is a multi-byte encoding....
  17. Replies
    2
    Views
    180

    VS 2013 Re: need help by fill in empty spaces split

    Building on Ian's solution, and using a modified input string for testing:
    Private Sub Button1_Click(ByVal sender As Object, ByVal e As EventArgs) Handles Button1.Click
    ' NOTE: the input...
  18. Replies
    3
    Views
    165

    VS 2013 Re: File extension issue

    Rather than searching for the first occurrence of the dot, search for the last occurrence:
    c = Strings.Right(b, Len(b) - InStrRev(b, "."))
  19. Replies
    6
    Views
    267

    Re: LINQ Select Unique

    Until something better comes along:
    Dim theCollection As New List(Of TheClass)

    theCollection.Add(New TheClass With {.Name = "foo", .TimeStamp = #6/2/2015#})
    theCollection.Add(New TheClass With...
  20. VS 2013 Re: Need Help to place back data in to file

    Building on your existing code, you'd use a FileStream with write access and write your data at the appropriate position in the Stream. The code would be very similar to that in your button2_Click...
  21. Replies
    10
    Views
    489

    Re: My Updater is giving some problem...

    Your downloader isn't resuming because the HttpWebRequest doesn't resume by default. You have to provide the code to do it.

    I'm not saying you should use FTP, I'm saying you should research how to...
  22. Replies
    10
    Views
    489

    Re: My Updater is giving some problem...

    What you are saying seems to fit in with what I have observed. When I tested, I was using a 20Mbit/s connection, and it succeeded.

    I modified your code slightly to introduce a small delay after...
  23. Replies
    20
    Views
    526

    Re: Search byte pattern in byte array

    Agreed. I've run into problems with this in the past when iterating over very large collections, and using .Skip(x).Take(aSmallPortion) where x is the loop variable. Just to give an idea, I estimated...
  24. Re: [RESOLVED] Get Image from BindingSource.Current

    A couple of other points:
    The overload of the MemoryStream Constructor that you are using (New IO.MemoryStream(imageData, 0, imageData.Length)) allows you to create a MemoryStream from a portion of...
  25. Replies
    10
    Views
    489

    Re: My Updater is giving some problem...

    I've only quickly glanced at your code, and although there are several issues you will need to sort out (not least of which is not being able to close the Form), there is nothing there that should...
  26. Replies
    13
    Views
    343

    Re: Currency textbox

    It should convert the numeric keypad's decimal point key to a comma. Won't affect the main keyboard's full stop (period) key.

    You did amend the code for your own TextBox names, didn't you? :)
    ...
  27. Replies
    13
    Views
    343

    Re: Currency textbox

    Private numpadDecimalPressed As Boolean

    Private Sub TextBox1_KeyDown(sender As Object, e As System.Windows.Forms.KeyEventArgs) Handles TextBox1.KeyDown
    If e.KeyCode = Keys.Decimal Then...
  28. Replies
    13
    Views
    343

    Re: Currency textbox

    You could check in the KeyDown event for Keys.Decimal and set a global flag. Then check in the KeyPress event if that flag is set, and set e.KeyChar = ","c, resetting the flag at the same time.
  29. VS 2012 Re: Getting error "Value cannot be null. Parameter Name: 5"

    Apologies for the late reply. I'm afraid I have no experience in this sort of thing so I can't give you any advice, sorry.

    I do know that .NET .exe's are notoriously easy to decompile back to...
  30. VS 2012 Re: Getting error "Value cannot be null. Parameter Name: 5"

    You will do, but it's not a code error (an exception hasn't been raised). It's just a message telling you that some data doesn't match what the program wants it to be.

    I must be getting slow in my...
  31. VS 2012 Re: Getting error "Value cannot be null. Parameter Name: 5"

    Examining the StackTrace (ex.StackTrace) when you get the error should give you some clues as to what is causing the error.

    It looks to me like you are confusing your Registry Keys.
    Dim d As...
  32. Replies
    7
    Views
    282

    Re: Assigning a value to a label

    You typically get those sorts of errors if the Label is not parented directly by the Form, but is parented by (placed on) another Control such as a Panel or GroupBox. That's because each Control has...
  33. Replies
    37
    Views
    976

    VS 2013 Re: Multithreaded class

    Just in passing, I don't think there's any need for this part of your code:
    'Start second task
    thread_fileSearch = New Threading.Thread(AddressOf task_findFiles)
    thread_fileSearch.Name...
  34. Replies
    37
    Views
    976

    VS 2013 Re: Multithreaded class

    Ideas? Yes.
    Good ideas? Probably not.

    You need to limit the frequency that you update the UI with progress info. My first thought would be to use a Stop Watch to give a timed interval between...
  35. Replies
    7
    Views
    280

    VS 2013 Re: Number of elements to array

    Have you got Option Strict On? If not, why not? :p

    Dim MyResult creates a variable of Type Object. The Object Type does not have a Count property. You need Dim MyResult As SomeType where SomeType...
  36. Replies
    37
    Views
    976

    VS 2013 Re: Multithreaded class

    Hey, FireDust. Hope you're more awake now, you'll need to be...... :p

    I was also going to question why you are using Refresh, but Niya beat me to it.
    From what you said in the video, it's to stop...
  37. Replies
    1
    Views
    131

    Re: Colour Saving isn't working D:

    Hey U53r N4m3, welcome to the Forum.

    Every time you assign a colour to a player, you read 2 colours from your file.


    Private Sub LoadToolStripMenuItem_Click(sender As Object, e As...
  38. Re: Help with Regex match groups or alternate method to handle task

    Have a look at the TextBox Lines property https://msdn.microsoft.com/en-us/library/system.windows.forms.textboxbase.lines%28v=vs.110%29.aspx
  39. Re: Help with Regex match groups or alternate method to handle task

    Not sure I've understood properly. Do G02 and G03 maintain their own inpependant R values between changes? The following doesn't. It applies the most recent R value, irrespective of G value.


    ' ...
  40. Re: Convert ListBox Items to String Array

    I got that error also. No idea what it means :confused:, but is the reason I used the .Cast(Of String)()

    However, as I pointed out above, the solution I gave will fail with user defined types such...
Results 1 to 40 of 500
Page 1 of 13 1 2 3 4



Featured


Click Here to Expand Forum to Full Width