Search:

Type: Posts; User: jmcilhinney

Page 1 of 13 1 2 3 4

Search: Search took 3.86 seconds.

  1. Re: VB .NET Split to catch exact value from txt file

    I just noticed that you said this:

    If you're only after a single value, rather than values from every line, then I might be tempted to discard the TextFieldParser. The advantage that it offers is...
  2. Re: VB .NET Split to catch exact value from txt file

    RedaFields will return a String array, just as String.Split would. Your question really has nothing to do with reading the file, which you appear to already be doing successfully. Your issue is how...
  3. Replies
    11
    Views
    392

    Re: Default properties for forms.

    I'm interested to know more about tis tendency of mine. Can you provide links to previous examples where I've done so, because a tendency would require a pattern, not a single instance. In this...
  4. Replies
    11
    Views
    392

    Re: Default properties for forms.

    The properties of the Form class are what they are. The WinForms designer also has some functionality baked into it that will set certain properties of forms and some controls when they are added. If...
  5. VS 2017 Re: How get get IMEI Numbers from Android mobile phone.

    In what context? I don't imagine that you're actually using VB.NET in an Android app. If you are, could you explain exactly how?
  6. Re: [RESOLVED] How to pass enum type to a function

    That doesn't matter. What matters is the type of the enum_item_value variable. If it is type FormMode then calling its ToString method will return the name of the enumerated value. If it's Integer...
  7. Re: [RESOLVED] How to modify default control property values, or put custom controls

    People do use the terms interchangeably sometimes but, in WinForms, a user control is something specific, i.e. a class that inherits System.Windows.Forms.UserControl. A user control is basically a...
  8. Re: [RESOLVED] How to modify default control property values, or put custom controls

    Sounds more like a custom control. My interpretation was that the code from post #5, which is pretty much exactly like your post #2 but for Label rather than Button, was simply moved to its own code...
  9. VS 2019 Re: Calling a *.exe program from a different directory than the calling program

    I think that this:
    IO.Path.Combine(Application.ExecutablePath, SaveAsCommaDelimited.exe)
    ought to be this:
    IO.Path.Combine(Application.StartupPath, "SaveAsCommaDelimited.exe")
    Regardless, while...
  10. Re: [RESOLVED] How to pass enum type to a function

    Looking at the very first code snippet you posted:
    [Enum].GetName(GetType(FormMode), enum_item_value)
    what is the data type of enum_item_value? If it is Integer then the generic method is...
  11. Re: [RESOLVED] How to modify default control property values, or put custom controls

    Pretty much all types should be declared in their own dedicated code file. The one exception I make is that I declare all Enums in a single file named Enumerations.vb.

    You should pretty much never...
  12. Replies
    11
    Views
    392

    Re: Default properties for forms.

    Odd how so many of the rest of us don't have this issue with projects blowing up. Maybe you could provide an actual description of what you're actually talking about and then we may be able to...
  13. Re: How to pass enum type to a function

    The OP indicates that the type is actually known, rather than stored as a String. In that case, a generic method would be preferable to converting the type to a String first and then using that to...
  14. Re: How to pass enum type to a function

    As for why what you were trying to do couldn't work, the GetType operator that you're using expects a data type. That means that you have to provide something that could also be used after As in the...
  15. Re: How to pass enum type to a function

    As for the issue, there actually is no issue. Just forget everything you just posted and do this instead:
    enum_item_value.ToString()
    Here's an example that shows that it produces the same result,...
  16. Re: How to pass enum type to a function

    First things first, please don;t post unformatted code snippets. Here's how your post should look:
  17. Re: How to modify default control property values, or put custom controls in toolbox

    You can't. The default values you see for properties when you add a control to a form are either part of the code of that class or baked into the WinForms designer itself.

    What .paul. has...
  18. Re: Computer monitoring system via Asynchronous TcpListener & TcpClient

    Different error for a different reason. The issue you originally asked about has been resolved so you should mark this thread Resolved, using the Thread Tools menu, and create a new thread for the...
  19. Re: How to ensure that a form is displayed on top?

    Please tell me it was in a galaxy far, far away. ;)
  20. Re: datagrid, arraylist System.IndexOutOfRangeException error

    Start a new thread and provide all the relevant details, including exactly what the user and/or the application is doing when the exception is thrown.
  21. Re: VB 2020 net 6.0 | WebView2 | have old code, dont work on new webview2 Need hel

    When you see a method with a name that ends with Async, it most likely returns a Task(Of T). Where a synchronous method would return an object of type T, an asynchronous method returns a Task(Of T),...
  22. Re: VS 2022 - PowerPacks - Printing - Printform & ReportViewer

    I don't think that you can get an official download from Microsoft any more but, if you search online, you should be able to find third-party download links. I cannot vouch for any of them though....
  23. Re: Computer monitoring system via Asynchronous TcpListener & TcpClient

    I would also suggest that you could simplify your code considerably. This:
    TcpClient client = clients.Select(c => new { client = c, host = c.Value }).Where(x => x.host.Equals(host)).Select(x =>...
  24. Re: Computer monitoring system via Asynchronous TcpListener & TcpClient

    The specific issue is that you are calling First on a sequence with no items. If there's a chance that the sequence is empty then you need to call FirstOrDefault and then check whether the result is...
  25. Replies
    15
    Views
    816

    Re: [RESOLVED] Loading a listbox

    Sure, but that's not what is being suggested.
  26. VS 2019 Re: MouseOver Event doesn't work when object hidden

    You can see an example of what .paul. is talking about here. There are plenty of other examples around but just be aware that many of them lazily call CreateGraphics, which is something you should...
  27. Replies
    15
    Views
    816

    Re: [RESOLVED] Loading a listbox

    If your aim is efficient storage of data then your original idea would seem great. Why should that be your aim though? Do you not have much storage space available? Efficient processing of data...
  28. Replies
    5
    Views
    308

    VS 2019 Re: Number of lines in a sequential file

    You would probably be better off with this:
    IO.File.ReadLines("path").Count()
    Your code doesn't use the data read from the file so why create an array containing it all? That would be especially...
  29. VS 2017 Re: How would I complete this recursion algorithm?

    Algorithms are language independent, so what programming languages you do or don't have experience with is irrelevant, if you really are asking for help with an algorithm. If what you're really...
  30. VS 2019 Re: Help. Can't reset ComboBox to default text.

    Do you want the user to be able enter arbitrary text or do you just want them to be able to select from the drop-down list? If the latter, you probably ought to set the DropDownStyle to DropDownList....
  31. Replies
    15
    Views
    816

    Re: Loading a listbox

    I doubt that you'll find a DBA on the planet to agree with you, nor many application developers.
  32. VS 2019 Re: Help. Can't reset ComboBox to default text.

    Is the DropDownStyle set to DropDown or DropDownList?
  33. Replies
    24
    Views
    968

    Re: problem in webvew

    One wonders why you came here at all if you can do that now. The problem here is that we want to help you but you won't even consider the possibility that you're not doing enough to enable us to do...
  34. Re: Why VB.NET Power Function is so fast ?

    Except not. Why a VB.NET method is as fast as it is is a 100% VB.NET question. How to make a VB6 function faster is a 100% VB6 question. Two different questions on two different languages, both of...
  35. Re: Why VB.NET Power Function is so fast ?

    So what? Should we just do away with the VB6 forum and have all VB6 questions poste3d in the VB.NET forum because "many people proficient VB.NET at the same time proficient VB6"? There is a...
  36. Re: Why VB.NET Power Function is so fast ?

    Your title says:

    Is that really the question you want answered? In your post you ask this:

    Which is a completely different question and something that should be asked in the VB6 forum, not the...
  37. VS 2015 Re: How To Define Variables In Public Class. VB.NET

    I'm guessing that, in this case, ReadOnly properties would be more appropriate, as the values are probably being read from outside the form but not set.
  38. VS 2015 Re: How To Define Variables In Public Class. VB.NET

    Nope. The field declarations and their initialising expressions are executed before the class constructor, so before the InitializeComponent method is executed, so before the TextBoxes are created.
  39. VS 2015 Re: How To Define Variables In Public Class. VB.NET

    While that will at least not throw an exception, there's no point to getting data from a control in the Load event handler because the user can't have entered any data before the form has been...
  40. Replies
    15
    Views
    816

    Re: Loading a listbox

    That all sounds like a very bad idea. Firstly, you don't need multiple columns. You just need one column in another table. The whole point of a relational database is the relations. You can have a...
Results 1 to 40 of 500
Page 1 of 13 1 2 3 4



Click Here to Expand Forum to Full Width