Search results for query: *

  • Users: aaaron
  • Content: Threads
  • Order by date
  1. A

    Resolved Remove Click Event Handler

    I want to be able to remove an event handler from a component. I tried a couple of things includeing the code below but can't get it to work. Or maybe it is working but my checking is faulty. Private mDelegateSaveBitmap As New System.EventHandler(AddressOf...
  2. A

    Resolved Shared Methods

    Imports System.Reflection Imports System.ComponentModel Partial Public Class Form1 Inherits Form Public Sub New() InitializeComponent() AddHandler button1.Click, AddressOf button1_Click AddHandler button1.Click, AddressOf button1_Click2...
  3. A

    Resolved Obtain the event handlers of a given ToolStripMenuItem

    The Component class has a property called Events that returns an EventHandlerList which provides the list of event handlers which can be used to get the event handlers for a control. However, the ToolStripMenuItem does not inherit Component Control so I can't use that. I been looking for a...
  4. A

    Question Is a GobalSuppression.vb file usefull

    I have an .editorconfig as a solution items level file, which seems to do all I need. I also have a GobalSuppression.vb file at that level. It's empty. Do I need it? I've been suppressing unwanted error messages by editing .editorconfig, is that a correct way to suppress? Is one of theses...
  5. A

    Question Can a Forms ContextMenu reference a UserControl's MenuItem

    I have a ToolStripMenuItem in ContextMenuStrip Items on a UserControl that I'd like to reference in the Forms ContextMenuStrip items. Is that possible? P.S. Presently the Form has its own MenuItem that calls it a UserControl Public Sub that performs the task the UserControl's...
  6. A

    Resolved TreeView Node Expands

    Private Sub TreeView_1_AfterSelect(sender As Object, e As TreeViewEventArgs) Handles TreeView_1.AfterSelect Try Debug.WriteLine(e.Node.IsExpanded) Me.TextBox_LastSelected.Text = CStr(e.Node.Tag) Debug.WriteLine(e.Node.IsExpanded) Catch ex As Exception...
  7. A

    Question What is the easiest way to determine the string type of the DLL

    If I use Declare Auto and the OS is UNICODE and the DLL is ANSI the runtime will not convert the UNICODE to ANSI. Is that correct? If so, why the word AUTO? If I must tell the runtime what conversion to use what is the easiest way to determine the string type of the DLL?
  8. A

    Resolved Two VSSpellChecker questions

    I'm trying to clean up my VB code using VSSpellChecker but have a few problems. I found the IgnoredWords.dic file but it does not contain words I know I marked with ignore all (and are being ignored). I also found VSSpellChecker.editorconfig which I opened with notepad and also with its VS2022...
  9. A

    Resolved Location values get changed

    I have a form containing a TagController with ten TabPages. TabPages 0 and 5 (only) have the following problem: If I'm designing the form and select one of those tabs I see that the items are not where I expect them to be. I might select an item from the drop down list and note it's location...
  10. A

    Resolved NotifyIcon question

    I have a solution that contains some Forms with code like the following. There is a different icon for the app that shows in the taskbar. This appears to be the only NotiftIcon_1 mention in the project. What could this posibly be for? In: Designer.vb Me.NotifyIcon_1 = New...
  11. A

    Resolved Form size autoscaling

    Much info at Automatic scaling (Windows Forms .NET) site Also others attempting to completely explain auto scaling Some say to set AutoScaleMode property to Dpi, other to use Font Some mention AutoSizeMode property to GrowAndShrink others do not Some say to add <dpiAware> to the application...
  12. A

    Resolved Insert Image Into RichtextBox

    A long time ago I wrote code to insert an image into a RichTextBox. Haven't used it for years until I tried recently and got an error mesage. Downloaded new and simpler code to do it. And got the same error as my code. Looks like the RichTextBox has changed. Here is one code I used: Dim q...
  13. A

    Resolved Interface vs. Object

    My understanding is that an Interface does not have memory allocated like a class's object does. The clipboard rerurns an IDataObject which I assume is an object not an interface even thought it's name starts with an I. Correct? Consider the following: Dim dict As IDictionary =...
  14. A

    Resolved Where to dispose unmanaged objects

    In a user control where is the best place to dispose unmanaged objects?
  15. A

    Resolved My Project

    I have a solution with 67 projects. Some predate .Net Years age some projects were converted to .net and added to the solution. New ones were created in the solution. As new framework versions came available the solution was upgraded to it. Now using...
  16. A

    Question I need a pointer to a pointer

    I have many forms that need a few things done to all of them (like close, mininize...). I got the following idea for eliminating the few sets of many lines of code to a few For loops. Dim MonMdiChlidren As New List(Of Form) Protected Overrides Sub OnLoad(e As EventArgs) 'Where...
  17. A

    Resolved I would like to have only one API declare

    Public Declare Auto Function SendMessage Lib "user32.dll" (hWnd As IntPtr, msg As Integer, wParam As IntPtr, lParam As IntPtr) As IntPtr Public Declare Auto Function SendMessage Lib "user32.dll" (hWnd As IntPtr, msg As Integer, wParam As IntPtr, lParam As Integer) As IntPtr This is old 32-bit...
  18. A

    Resolved Enumerate network shares

    I've been for a long time trying to enumerate network shares on a workgroup (no domain) network with out success. The last thing I did was to use some C++ and C# code as a guide and produce something that looks like a good start. I knew there was no way to post a question that was meaningfull...
  19. A

    Resolved IO.Directory.Exists Problem

    The Above exits with a valid file name. See image below for filename. The file was created by Windows Media Player. If I click on the filename in file explorer it open in Paint OK. Shoud I be doing it differently? A better view of the filename
  20. A

    Resolved I can't find a file using RT_GROUP_ICON or RT_GROUP_CURSOR

    Years ago I wrote VB code (as part of a big program which I've played with) that extracts Icons and Cursors from .dll files that are stored in groups. I wonder if it still works. But I can't test it because I can't find a file using RT_GROUP_ICON or RT_GROUP_CURSOR. Can you point me to such a...
Back
Top