Search:

Type: Posts; User: jmcilhinney

Page 1 of 13 1 2 3 4

Search: Search took 3.83 seconds; generated 12 minute(s) ago.

  1. Replies
    6
    Views
    135

    Re: Use Form2 To Change Form1 Control

    That's mostly correct but it's a bit wonky early on. OOP stands for Object-Oriented Programming. It is a style of programming where you create objects that possess data and behaviour and a program...
  2. Re: Custom user control with custom proprety and event

    I suggest that you follow the Blog link in my signature below and check out my post on custom events.
  3. Replies
    10
    Views
    230

    VS 2017 Re: Starting a Service Syntax

    Perhaps the ServiceController class only lets you connect to a remote machine as the current user. It's not something that I've ever done myself. When I asked whether there was a reason you weren't...
  4. Replies
    7
    Views
    316

    Re: [RESOLVED] Showing Another Form

    The correct answer is... YES! One thing to consider is that it is quite possible that you would want multiple instances of the same form type displayed at the same time. That wouldn't be possible if...
  5. Re: Splitting a large string while adding it to a listview?

    How about you provide a FULL and CLEAR explanation of the problem, which would include a description of EXACTLY how you want to split the text. We should have to work out what you're trying to do...
  6. Replies
    10
    Views
    230

    VS 2017 Re: Starting a Service Syntax

    Regardless of what you did before, I have now provided you with the name of a type that you apparently didn't know about before. When you learn about a new type or member, the very first thing you...
  7. Replies
    10
    Views
    230

    VS 2017 Re: Starting a Service Syntax

    OK.

    I wouldn't have mentioned it if I didn't think it wasn't applicable. The name kind of gives it away. What do you suppose a service controller does?

    Why are you asking me when you could just...
  8. Replies
    10
    Views
    230

    VS 2017 Re: Starting a Service Syntax

    Is there a particular reason that you went down the more complex path of WMI rather than using the ServiceController class?
  9. 4.0 Re: How do I update the Keys in the app.config file at runtime ?

    Ideally, you wouldn't be changing those setting at run time. It would be better to use the Settings page of the project properties and create User-scoped settings. Application-scoped settings and the...
  10. VS 2019 Re: MySQL Bulk Loader from .csv without column names

    I wouldn't think that it matters whether the file has headers or not. You are providing the mapping of source columns to variables and destination columns here:
    bl.Columns.AddRange({"@Datum",...
  11. 4.0 Re: Regex Class library class declaration error ?

    Your post is garbage, as usual. You posted a small, incomplete picture of code instead of posting code that we can copy, paste and test for ourselves. It's not obvious from the picture of the code...
  12. Re: [RESOLVED] trying to replace a symbol dosnt work why?

    Why are you asking a question that is 100% about SQL in the VB.NET forum? This site has a Database Development forum. That's where SQL questions belong.
  13. Replies
    2
    Views
    133

    VS 2010 Re: Save question

    Further to that, the application settings file is stored in the program folder while the user config file is stored under the user's personal folder. The point of the user config file is that each...
  14. Re: Are users using laptop monitor or larger monitors?

    Assuming Windows Forms, the Screen class can tell you how many monitors there are, which is the primary, what their resolutions are and what their bounds are. You can then specify the Bounds of a...
  15. Replies
    8
    Views
    228

    Re: DataGridView and file txt

    That works alright, but it's still not ideal. If the file is small then it won't make that big a difference but that doesn't mean that you shouldn't do it a better way if one exists that is no more...
  16. Replies
    8
    Views
    228

    Re: DataGridView and file txt

    If you want all lines then ReadAllLines is a good option, as it reads all lines into an array. If you only want some of the lines, it's better to call ReadLines, which returns the data as an...
  17. Replies
    8
    Views
    228

    Re: DataGridView and file txt

    If you're going to write code to do something, you need to know EXACTLY what that thing is, or else there's no chance that the code will do it. You haven't told us what it is that you want to do so I...
  18. Replies
    7
    Views
    316

    Re: [RESOLVED] Showing Another Form

    It's the sort of thing that tends to click all of a sudden. It depends how good at abstract thinking you are, because there's pretty much a 1:1 correspondence between real-world objects and...
  19. Replies
    6
    Views
    135

    Re: Use Form2 To Change Form1 Control

    It is. I definitely recommend that you read those blog posts I mentioned. They're a bit more step by step and provide various examples that you can try along the way.
  20. Replies
    6
    Views
    135

    Re: Use Form2 To Change Form1 Control

    It should also be noted that there was a scope issue in your code that would prevent it compiling but, even fixing that would not have helped. That issue arose because you declared a variable in one...
  21. Replies
    6
    Views
    135

    Re: Use Form2 To Change Form1 Control

    Again, OBJECTS! Let's say that I have a notepad. If you wanted a message to appear on my notepad, would you go and buy another notepad of the same type and write on it and then wonder why I couldn't...
  22. Replies
    7
    Views
    316

    Re: Showing Another Form

    You don't have to be an expert to understand the basic principles. The whole premise of OOP is that programming objects behave like real-world objects so if you understand how real-world objects...
  23. Re: How to remember form size and position when program shuts down while minimized?

    String interpolation was only introduced to VB in 2015 or maybe 2017. Not sure whether they were introduced to C# and VB at the same time or VB a version later.

    It's basically a native language...
  24. VS 2019 Re: How to do calculation using radio button and check box?

    I see what you mean. I missed the difference between checkedCheckBox and totalCheckBox. This code is yet another example of what happens when you write code without knowing what is has to do...
  25. Replies
    7
    Views
    316

    Re: Showing Another Form

    You have a fundamental lack of understanding of OOP. Think about how types and objects work in the real world. If someone designs a new car, can you just drive off in that design? Of course not. They...
  26. VS 2019 Re: How to do calculation using radio button and check box?

    There's a simpler way to count the checked CheckBoxes:
    Dim subjectCount = grpClassSize.Controls.OfType(Of CheckBox)().Count(Function(cb) cb.Checked)
  27. VS 2019 Re: How to do calculation using radio button and check box?

    It does use that value but it uses it poorly. It's used in the If statements instead of directly in the calulation.
  28. Re: How to remember form size and position when program shuts down while minimized?

    That code could be simplified a lot.

    Dim realBounds = If(frmMyForm.WindowState = FormWindowState.Normal,
    frmMyForm.Bounds,
    frmMyForm.RestoreBounds)
    ...
  29. Re: How to remember form size and position when program shuts down while minimized?

    For the record:

    .Size.Width = .Width
    .Size.Height = .Height
    .Location.X = .Left
    .Location.Y = .Top
  30. VS 2019 Re: How to do calculation using radio button and check box?

    You need to debug your own code. If you don't know how to debug, learn now. Set a breakpoint at the top of your code and then step through it line by line. At each step consider what it is that you...
  31. VS 2013 Re: How to insert null or empty date from datagridview column to database using vb.ne

    That's a non sequitur. There's no reason that you cannot populate a DataTable with that data. You can even use a data adapter to retrieve the data from your Excel file straight into a DataTable.
  32. VS 2013 Re: How to insert null or empty date from datagridview column to database using vb.ne

    It's so painful seeing people purposely make their lives difficult and then asking how to fix it. If you do it properly in the first place then there's nothing to fix. Create a DataTable with the...
  33. VS 2010 Re: conversion from string " " to type 'Double' is not valid

    You should log the exceptions thrown by your application. VB.NET applications have an UnhandledException event that lets you log the exception and close the app cleanly instead of crashing. You then...
  34. Replies
    10
    Views
    352

    Re: VB.NET on Apple Mac / MacBook

    I just had a quick look and it appears that you need to develop Xamarin.Mac applications on a Mac using VS for Mac. You can only target Windows, Android and iOS in VS on Windows.

    It may be worth...
  35. Replies
    10
    Views
    352

    Re: VB.NET on Apple Mac / MacBook

    If you want to build a cross-platform GUI application in VS then that means Xamarin. I'm not sure whether Xamarin is supposed to support VB at some point but I'm fairly sure that it doesn't right...
  36. Replies
    10
    Views
    352

    Re: VB.NET on Apple Mac / MacBook

    It depends what type of application you're talking about. A Console application targeting .NET Core will run fine on a Mac. You can't make Windows-specific apps run on MacOS though, e.g. Windows...
  37. VS 2019 Re: [Build] Cannot be called directly Error

    If your issue is resolved then please use the Thread Tools menu to mark the thread Resolved. That way, we know that you don't need any more help without opening the thread and reading the whole thing.
  38. VS 2019 Re: Raising an event when the object is instantiated

    Not if it's being thrown in the constructor, it doesn't. Throwing an exception when trying to access the file would be OK. If you want to check for the file in the constructor then setting a...
  39. VS 2010 Re: conversion from string " " to type 'Double' is not valid

    Actually, the & operator is defined for types String and Integer. The issue arises if you use + to concatenate strings rather than &, because adding two types that have different definitions of...
  40. VS 2010 Re: conversion from string " " to type 'Double' is not valid

    We shouldn't have to trawl through your code, hoping to find a location that could throw that exception. The exception itself tells you exactly where it was thrown. At the very least you should be...
Results 1 to 40 of 487
Page 1 of 13 1 2 3 4



Click Here to Expand Forum to Full Width