Search:

Type: Posts; User: pel11

Page 1 of 3 1 2 3

Search: Search took 0.12 seconds.

  1. Re: Can't get distinct string values from text field in datatable

    Thanks, I gutted everything and rewrote most of it using the following code (give credit to where credit is due!). The code below actually makes a new datatable with rows containing the unique...
  2. [RESOLVED] Can't get distinct string values from text field in datatable

    I am trying to get all the distinct string values (categories) from a text field in a datatable called MyDataTable. The datatable does have data since the rows>0 and columns>0 and I know the field...
  3. Re: [RESOLVED] Can't reference timer1 on Form1 from another form

    Thanks, and yes, there are a lot of changes that must be made with the C# translations of various VB.NET apps I am converting -- in order to get them to run w/o exceptions. However, I do like the...
  4. Re: Can't reference timer1 on Form1 from another form

    Found an answer, since this works:



    try
    {
    if (((Form1)Owner).timer1 != null)
    {
    if (((Form1)Owner).timer1 ==...
  5. [RESOLVED] Can't reference timer1 on Form1 from another form

    Timer 1 on Form 1 is defined as follows:


    public System.Timers.Timer timer1 = new System.Timers.Timer();

    However, the intellisense has red underscores on the "Form1.timer1" in the...
  6. Re: Memory considerations: Processing a large array with different classes

    Thanks very much, a great description, and quite valuable!
  7. Re: Memory considerations: Processing a large array with different classes

    Thanks, I looked further and arrays/lists are a reference type so the recommendation is to not use speed or memory concerns when choosing ByVal or ByRef. ByVal should be used if you don't want...
  8. Re: Memory considerations: Processing a large array with different classes

    That's what I thought about ByVal. I had previously checked if elements of arrays passed ByVal to a sub (method) were different after the method call, and they were - so ByVal will return altered...
  9. [RESOLVED] Memory considerations: Processing a large array with different classes

    I wanted to bounce this question about memory considerations toward the user community.

    Let's assume you have two double arrays like x(500000, 100) and y(20, 20), where x(,) is very large but...
  10. Re: System.Data.SqlClient not found at run-time (installed release .exe)

    On the other hand, if I uninstall system.data.sqlclient in nuget, and make sure the imports does not include the namespace, why is the app looking for the sql assembly?
  11. Re: System.Data.SqlClient not found at run-time (installed release .exe)

    Since I am using JSON, there are numerous JSON dependencies for System.Data.SqlClient listed throughout the app. Thus, I made sure the latest assembly was installed using Nuget, and the Imports...
  12. Re: System.Data.SqlClient not found at run-time (installed release .exe)

    Thanks!
  13. System.Data.SqlClient not found at run-time (installed release .exe)

    I am using the VS2022 template (project) for setup and deployment. I am not using any sql in the Winform app (.NET 7.0). Occasionally, when compiling (building) the assembly, the assembly will...
  14. Re: Why can't I programatically fetch HTML from Webview2 (need to click button)

    Thanks, it only happened once. After new runs, it works like a charm. No issues.
  15. Re: Why can't I programatically fetch HTML from Webview2 (need to click button)

    Thanks - it worked once during the first debug run, but on the 2nd and 3rd debug runs, it didn't return anything. Is there a handle in windows that needs to be released, or should I dispose...
  16. [RESOLVED]Why can't I programatically fetch HTML from Webview2 (need to click button)

    I can successfully fetch the inner text from google.com/index.html using the code below, but must click on a button. However, I would rather invoke an Await somehow to set the value of the sHTML...
  17. Exporting to Excel from DataGridView terminates at null cell entry

    I noticed that when I export to Excel from a DGV, the export leaves out cells to the right and below an empty cell (with Nothing or Null in it), i.e., terminates at that cell. I am using a dbNull...
  18. Re: DataGridView: Upper left blank cell occasionally missing when using row headers

    Thanks!
  19. Re: DataGridView: Upper left blank cell occasionally missing when using row headers

    It appears that after I moved the following three lines before the loop that adds row numbers to the row header values, it will work. I checked if dgv.TopLeftHeaderCell.Visible was True, and it...
  20. [RESOLVED] DataGridView: Upper left blank cell occasionally missing when using row headers

    Since row headers are not persistent in the DataGridView (DGV), I use an AddHandler to call the method below, which adds row header numbers whenever the DGV is shown or modified. You will note that...
  21. Re: Disposing Multiple Instantiated Objects (Classes) With Long Run-times

    @PlausiblyDamp - the dispose method for all classes is provided in the OP. The methods typically contain mostly double[,], byte[], integer[], and sometimes dictionaries, lists - and I don't think...
  22. Re: Disposing Multiple Instantiated Objects (Classes) With Long Run-times

    @PlausiblyDamp - There are just a few arrays and lists that are defined at the class level. None of the classes have properties. But the major math method has a lot of arrays and variables that...
  23. Re: Disposing Multiple Instantiated Objects (Classes) With Long Run-times

    @PlausiblyDamp - I am concerned about the classes being disposed. Each class constructor (i.e., Sub New(,,,)) starts a major threaded method that does a lot of math, withs call to other methods in...
  24. Re: Disposing Multiple Instantiated Objects (Classes) With Long Run-times

    @dbasnett - Thanks - I do like the standardization of code regarding all the parameters. Using this approach I could first document (write down) a unique list of parameters (many are re-used),...
  25. Re: Disposing Multiple Instantiated Objects (Classes) With Long Run-times

    Thanks, but there's too many classes and too many different parameters. Thus, my earlier reply with "...params 1,2 for class MyMath1, params 3,4,5,6,7 for MyMath2, and e.g. params 8,9,10, for...
  26. Re: Disposing Multiple Instantiated Objects (Classes) With Long Run-times

    Thanks for putting this together. I understand your logic and approach. Now specifically, a lot of the parameters are different for each math class - as the use of params 1,2,3 was a sort of...
  27. [RESOLVED] Disposing Multiple Instantiated Objects (Classes) With Long Run-times

    At run-time, my Winform app starts (instantiates) multiple classes which are all IDisposable. Each class spawns a threaded method which often has long run times (several minutes).

    If a run only...
  28. Re: GetEnumerator error for constructing Dictionary of Icons from Resouce List

    Okay, thanks. I like that .NET 7 winforms project.
  29. Replies
    2
    Views
    1,159

    Re: Invoking Delegate for Method in Form 1

    Thanks, I got the Invoke to work within Form 1 by simply calling the Appendtreeview method. (All code is now provided above). Outside of Form1, when using the delegate, as long as I invoked with...
  30. Replies
    2
    Views
    1,159

    [RESOLVED] Appending to TreeView via Delegate

    Using code converted from VB.NET, I can successfully invoke a public delegate (from code within Form1 or code in another class) that calls a AppendTreeview method in Form1. However, the 2nd time the...
  31. Re: GetEnumerator error for constructing Dictionary of Icons from Resouce List

    Thank you, it works perfectly. I guess that would mean that in VS2022 (i have Pro) methods are colored gold, like ToString, so it needs ()?
  32. GetEnumerator error for constructing Dictionary of Icons from Resouce List

    I converted the following from VB.NET code (when Option Strict=On) and am getting red underlined errors from Intellisense on two lines. I need to spend more time on this, which will take a while,...
  33. Re: Casting an Object into a List of Objects (List of Lists)

    Okay, got it, will set Strict On.
  34. [RESOLVED] Casting an Object into a List of Objects (List of Lists)

    In My VB.NET Code, it is apparent that VB.NET will allow an object that is essentially a List to be looped through while C# does not. Below is the VB.NET code:


    Dim dicData As New...
  35. Replies
    2
    Views
    688

    Re: VB.NET Text Comparison to C#

    Thank you, that worked in C# like you said.
  36. Replies
    2
    Views
    688

    [Resolved] VB.NET Text Comparison to C#

    I am getting stuck on the following VB.NET conversion to C#. The VB.NET code works in VB.NET (VS2022 Pro), but has some issues in C#, nameley, that StringType does not exist and the ! cannot be...
  37. Re: [RESOLVED] JSON Serialization/Deserialization: JToken's in place of Object Array

    okay, got it. Thx.
  38. Re: JSON Serialization/Deserialization: JToken's in place of Object Array Elements

    Thanks for the rapid reply -- I follow what you are saying. JSON doesn't understand what the object type is supposed to be, even though the array elements are all integer values when serialized. I...
  39. [RESOLVED] JSON Serialization/Deserialization: JToken's in place of Object Array

    I just ported a Winform app from .NET Framework to .NET 6, and after serializing and deserializing an Object type array via JSON, I learned that all of the returned elements of the Object array are...
  40. Re: [RESOLVED] Using AsEnumerable for a DataTable in .NET 6?

    Got it, thx.
Results 1 to 40 of 83
Page 1 of 3 1 2 3



Click Here to Expand Forum to Full Width