Search results for query: *

  • Users: cbreemer
  • Content: Threads
  • Order by date
  1. C

    Arrow keys and button focus

    This is probably an easy question, and possibly a stupid one... but I've been searching and could not find an answer. When I have a form with a number of buttons, pressing the arrow keys cycles through the buttons, giving each one of them focus in turn. How can I prevent that ? I want to use the...
  2. C

    Resolved Waiting for any of a set of buttons to be clicked

    I have a WinForms program that loops thru a list of images. For each image, a form pops up with buttons for several choices what to do with the image. Originally that form was a separate dialog, which worked fine. But now I had the idea to move all that functionality (including said buttons) to...
  3. C

    Scrolling picture in panel

    I have a PictureBox in a Panel with scrollbars. I can scroll the picture fine but it annoys me that the picture does not move along while dragging the scrollbar. It only changes position when I release the mouse button. Would there be a simple solution for this ?
  4. C

    Question Layered graphics vs. flickering ?

    I was having fun with programming an analog clock, but one thing I can't work out is how to avoid flickering. When e.g. the second hand moves forward one second, I first need to erase the previous position of the second hand before drawing the new position. I had that programmed nicely, but...
  5. C

    Issue with WebBrowser

    I have a little issue with the classic WebBrowser (not the WebView2 one, which I could not get to work). When I load some html in the WebBrowser by setting the DocumentText property, and then call the Print() method, the name of the printed document is always about:blank. When I first write the...
  6. C

    Resolved Tooltip balloon arrow

    I am using a tooltip with toolTip1.IsBalloon = true; and display it in a MouseMove event handler. I like the balloon style with its blue title, rounded corners and the arrow pointing at the mouse position (image 1). However when I move the mouse a little lower, the nice round corners disappear...
  7. C

    Resolved Graphics.DrawString output quality

    I was wondering about the butt-ugly appearance of the Graphics.DrawString() output. Then I found out (by accidentally plotting my bar chart wrongly) that it looks so much cleaner when painted over a red background. I wonder why that is, and how I could make it look presentable on a light...
  8. C

    Question Using System.Windows.SQLite in an event handler

    Hi all, I'm wondering if there is an issue with calling SQLite in an event handler ? I have a TextChanged handler that attempts to check for a row in the database. When the event handler is fired, my program freezes, as well as Visual Studio and, indeed, the entire Windows Explorer ! The only...
  9. C

    Weird exception...

    Just wondering if anyone has ever experienced the exception in the below image. It came out of the blue, in a piece of code that has always worked, and on a line that you would never expect to run into such a problem. I wasn't aware of anything special happening at the time. I haven't changed...
  10. C

    Question Textbos dimensions vs. font size

    In my new WinForms project I have a series of 1-digit textboxes, like this: I would like the digits to fit more snugly in their boxes, with not so much whitespace around them. But I can't get the textbox any smaller, or the font any bigger. The TextBoxes have zero margin and center text. The...
  11. C

    Question WebBrowser print document name

    I have a form that uses both a CefBrowser and a WebBrowser (don't ask why 🙂) Both components get loaded with complete HTML created by the program. Both have a Print button. Now when I print the CefBrowser, a nice feature is that the document title (in the Windows Print Queue monitor) is taken...
  12. C

    Resolved Detecting the end of a thread

    I am struggling with something that I feel should be simple... once you know how. I have a Windows Form that implements a rudimentary print queue monitor. It starts a thread which goes into an endless loop, each second checking the local printer queue and calling Invoke(new...
  13. C

    Answered Context menu in DataGridView

    I am implementing a contextmenu on my DataGridview. It works well but I want to make it more dynamic, so that certain items are disabled depending on the row that was right mouse clicked on, and that the menu does not appear when I click on the header row. I figured that the ContextMenuStrip's...
  14. C

    Question ListBox colors

    Would it be possible to change the default colors of the WinForms Listbox ? In particular the colors of the selected item. Normally it has white text on blue background which is fine. But once you set the control to disabled the white text changes to light gray which is 100% unreadable on the...
  15. C

    Question CefSharp.WinForms.ChromiumWebBrowser

    Just wondering whether anyone here has experience using the CefSharp.WinForms.ChromiumWebBrowser control ? It works fine for me but the only snag is it insists on printing a border around my HTML. As I need to do borderless printing this is a problem. I can't find a way to prevent it. I just...
  16. C

    Question Get StreamWriter current position

    I wonder if there is a way to query the current write position of a StreamWriter object ? Or rather, I just want to know if the writer has been written to at all (which would be so if the current position is non-zero). Currently I have to maintain a separate boolean for this, but I thought there...
  17. C

    Question Managed Debugging Assistant 'DisconnectedContext'

    Oh damn... my program to copy files from my smartphone to PC was running happily so I went and had dinner. Coming back, expecting it to have finished, I found that just over halfway it had ran into this strange error, see image. I'm not using COM or threading in my code (but could be the...
  18. C

    Resolved ImageComparer Class

    I hope this is the correct forum for this question - I'm always a bit confused about all the various forums here ! Has anybody here ever used the ImageComparer class ? It is documented (albeit extremely rudimentary) in this page ImageComparer Class (Microsoft.VisualStudio.TestTools.UITesting)...
  19. C

    Resolved Exception not caught ?

    This is probably a simple and/or dumb question. I have some code in a try/catch block but it still triggers an exception in VS2022, see image. The exception message is crystal clear, and kind of expected, but I fail to understand why it does not just execute my catch() code. Most likely I'm...
  20. C

    Resolved Tab sorting not working in VS 2022 ?

    I spend a fair amount of my time in VS2022 hunting for a specific editor window, and then half the time clicking the wrong tab because the tabs seem to be in random order. I have checked the setting for it and it suggests it should be Alphabetic sorting, but that is certainly not the case. See...
Back
Top Bottom