Search:
Type: Posts; User: jmcilhinney
Search:
Search took 5.08 seconds.
-
Team effort, baby!
Actually, it occurred to me that that could be improved a little more. If there are no items then we can use the existing instance method, so we only need to use our own code if...
-
You could even implement that code as an extension method:
Imports System.Runtime.CompilerServices
Public Module ListViewExtensions
<Extension>
Public Sub AutoResizeColumns(source...
-
I just tested and the code I posted will indeed cut off a long column header if all subitems in that column are shorter. It seems an oversight that there isn't an option to consider both header and...
-
I haven't tested it specifically but wouldn't you just need to do this:
List_View.AutoResizeColumns(If(List_View.Items.Count = 0,
...
-
They lasted longer than most.
-
That's exactly what I implying in post #4 that you apparently ignored.
-
You mean exactly what I did in post #9?
There is no such thing as an Ellipse, unless you define it yourself. Given that the DrawEllipse method takes a Rectangle as an argument, storing Rectangles...
-
As for the issue, the problem is that you're not getting any data out of your DataTable. You're just using the values the user entered. If you want to use the data you retrieved then you have to...
-
For the record, you shouldn't really use that combination of field names. You should either use firstName and lastName or givenName and familyName. That's because there are some cultures where the...
-
Updating the Label while you draw the ellipses in a loop is a very bad idea too. That loop should execute so quickly that you shouldn't really be able to see any single number in the Label anyway. If...
-
The Paint event works exactly as it should. If your code doesn't work then it's your code that is wrong but you haven't shown us your code so we have to guess what might be wrong with it. If you just...
-
Also, don't add items in a loop like that. At the very least, add all items in one go with a single call to AddRange. Better still, bind the data by setting the DisplayMember, ValueMember and...
-
Try using the DocumentCompleted event of the WebBrowser. You'd have to add some conditional logic so that it only happened the first time.
-
Try loading it in the Shown event handler instead of the Load event handler.
-
The potential issue with concatenating fields is that you may end up being able to match a value that doesn't actually exist in any column. It may be possible based on the data and, if it is, you can...
-
There is only one MenuStrip. What I suspect has happened is that you have created a new project and you have used the .NET template rather than the .NET Framework template. This root issue has come...
-
As for the question, if you know that you want to compare every column then the proper way to do it is to write SQL code that compares every column. It sounds like you're hoping for something like a...
-
For future reference, don't post code snippets with huge wads of leading whitespace on every line but the first. It always amazes me how many people put no thought into this. If you select a section...
-
Add some logging to your code so you can see what's happening when and where. You can't just use the debugger when you have multiple threads because it's too hard to work out what's going on in what...
-
The ConcurrentQueue class has no Clear method but, if you want to clear it, you can just dequeue in a loop as I demonstrated. Here's an extension method that will allow you to call Clear like you...
-
This is really a SQL question. You can use SELECT TOP 1 to get the first record in a result set so you simply need to query your table and sort by the date column in ascending order to make the...
-
We're not here to teach you how to program from scratch. What have you done and where are you stuck? If you want to create such a system then presumably you know how it works so put something into...
-
Do it like this:
Private actionList As New ConcurrentQueue(Of String)
Private Sub AddAction(action As String)
actionList.Enqueue(action)
End Sub
Private Sub Button1_Click(sender As...
-
Indexing the Controls collection returns a Control reference, so you can only access members of the Control class via that reference. As is always the case, if the actual object referred to is a more...
-
It's a different solution but it's not inherently "cleaner". What if you don't want the image obscured by the text?
Also, this is the VB.NET forum and you have provided C# code. Not a criminal...
-
You do what I said. You define a type that had those properties and then you create an array of that type. Creating an array is the same regardless of the type and you obviously already know how to...
-
Use a single Label, set AutoSize to False, change the Size so it is the full width of the available area and set TextAlign to MiddleCenter or, if some of the descriptions may be multi-line, TopCenter.
-
Instead of using a Bitmap array, you should define a type that has a Bitmap property and a String property and then create an array of that type. You can then create instances of that type and put...
-
Yes you did, but I didn't ask you "what". I asked you "why". You don't have to answer my question if you don't want to but I'm not interested in helping people to do the wrong thing so if you can't...
-
I doubt it. My impression, based largely on the fact that he seems to want to criticise Biden for every little thing even before this while pretty much giving Trump a pass, is that he is someone who...
-
Why? Is this a "because I can" sort of thing or are you actually trying to achieve something useful? If the latter, you should explain what that is because it's hard to imagine that there isn't a...
-
The point of an example is to demonstrate a principle and you then implement the principle in your own scenario. An "example" of what I described would be the whole thing, so it wouldn't be an...
-
There have been calls on the left to start a People's Party behind the likes of Bernie Sanders. I think that that would be a good thing in principle but the reality is that, if that happened, the...
-
Indeed. I don't know whether they were just parroting Trump himself but I've heard plenty of his supporters claim that the fact that his rallies were so well and enthusiastically populated is...
-
If the TabPage was added to the TabControl in the designer then there will be a field for it, just like other controls. In that case, you would generally refer to the TabPage by that field, e.g.
...
-
Indexing the Controls collection with a name that doesn't exist will return Nothing, and you can't get a property of Nothing. Why do you think that ComboBoxes will just appear out of thin air? If you...
-
I agree but I will say that an ad hominem attack and an ad hominem fallacy are two different things. I'm not above calling people stupid if I think they're stupid, as evidenced above, but I generally...
-
I would not be loading the file every time unless you're confident that you'll only toggle a small number of times. Otherwise, you'll be creating a large number of Image objects from the same. In...
-
When any exception that you're not sure about is thrown on a compound statement, the very first thing to do is to break up the statement into parts and see exactly where the exception is thrown. That...
-
Error messages are text and should be posted as text. We shouldn't have to resize an image and try to read the blurry screenshot when, if I'm not mistaken, the Exception Assistant window even has a...
|
Click Here to Expand Forum to Full Width
|