Search:

Type: Posts; User: pel11

Search: Search took 0.01 seconds.

  1. Re: Winforms app: 2 forms loaded at startup, but both go invisible for brief moment

    Thanks for helping out. Understand your additional comments.
  2. Re: Winforms app: 2 forms loaded at startup, but both go invisible for brief moment

    Still some lingering questions. If there's a lot of controls on Form1 that you don't want the user to see when Form1 loads, how can they be hidden during loading until Form1 is *fully loaded.*?
    ...
  3. Re: Winforms app: 2 forms loaded at startup, but both go invisible for brief moment

    Thanks - sounds great!
  4. Re: Winforms app: 2 forms loaded at startup, but both go invisible for brief moment

    One question, if I load Form2 as the startup, how can I fire a menu item in Form1 when it's loaded (after I use Me.Close() for Form2)?
  5. Re: Winforms app: 2 forms loaded at startup, but both go invisible for brief moment

    Thanks, very helpful, will look into restructuring.
  6. [RESOLVED] 2 forms loaded at startup, but both go invisible for brief moment

    By default, at run-time, I am opening Form1 as the startup form. At the end of the Form1 Load event, I use the following code to make Form1 invisible, and then show frm2 as dialog, which waits for...
  7. Upgrading to VS 2022 Version 17.3.0 is a horrendous disaster!

    I upgraded VS 2022 to version 17.3.0 and have experienced nothing but disasters. Following is a list of error messages or phenomena:

    1). "No projects managed by Nuget in solution" (this is a...
  8. Re: Installing Example Datasets in Roaming folder vs MyDocuments

    Thanks for the helpful comments!
  9. [RESOLVED] Installing Example Datasets in Roaming folder vs MyDocuments

    My setup & deployment package installs some simple datasets for the user in the \MyDocuments\AppName folder. It also installs a larger set of example datasets in the...
  10. Re: Manually adjusting column width in DataGridView requires two iterations

    I was able to get very good row header labels in the dgv by doing the following:

    Step 1:


    dgv.Datasource = dt ' connect to the datatable - loads the data into the dgv
    'specify that you...
  11. Re: Manually adjusting column width in DataGridView requires two iterations

    Didn't help thus far.
  12. Re: Manually adjusting column width in DataGridView requires two iterations

    Thanks, I saw that in some forums. Will try and get back if resolved.
  13. [RESOLVED] Manually adjusting column width in DataGridView requires two iterations

    I am using a DataGridView (dgv) which resides on a tab page in a tab control, and there are no problems connecting to a dt via .datasource = dt and populating the dgv with column names (headers) as...
  14. Re: MS Access Table name is Nothing, but Table does exist

    SOLUTION: The table inside the .accdb file was an imported Excel workbook file (.xlsx) with an Excel icon, so I learned that those won't show up when trying to programmatically list the table. So I...
  15. Re: MS Access Table name is Nothing, but Table does exist

    The question was revised, so that it only focuses on a count of zero for the number of rows in the dt.
  16. [RESOLVED] Programmatically fetching table names from MS Access results in Nothing

    For some reason I am getting Nothing for the table name that's pulled from an MS Access db. I just opened the file manually, and there is a Table named "log_returns", so why is this coming up as...
  17. Re: Displaying Greek beta symbol in TreeView icon text (read from disk)

    The fix was to encode what was being saved, using, e.g.


    Dim sw As StreamWriter = New StreamWriter(FileName, True, Encoding.Unicode)

    When reading in, you don't need to specify encoding in the...
  18. [RESOLVED] Displaying Greek beta symbol in TreeView icon text (read from disk)

    I was able to paste a Greek beta symbol from the MS Windows Character Map (Microsoft Sans Serif) directly into code, and can compile, and run and the symbol shows when the text string is used for a...
  19. Re: Chart: One major legend for multiple chart areas

    Thanks - look great, and very nice trick. However, I found the code below which will write a single legend with colored lines and series number at the bottom of chart with multiple chart areas. ...
  20. Re: Chart: One major legend for multiple chart areas

    How did you get the groupbox on the chart, and what about X,Y position? Some sort of annotation?
  21. Chart: One major legend for multiple chart areas

    Is there a way to trick MS Chart into creating an e.g. legend at the bottom of a chart with multiple chart areas? Firstly, there are only 3 series in each chart area, and the series colors are all...
  22. Re: Public Array of Integer Elements all Zeroed (without using code)

    I found part of the culprit. If you have a public array x() as integer for example, and then call a method as in


    Public X(100) As Integer

    For i = 0 to 99
    X(i) = 5
    Next i
    Math(X)
  23. Re: Public Array of Integer Elements all Zeroed (without using code)

    Thanks for the detailed information. I'll try making the class a function in a module, as it would probable save on instantiating the object (class) every time it's used. Will watch at the end of...
  24. Re: Public Array of Integer Elements all Zeroed (without using code)

    Thanks @Shaggy Hiker. The only time I use ByRef is when I load the params/arrays during deserialization from a JSON file like the method below. However, I learned that the name of the param/array...
  25. Public Array of Integer Elements all Zeroed (without using code)

    I am using a QC method in Form1 (below) to determine whether Public variables develop problems throughout the application. Example problems (exceptions) would be integer values of zero, or arrays...
  26. Re: Waiting for threaded work method to complete inside a threaded loop

    @Niya, thanks a lot. If the loop is not threaded, is there a trick for using something like WaitOne() to ensure all threads are completed? Using WaitOne() in a non-threaded evironment will stop all...
  27. Re: Waiting for threaded work method to complete inside a threaded loop

    Thanks, I think that by the time all the excess baggage for a Winforms app is brought into the discussion, the "parameters change", but yes, for straightforward work, Tasks seem like the way to go. ...
  28. Re: Waiting for threaded work method to complete inside a threaded loop

    Yes, I am using Microsoft Excel 16.0 Object Library, and the Interop Excel library, which is Active X and passes arguments as COM. Below is a link to a Sept 2021 article at MS on embedding Excel in...
  29. Re: Waiting for threaded work method to complete inside a threaded loop

    Tasks are not single apartment, since I just tried one instead of a thread, and I received the ActiveX exception related to the UI that "the thread is not single apartment"
  30. Re: Waiting for threaded work method to complete inside a threaded loop

    Need to find out if Tasks won't throw a UI error (when delegates are used), since single apartment threads will not. I can't use for example ThreadPool.QueueUserWorkItem(Sub(state) WorkMethod,...
  31. Re: Waiting for threaded work method to complete inside a threaded loop

    FYI, the threads need to be single apartment, so can Tasks handle this or will they throw a UI exception?
  32. Waiting for threaded work method to complete inside a threaded loop

    I am using a threaded loop to spawn a work method, and then wait for the work method to complete before cycling another loop iteration. However, when I specify 4 steps in the loop, I am only getting...
  33. Re: TabPage index is invalid but visible?

    This was resolved, since threading was being used. A delegate was applied, which resolved the tabcontrol issues.
  34. [RESOLVED] TabPage index is invalid but visible?

    I am invalidating a new column of a DataGridview (that resides on TabPages(1) of TabControl2 on Form1) from another class, which has worked successfully until now. Recently, the line of code below...
  35. Re: Delegate Updating a UI DataGridView from A DataTable That's Appended Via Threadin

    I found out via programming that any code that modifies the dt inside the threaded method, needs to be moved to a method in Form1 (UI), which is called via delegate from the threaded method that...
  36. [RESOLVED] Updating a UI DataGridView from A DataTable That's Appended Via Threading

    I am trying to append new columns to a DataGridView which resides on a Form1 TabControl, based on new columns that are added to a global DataTable (dt) in a threaded class.

    The delegate to update...
  37. Re: Aborting multiple threaded classes via token cancellation

    Thanks @Paul, these work great!
  38. Re: Aborting multiple threaded classes via token cancellation

    @Shaggy Hiker - thanks but do I need to pass cts or cts.token as a parameter? Also, don't I first need to set cts.token cancel if AbortAllThreads=1, and then use another if-statement after this...
  39. [RESOLVED] Aborting multiple threaded classes via token cancellation

    It works out that in a large WinForms app that I have, all of the threaded classes, which do a lot of math work, need to be thread as Apartment, or there are significant delegate-related exceptions...
Results 1 to 39 of 39



Click Here to Expand Forum to Full Width