Search Results - VBForums

Search:

Type: Posts; User: Inferrd

Page 1 of 13 1 2 3 4

Search: Search took 0.03 seconds.

  1. Replies
    4
    Views
    44

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

    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...
  3. Replies
    36
    Views
    635

    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...
  4. Replies
    7
    Views
    188

    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...
  5. Replies
    36
    Views
    635

    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...
  6. Replies
    1
    Views
    67

    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...
  7. 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
  8. 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.


    ' ...
  9. 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...
  10. Re: Convert ListBox Items to String Array

    Actually, what I posted above will only work if the objects stored in the ListBox's Items collection support conversion to the String Type, such as .NET's built in numeric types. (or Strings...
  11. Re: Convert ListBox Items to String Array

    What paul. said, or:


    Dim vars = (From var
    In lDialog.ListBoxVariables.Items.Cast(Of String)()
    Where Not String.IsNullOrWhiteSpace(var)).ToArray
  12. Replies
    36
    Views
    635

    VS 2013 Re: Multithreaded class

    One last thing: I'm fairly sure that the thread_dirMapout.Join() will be causing you problems by blocking the UI from updating until the worker thread finishes.
  13. Replies
    36
    Views
    635

    VS 2013 Re: Multithreaded class

    No. The Label1.Invoke marshals code execution onto the thread that Label1 was created on. All the other Controls on the same Form will be on the same thread, so any code that accesses them can safely...
  14. Replies
    36
    Views
    635

    VS 2013 Re: Multithreaded class

    Is the task_MapoutDirectories() Sub part of a Form, and can you move that form around the desktop while the code is running?

    Edit: too slow :)
  15. Replies
    36
    Views
    635

    VS 2013 Re: Multithreaded class

    You're still missing the point that because you're calling Me.BeginInvoke(New MethodInvoker(AddressOf task_MapoutDirectories)), everything after the Else is running on the UI thread, not on a...
  16. Replies
    36
    Views
    635

    VS 2013 Re: Multithreaded class

    My point was that your application freezes because Join is a blocking method that blocks the UI thread, and Invoke is a blocking method that blocks the non-UI thread. There's no where for the code...
  17. Replies
    36
    Views
    635

    VS 2013 Re: Multithreaded class

    Not followed this thread in its entirety, but a couple of observations about your post#8

    thread_dirMapout = New Threading.Thread(AddressOf task_MapoutDirectories)
    thread_dirMapout.Name =...
  18. Replies
    6
    Views
    213

    Re: MSDN example seems to do very little

    Yeah, I never know how to get examples of that ilk to work in any sensible fashion.

    I assume you've started a new "Windows Forms Application", added a Module, and then pasted the example code into...
  19. VS 2013 Re: MSChart Zoom with mouse roller?

    This is not quite 100%. Not sure why, but:
    Dim scale As Double = 2 ' or what ever

    Dim xMin As Double = Chart1.ChartAreas(0).AxisX.ScaleView.ViewMinimum
    Dim xMax As Double =...
  20. VS 2012 Re: (FormBorderStyle = FixedToolWindow) + (ControlBox = False) = Round Corners whaa

    Don't know if this is any use to you. It gives square corners with a title bar, leaves the close button in the title bar, but it is disabled (greyed out). Alt F4 no longer works. Alt Spacebar and...
  21. VS 2012 Re: (FormBorderStyle = FixedToolWindow) + (ControlBox = False) = Round Corners whaa

    :) You'll probably find it works as expected tomorrow, after you turn the machine off over night. Or when the wind changes direction. It's Microsoft :p
  22. VS 2012 Re: (FormBorderStyle = FixedToolWindow) + (ControlBox = False) = Round Corners whaa

    Don't know then, sorry. I get round with empty title bar even if Text value is not empty. With Text="", I get square, but without title bar. That's in both vb2010 and 2013, Win 7.


    EDIT:...
  23. VS 2012 Re: (FormBorderStyle = FixedToolWindow) + (ControlBox = False) = Round Corners whaa

    Have you tried Me.Text="" ?
  24. Replies
    6
    Views
    273

    VS 2008 Re: Sorting a 2d integer array

    Hey Johan,

    You could add an extra step between splitting each line to create the String array of column values and adding them to the 2D Integer array.

    Create a 1D Integer array the same size...
  25. VS 2008 Re: Reading TxT file with TAB deliminated colums and then create array.

    Sounds like you are on top of things, but if you get stuck, don't hesitate to post back. Just keep in mind the general advice of only one thread per topic, and only one topic per thread.

    To set...
  26. VS 2008 Re: Reading TxT file with TAB deliminated colums and then create array.

    Hi Johan,

    You've gone off topic, and this thread has a lot of posts, which means it's less likely to be attracting new viewers, and that limits the amount of help you'll be getting.


    For...
  27. Re: Serialize a structure with a DataSet

    Well save some for me :). The decode/encode operation will succeed more often than I initially thought. It will definitely fail if the sequence contains a malformed surrogate pair, or (much more...
  28. Re: Serialize a structure with a DataSet

    You are using System.Text.Encoding.Unicode to decode what is essentially a "random" sequence of bytes into a string, and then encode that string back to a sequence of bytes. By "random" I mean that...
  29. Replies
    13
    Views
    503

    VS 2012 Re: UDP Communication

    So the device echos back the command string followed by a response string, and all strings are null terminated?

    If that's the case, and you want to use a TextBox to display all the strings sent by...
  30. Replies
    13
    Views
    503

    VS 2012 Re: UDP Communication

    What value are you getting for data.Length? Have you examined the contents of the data array? Does it by chance contain a null char after the K0? Any text after a null char will not appear in a...
  31. Replies
    6
    Views
    496

    VS 2013 Re: Order files by name (ListBox)

    I assume you want it to appear as it does in the Windows Explorer window.
    You can implement a "natural sort order" with a bit of pinvoking:
    Imports System.IO

    Public Class arved

    Private...
  32. Re: Anybody ever had trouble with the GZipStream class ?

    :thumb:

    If you're using VB2010 or later, you may want to consider using the Stream.CopyTo Method that was introduced in .NET FW 4.0. It makes for prettier :p code:
    Public Function...
  33. Re: Anybody ever had trouble with the GZipStream class ?

    Are you using .NET's GZipStream? Your code is using ZlibStream.

    Anyway,the MSDN docs for the GZipStream.Write Method says
    The write might not occur immediately but is buffered until the buffer...
  34. VS 2008 Re: Why won't Convert.ToByte convert 128?

    That's because the overload of the Convert.ToByte method you are using there is the one that takes a 32 bit Integer as an argument (not a Char), and 128 as an Integer will happily fit into an...
  35. VS 2008 Re: Why won't Convert.ToByte convert 128?

    The Chr method works with the ANSI Code Page that is in effect for the current thread that you code is running on. In the Western hemisphere, it is most often Windows-1252. Windows-1252 places the...
  36. Replies
    4
    Views
    189

    VS 2013 Re: Line height RichTextBox

    For example, if you have a RichTextBox named RTB that contains rich text, add the following MouseUp event handler, and select a character on a line:
    Private Sub RTB_MouseUp(sender As Object, e As...
  37. Replies
    4
    Views
    189

    VS 2013 Re: Line height RichTextBox

    Not tested, but:

    Get your known character's position in the RTB (.GetPositionFromCharIndex method)
    Get the line number that your character is on (.GetLineFromCharIndex method)
    Add 1 to give the...
  38. Replies
    26
    Views
    567

    Re: How do I create unique random numbers?

    That was my understanding of it also. However, my thinking was that if you set a new seed position, then the resulting new sequence of random numbers would be different to the sequence that was going...
  39. Replies
    26
    Views
    567

    Re: How do I create unique random numbers?

    What harm does repeatedly calling VB's Randomize function actually do? Yes, it's inefficient, but you could argue that it results in a more randomised sequence.

    On the other hand, repeatedly...
  40. Replies
    3
    Views
    230

    VS 2013 Re: Listbox.selecteditem buferoverflow ?

    The recursion probably isn't helping :sick:

    Private Sub check()
    cashdo()
    If GetMd5Hash(hash, cash) = TextBox1.Text.ToString Then
    MsgBox("found ! " & cash, 64)
    ...
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.