Category "c++sharp"

Keeping window visible through "Show Desktop"/Win+D

I'm creating a desktop gadget, and am running into problems. The window will be hidden by the "Show Desktop" command - STOP, I know what you're thinking and don

Remove objects with a duplicate property from List

I have a List of objects in C#. All of the objects contain a property ID. There are several objects that have the same ID property. How can I trim the List

Get MD5 checksum of Byte Arrays' conent in C#

I wrote a script in Python which gives me an MD5 checksum for a byte array's content. strz = xor(dataByteArray, key) m = hashlib.md5() m.update(strz) I can t

ShowBalloonTip Not Working

On Windows 10, the ShowBalloonTip method of NotifyIcon NEVER shows the balloon tip. This would appear to have something to do with Windows itself. If I go to S

ListView SelectedItem not highlighted when set in ViewModel

I have a ListView with a ItemSource data binding and a SelectedItem data binding. The ListView is populated with a new ItemSource every time I press the Next o

Check if Key Exists in NameValueCollection

Is there a quick and simple way to check if a key exists in a NameValueCollection without looping through it? Looking for something like Dictionary.ContainsKey

HTTP Error 404.15 -Not Found

The request filtering module is configured to deny a request where the query string is too long. I am having above error, and I have been trying almost everyth

White blob detection

I'm trying to use AForge.NET to detect a thick white line across an Image. It's like pipe that I get and is my desired result after applying a Threshold filter

How to access ASP.NET Core web server from another device

I created a project using C# and ASP.NET Core empty and it worked on localhost - how can I access it from another device using the IP of the computer running th

C# How to fire routine by Quartz.net every day at specific time of day

i am not before dev pc but i got a code which seems like work. private void QuartzTest_Load(object sender, EventArgs e) { // construct a scheduler factory

Are fluent interfaces a violation of the Command Query Separation Principle?

I started writing a fluent interface and took a look at an older piece Martin Fowler wrote on fluent interfaces (which I didn't realize he and Eric Evans coined

Guid.NewGuid() is returning duplicate values when used in a Parallel.For loop

I have an application that is hitting an API. As such, it does a query for all ID's in the object, and then has to query each item one at a time per ID. I'm d

Cannot load JPG image Pdfium

I try to do some stuff with PDF for a project. I'm trying to do some interop with Pdfium: https://pdfium.googlesource.com/pdfium/. I want to convert a JPG image

I need something in c# which work like the setw() in c++

I am using a richTextBox in c#. I need to display strings of different length inside one richTextBox but these strings should be perfectly aligned.. this is an

Selenium WebDriver new tab and Navigate

Based on this post, I managed to open a new tab, but when I try to navigate in the new tab, the navigation occurs in the old tab. I saw that I should use this:

How can I pass a String as a model to a View in MVC 5?

I have an action defined like this: public ActionResult TempOutput(string model) { return View(model); } And also, I have its view define

Where to store db passwords when using Windows .NET or ASP.NET applications

I have a scenario that has been troubling me for years. If you have to connect to a database or other service (like a web service) using a username and password

Cannot Write Multiple Paragraph in Aspose

I have an issue when I try to write multiple paragraphs in existing Shape. Only the first paragraph is written. I debug the code and I found that the Shape obje

C# Console Application: Is there a way to detect whether the exe was run from a command line or not?

If I run my Program.exe from an existing command line window, then when it finishes and exits, the Console Output is still there and viewable. If I just double

TextFieldParser ignoring header row C#

Reading in CSV files and the TextFieldParser skips the header row. Any idea how to make certain the first row is skipped. String[] Col3Value = new string[40];