Skip to content

C#

C# discussions

This category can be followed from the open social web via the handle c-065f1d12@forum.codeproject.com

93.7k Topics 383.1k Posts
  • Visual Studio Weirdness

    csharp c++ visual-studio help question
    3
    0 Votes
    3 Posts
    63 Views
    Richard Andrew x64R
    Yes, but it would refuse to load the DLL even if there were no code changes or assembly property changes. I think I have solved it however. There is a file in the DLL project named AssemblyInfo.cpp, and it contains an assembly attribute named AssemblyVersionAttribute. And it was set to L"1.0.*". I think this was causing the problem. The asterisk means that it should autoincrement the version number. I changed the value to L"1.0.0" and it no longer fails to load the DLL if the DLL is rebuilt. Thanks for reading my post and for your input! The difficult we do right away... ...the impossible takes slightly longer.
  • how to get image Thumbnail without open it?

    tutorial question
    8
    0 Votes
    8 Posts
    90 Views
    L
    Some file formats allow embedding a thumbnail in metadata. For example JPG allows it in the EXIF data section. Not all image formats support this, and even if they do, not all images will have it. And even if it is present, the quality might not be sufficient. I have not looked at it for years (decade+) so have no code nor libraries, but maybe googling "EXIF thumbnail c#" or similar will help.
  • how set cutom paper size?

    help question
    2
    0 Votes
    2 Posts
    25 Views
    R
    Yousef10 @ stackoverflow (SOS: "Microsoft Print PDF" PaperSize) says "don't worry" ... it's the printer's fault. And your code's the same as his; so first step -> try running your print PDF routine with a different printer?
  • 0 Votes
    5 Posts
    48 Views
    I
    Once again you help me, OriginalGriff. I'll Think about. Thanks.
  • System.* not defined or imported

    help
    7
    0 Votes
    7 Posts
    61 Views
    L
    Actually I think there is a much simpler answer.
  • Combobox item selection

    question
    2
    0 Votes
    2 Posts
    28 Views
    OriginalGriffO
    Not in a standard combobox - it's a single row item which selects the entire item. What are you trying to achieve that you think you need this: there may be a better way. "I have no idea what I did, but I'm taking full credit for it." - ThisOldTony "Common sense is so rare these days, it should be classified as a super power" - Random T-shirt AntiTwitter: @DalekDave is now a follower!
  • 0 Votes
    1 Posts
    17 Views
    No one has replied
  • PrintQueueWatch

    help tutorial career
    3
    0 Votes
    3 Posts
    30 Views
    OriginalGriffO
    At a guess - and I don't play with print queues so that's all it can be - it's that your app needs elevation, or you need specific permissions to access the two print queues involved. "Access denied" means you don't have a required permission, so it's likely to be one or the other. Which makes a lot of sense, since the print queue may contain items from multiple users! The simplest way to check which is to run your app in admin mode and see if the problem goes away. If it does, then that's what you need - an elevated app. If it doesn't, then you need to tell the printer queues "who you are" in order to change them. This may help: https://stackoverflow.com/questions/8348743/access-denied-trying-to-purge-printqueue-in-c-sharp[^] "I have no idea what I did, but I'm taking full credit for it." - ThisOldTony "Common sense is so rare these days, it should be classified as a super power" - Random T-shirt AntiTwitter: @DalekDave is now a follower!
  • network change event/Compare

    csharp database sysadmin data-structures question
    2
    0 Votes
    2 Posts
    24 Views
    R
    Surely this return will aid in your finding a good answer to a problem: CP Search[^]
  • Log file advice?

    csharp wpf help question code-review
    8
    0 Votes
    8 Posts
    65 Views
    J
    Rob Philpott wrote: and been replaced by something more standardised and flexible, What exactly?
  • 0 Votes
    2 Posts
    23 Views
    D
    The old DataGrid wasn't very flexible. You don't have the control over its rendering like you do with the DataGridView. The only way to SIMPLY get the functionality you want is to drop the DataGrid and replace it with the DataGridView. Otherwise, you're writing a whole bunch of drawing code and drawing the DataGrid yourself. You really don't want to do that. Asking questions is a skill CodeProject Forum Guidelines Google: C# How to debug code Seriously, go read these articles. Dave Kreskowiak
  • SqlDataReader with multiple result sets

    question database
    5
    0 Votes
    5 Posts
    58 Views
    Richard Andrew x64R
    Good point, Griff! I didn't know that option existed! The difficult we do right away... ...the impossible takes slightly longer.
  • 0 Votes
    6 Posts
    36 Views
    OriginalGriffO
    Quote: I am using the school of Google and ChatGTP Don't do it like that, please. Trouble is that unless you know something exists, you can't look for it - a course or book presents everything in a structured manner so it's easier to understand, and provides exercises to check your comprehension. It also helps to "cement" the learning - we learn by doing, not by looking - you can watch as much of the Tour de France as you like, it won't teach you to ride a bicycle! :D "I have no idea what I did, but I'm taking full credit for it." - ThisOldTony "Common sense is so rare these days, it should be classified as a super power" - Random T-shirt AntiTwitter: @DalekDave is now a follower!
  • DPI issue when calling C# from C++

    csharp help c++ dotnet announcement
    3
    0 Votes
    3 Posts
    28 Views
    J
    Framework 4.7.2 Be wary of strong drink. It can make you shoot at tax collectors - and miss. Lazarus Long, "Time Enough For Love" by Robert A. Heinlein
  • Password Salted Hash Question

    question database cryptography
    1
    0 Votes
    1 Posts
    9 Views
    No one has replied
  • 0 Votes
    10 Posts
    83 Views
    L
    :rose: Today, I need to fix that statement; it should read: some image operators (e.g. Image.FromFile) MAY throw an OOM Exception when the data is not valid. There is no guarantee an OOM will occur on every damaged image! :) Luc Pattyn [My Articles] The Windows 11 taskbar is a disgrace; a third-party add-on is needed to reverse the deterioration. I decline such a downgrade.
  • Tables not appearing as classes

    database csharp sql-server visual-studio
    5
    0 Votes
    5 Posts
    48 Views
    R
    Downloads: Generic Database Access[^] This a HUGE Codeproject article which, from the looks of things (quick scroll through the .zip content), is likely to give out many C# programming secrets wrt SQL Server (even) with no further sacrifice of time searching on your part. Generic Database Access[^]
  • 0 Votes
    7 Posts
    52 Views
    F
    I found the answer: It's a known issue in Edge version 126. The fix has been included in Stable 126.0.2592.81, which had been released on June 27, 2024. Please install the latest Edge Stable version 126.0.2592.81 (Official build) and test again.
  • Why to buy best Social Media Marketing

    com sales lounge
    1
    0 Votes
    1 Posts
    11 Views
    No one has replied
  • 0 Votes
    1 Posts
    10 Views
    No one has replied