Search results for query: *

  • Users: JohnH
  • Order by date
  1. JohnH

    How to copy textbox1.text to clipboard

    In case you want to copy all text, and not just selection, check out the Clipboard class.
  2. JohnH

    Generar reporte Excel desde un datagridview

    Please translate to English and post again. Closing this thread.
  3. JohnH

    Question Problema invio mail da vb

    Please translate to English and post again. Closing this thread.
  4. JohnH

    Launch a web page with your default browser

    Try this: Process.Start(New ProcessStartInfo("http...") With {.UseShellExecute = True})
  5. JohnH

    Question Help Needed to make animation from pattern string for displaying Bingo winning patterns

    Make it Async Sub instead and call Await Task.Delay(250)
  6. JohnH

    Resolved Obtain the event handlers of a given ToolStripMenuItem

    Look at the event. There seems to be problem with Source Browser at the moment, but here is the source at Github for ToolStripItem.Click event where you see the field name used as key to add/remove event handler...
  7. JohnH

    Resolved Obtain the event handlers of a given ToolStripMenuItem

    Oh, I forgot you were doing ToolStripMenuItem, base class ToolStripItem defines lots of the events that Control class normally has, including Click event.
  8. JohnH

    Resolved Obtain the event handlers of a given ToolStripMenuItem

    You need the key, which is an object in a shared field in the class or any base class (event DeclaringType or base). The field naming may take several forms based off the event name. See the fields in Control class for example: Source Browser, specifically that is the s_clickEvent Dim key =...
  9. JohnH

    Resolved Obtain the event handlers of a given ToolStripMenuItem

    This works for me in .Net 8, can copy all event handlers for any component, controls and menu items alike. Private Sub CopyEvents(source As Component, target As Component) Dim info = GetType(Component).GetProperty("Events", BindingFlags.NonPublic Or BindingFlags.Instance) Dim list1 =...
  10. JohnH

    Resolved Obtain the event handlers of a given ToolStripMenuItem

    You're using a different approch there, and not the Component.Events property that you asked about. Is that the same approch you're using for controls? There is no field with same name as the event that I can see, neither for controls or other components. Also, which .Net version are you using?
  11. JohnH

    Resolved Obtain the event handlers of a given ToolStripMenuItem

    You would use the same code to get Events property from any component.
  12. JohnH

    Resolved Obtain the event handlers of a given ToolStripMenuItem

    Control doesn't have a Events property, that is inherited from Component.
  13. JohnH

    Resolved Obtain the event handlers of a given ToolStripMenuItem

    It does. ToolStripMenuItem Class (System.Windows.Forms)
  14. JohnH

    Who's using .NET "Core"? (As well as a bit of an introduction...)

    My personal tools are upgraded to .Net 7, haven't got around to update to .Net 8, I'm guessing that is quickly done. I also have a .Net Framework windows service and a .Net Standard library in otherwise .Net 7 solution, since the .Net Worker service is not available to VB. I may rewrite the...
  15. JohnH

    Error open SQL Database Visual Basic 2012

    Moderator notice: Email and telephone removed. Use forum message or reply to thread.
  16. JohnH

    BitMap - BMP vs JPG

    https://learn.microsoft.com/en-us/dotnet/desktop/winforms/advanced/how-to-set-jpeg-compression-level?view=netframeworkdesktop-4.8 https://stackoverflow.com/questions/7982409/is-jpeg-lossless-when-quality-is-set-to-100
  17. JohnH

    Not Sure How To Do A Control Array Or Pass An Object To A Sub

    There's Controls("name") or Controls(index)
  18. JohnH

    Set Registry key to make program a default

    It is also possible to open Default Apps settings where user can choose: Process.Start(New ProcessStartInfo("ms-settings:defaultapps") With {.UseShellExecute = True})
  19. JohnH

    Resolved Detecting If A Drive Is CD Rom

    The DriveType enum is declared in .Net, don't declare a new type yourself. Also never use the numeric value in place of enum values, use the enum value. If info.DriveType = DriveType.CDRom Then
  20. JohnH

    Resolved Detecting If A Drive Is CD Rom

    line 8: you can create DriveInfo directly from savFile.FileName. According to DriveInfo(String) Constructor (System.IO) the driveName parameter can be: Then compare DriveType property, start typing If Drive_Info.DriveType = and intellisense give you the options to compare, among them the value...
Back
Top