Search:
Type: Posts; User: jmcilhinney
Search:
Search took 0.48 seconds.
-
If someone says "how can I do something I shouldn't do", it seems to me that the simplest response is "don't do it". Not quite sure how that's complicating things. Many people ask how to do things...
-
Personally, I started using Bing a long time ago, specifically because I found the results better for .NET development. Not sure whether Microsoft gave it extra effort because they own both but,...
-
You can certainly implement your own sort on the collection but I was talking about something inbuilt when I said "easy way".
-
For the record, that last assignment won't work if ProductCollection is type ObservableCollection(Of T), as is likely the case. It would need to be IEnumerable(Of T) for that assignment to work. I'm...
-
Then that is at least a consistent UI. If you don't like empty fields and wish to provide a prompt in all fields that would otherwise be empty, I can see the logic, even if it's not something I would...
-
They wouldn't all be separate objects on the screen. If you were using WinForms and had a PictureBox for all the fish then that would be an issue, because each control would be resource intensive. In...
-
Nope.
You didn't say they could/should either.
What I'm actually saying is that they shouldn't add the prompt they asked to add. Post #9 should make it clear that I'm not against...
-
But you're not pushing back at all. In the examples you linked to, it is specifically saying "Select a fruit..." or "Select a product...", i.e. it's telling the user what the field is for, exactly as...
-
There's a lot to address here but I just can't bear it right now. What I will suggest is that you take it back to basics, as you should have done from the start. Forget the InnerException for now and...
-
This is an example of why you should ALWAYS read the relevant documentation. If you had simply clicked on that OrderBy method and pressed F1 then you would have been taken directly to the...
-
Blank cells of what? Please provide a FULL and CLEAR explanation of the problem. Maybe you could provide the code you currently have, if you'd like us to address an issue with that code.
-
That will work if the DropDownStyle is set to DropDown but not if it is DropDownList, which it probably ought to be. Again though, while the OP can do what they want, I have to ask why it would be...
-
It's not incorrect but the whole point of the BackgroundWorker is that you can call methods and handle events like normal and not have to invoke any delegates directly. If only I told you exactly...
-
Yes, one wonders whether this would have received as much attention pre-COVID. I have no idea either way.
-
I know it is. Did you actually read my post? Would you put a prompt in a TextBox to tell the user to type? Of course you wouldn't. In that case, why do you think you need to put a prompt in a...
-
Why would you want that? I see people ask for this often but it's quite silly. If the user can work out that they have to type something into a TextBox without you prompting them, why do you think...
-
Are you using ClickOnce for deployment, i.e. the publishing functionality built into VS? the answer to the first question would be "yes", but exactly how to do it would depend on the deployment...
-
Again, the fact that something is not rendered does not mean that it does not exist so your problem is almost certainly not that something is not rendered. If you're not prepared to provide a full...
-
Can you be more specific? That a control hasn't been rendered doesn't mean that it doesn't exist.
-
The issue is that your exception handling code is throwing another exception. If you had paid attention in the debugger then you'd have seen that the InnerException for the exception you're throwing...
-
Then it's a good thing that developers have additional tools available to them that regular users do not, the most important being the debugger built into VS.
Then you probably shouldn't be doing...
-
Does the code get executed as expected when the form is minimised? You need to find out what is actually happening.
-
Using Declare is the old VB6 way of declaring an external function so it still exists in VB.NET for compatibility. The DllImportAttribute is the .NET way of declaring an external function. You don't...
-
You ought to also be handling the UnhandledException event of the application - every VB WinForms app ought to do that. If another exception is being thrown, you'll hear about it there. Given that...
-
So when you run it in the debugger, what happens after it goes through that Catch block?
-
You say that the program crashes. Do you mean that it doesn't hit your Catch block? Or that it does hit your Catch block but a further exception is thrown?
-
I might be inclined to agree if it were just the change of political alignment. It's an odd thing to announce but Musk is definitely the sort of person to make such a big deal of something like that....
-
I watched a video by a prominent leftie YouTuber a few days ago about Elon Musk publicly declaring himself a Republican. At the time, he said that it felt like a setup. Musk claimed that "they" were...
-
Almost certainly. Anything else would get in the way of business.
I saw a headline the other day that we have case in Australia now. I believe that it was a woman who travelled here from the UK.
-
Or you could just do it all in one chain:
Dim rng As New Random
Dim selectedNumbers = Enumerable.Range(1, 58).OrderBy(Function(n) rng.NextDouble()).Take(6).ToArray()
Note that the original...
-
No point calling ToArray multiple times. Only the last one is needed.
-
How about you don't allow duplicates in the first place? Then there's no need to prevent them being placed in the array. How does a real lottery draw work? It puts all the possible values into a...
-
Then maybe take the advice you're given when you're given it instead of trying to guilt other people into writing your code for you. I wouldn't be here if I didn't want to help but I'm not here to be...
-
At the very least, use AscW and ChrW but don't do that either. Convert.ToInt32 will convert a Char to a Unicode value and Convert.ToChar will do the opposite. That's what you should be using, not...
-
There's no magic to it. You just have to do the basic arithmetic. If your adding a control in code and you want it to be centred horizontally in its container the you have to set its Left property...
-
Read the error message. Does it say anything about NULLs? The issue here is your database, not your DataSet. You need to configure your database to accept the data that you want to save to it.
-
Of course it's not. There's nothing wrong with the syntax so the compiler isn't going to complain. The compiler doesn't test the logic of your code though. . That's your job. The fact that code...
-
Use the debugger. The error message is telling you that the index you're using is out of range so look at the index you're using and the valid range to see why it's wrong. The index is hard-coded...
-
Look at the difference between them. One is specifying a 2-digit daya and the other is specifying a 1-digit day. Is you day 2 digits? Did you read the documentation about date/time formatting? If you...
-
You could do that but the form would be blank by default. You would need code somewhere, either in the form or elsewhere, to add whatever controls you need and to process the data in those controls....
|
Click Here to Expand Forum to Full Width
|