Click here to Skip to main content
15,893,622 members
Everything / Desktop Programming

Desktop Programming

desktop

Great Reads

by Graeme_Grant
This article comprehensively covers the Microsoft ClickOnce Installer with a bare bones WinForm/WPF C#/VB Silent Updater framework plus covers how to implement, troubleshoot, test locally, to release.
by Michael Haephrati
Desktop application that can be used to convert from and to various audio formats, such as .mp3, .m4a and .wav
by Member 9913858
An introduction to using FakeModel to create test aata for you.
by Harry Truman
Screencasting (demo screen, screensharing) already works in Google Chrome. The technology allows capturing a window of the browser itself as well as windows of other applicaitons. For example, you can capture Firefox running in a separate window.

Latest Articles

by Graeme_Grant
This article comprehensively covers the Microsoft ClickOnce Installer with a bare bones WinForm/WPF C#/VB Silent Updater framework plus covers how to implement, troubleshoot, test locally, to release.
by Kai Schtrom
How to use DSE-Patcher to disable Driver Signature Enforcement
by Michael Sydney Balloni
A .NET client-server application for sending files over a network
by Aleh Baradzenka
In this article, you will learn about an adjustable control that has zooming and scrolling tabs, dragging with the mouse, custom drawing and much more.

All Articles

Sort by Updated

Desktop Programming 

29 Feb 2024 by _Asif_
As explained by @Dave you need to identify all child windows of a parent window, once you get child window handle you can send message to get them minimize. You can get a working sample from how can i get the child windows of a window given its...
29 Feb 2024 by Dave Kreskowiak
Look in Task Manager, on the Details tab, and you'll find that no matter how many Notepad WINDOWS you have open, there is only ever one instance of Notepad.exe, and only ever one "MainWindowHandle." On Windows 10, there will be one instance of...
29 Feb 2024 by pankajgarg1986
I am working on C# code which minimize all open instances of Notepad. This code works fine on Windows 10, but when I run the same exe with administrator privilege, it minimize only one instance of Notepad (out of open 3..). My code for this is...
22 Dec 2023 by Member 16168754
There are a few different ways to get the IMEI of a smartphone connected via USB on a desktop. One way is to use the ADB command line tool. To do this, you will need to install the Android Debug Bridge (ADB) on your computer. Once you have ADB...
10 Dec 2023 by Dave Kreskowiak
You cannot run an executable from anything other than an actual file on disk.
9 Dec 2023 by Wael Abed
Hi all I want to run an exe file in Memorystream Knowing that I use .net core 6 chromedriver When I'm working, I try to use the following code What I have tried: if (fileZip.Count()== index) { ...
2 Oct 2023 by Devendra Sarang
I am trying to fetch Data from API with Key. I am trying to fetch in Windows Forms application. I am able to fetch the data but when I try to display that data in datagridview, it shows an error message like: Cannot deserialize the current...
2 Oct 2023 by Solution Hall
I built a real-time ERP software for a client that has been running since the last 3 years. The front end of the project is a Windows Forms desktop application built in VB.NET (in Visual Studio 2017). And the back-end is in MS SQL Server 2016. ...
29 Sep 2023 by OriginalGriff
It really depends now how you wrote the original application - if it's organised as separate modules: Presentation Layer, Business Layer, and Data Layer as separate Assemblies for example then it should be pretty simple to just respecify the PL...
26 Sep 2023 by Graeme_Grant
To expand on what others have said, there are tools out there that can help you generate the classes from the JSON for you. My go to is: JSON Utils: Generate C#, VB.Net, SQL TAble and Java from JSON[^] Here is a sample of classes generated: ...
26 Sep 2023 by George Swan
You need to have suitable classes to deserialize the Json into. Something along these lines. public class Movie { public string? Title { get; set; } public int Year { get; set; } public...
26 Sep 2023 by OriginalGriff
Your MovieNew class does not match the JSON. If I convert the "display" string to a genuine JSON string:{"movie_results":[{"title":"Hum Tum and Them","year":2019,"imdb_id":"tt10045256"}, {"title":"Hum Tum Aur...
6 Aug 2023 by Graeme_Grant
InvokeRequired (Microsoft Learn)[^] is only required if calling from another thread other than the main UI thread. So what you need to do is work out why the first time you're on a different thread and the second why you are on the main thread....
6 Aug 2023 by Bhavin Pokiya
I have created windows forms application with target framework 4.7.2. I am doing USB communication with device. I have 4 buttons on UI from which 2 button enable(connect and disconnect) and 2 disabled(download data and download log), when I click...
6 Aug 2023 by OriginalGriff
If you look at the Reference Source for Control.InvokeRequired:Reference Source[^] it shows you the code: public bool InvokeRequired { get { using (new MultithreadSafeCallScope()) { ...
19 Jun 2023 by Member 16032850
so I want to make a winform app that scans a barcode and a countdown of 2h starts once the barecode is scanned any help? What I have tried: this my first time working with barcode so I don't know what to do
19 Jun 2023 by OriginalGriff
Most barcode readers come preconfigured to act as a keyboard: you scan the code and to your app it looks exactly like the user typed the number in. That's probably not helpful to you! However, most scanners can also be configured to provide...
12 Apr 2023 by sahil ajmeri 2022
I am working on project project that do some process on live video of camera using ICImagingControl in c# .net Framework 4.5, i am recieving video and i want to do some image processing like Line detection. i have the function which is used for...
9 Jan 2023 by Graeme_Grant
This article comprehensively covers the Microsoft ClickOnce Installer with a bare bones WinForm/WPF C#/VB Silent Updater framework plus covers how to implement, troubleshoot, test locally, to release.
28 Nov 2022 by Kai Schtrom
How to use DSE-Patcher to disable Driver Signature Enforcement
25 Oct 2022 by DoingWork
I am using Consuming Nouget Package VirtualDesktop in my desktop application. When I call VirtualDesktop.IsSupported then it returns True. But When I call VirtualDesktop.IsPinned(handle) it returns following exception. Exception:Empty...
22 Oct 2022 by Graeme_Grant
THis error message explains what is happening: Exception:Empty path name is not legal. (Parameter 'path') It is expecting a value, not an empty path
24 Sep 2022 by DoingWork
Dear Fellows How to check .net 6.x.x version installed or not by Registry ? for both x86 and 64 bit OS. What I have tried: I found 2 registry values by google but their exists multiple on different PCs. So I want to handle all registry keys...
24 Sep 2022 by RickZeeland
The registry location seems to change per update as a user commented here: Correct approach to Check for .NET 6 installation - Microsoft Q&A[^] Quote: ...
24 Sep 2022 by Gerry Schmitz
Quote: The version of .NET Framework (4.5 and later) installed on a machine is listed in the registry at HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\NET Framework Setup\NDP\v4\Full. If the Full subkey is missing, then .NET Framework 4.5 or above isn't...
18 Sep 2022 by Member 13698531
Hello guys I have project which have 4 page asp.net web application. I want Convert this web application into desktop application(Wizard form).Please Help me out to make this web application into installation form. Advance Thanks What I...
18 Sep 2022 by Win32nipuh
You can try 1. GitHub - nativefier/nativefier: Make any web page a desktop application[^] it converts web site to app.exe but: it seems the site should be responsible in the time you run the app. I waited: I convert a web app to app.exe and...
12 Sep 2022 by Michael Sydney Balloni
A .NET client-server application for sending files over a network
7 Sep 2022 by Gcobani Mkontwana
I a new to WPF but so far managed to create a status bar, but i want to create a grid with columns. I want to create this logic to it; // Requirement that must implement. 0 I need some help, I have status bar but want to implement following...
7 Sep 2022 by Maciej Los
Start here: How to: Create a Grid Element - WPF .NET Framework | Microsoft Docs[^]
5 Sep 2022 by NSIS 2022
Hello guys, How to hide or remove following row if cell value meet the condition. Exaple Column1 Column2 Column3 A. 1 H H. 7 g L. 9 f ...
5 Sep 2022 by George Swan
I am not sure how you are binding your data table to the view, but here are a couple of suggestions that may be useful. If it is permissable to exclude the row where Column2 is equal to 7, you can use TakeWhile. IEnumerable query=...
4 Sep 2022 by Maciej Los
First of all - you can fetch into a datatable object only the data you want to get, by filtering a database in a query: SELECT ... FROM ... WHERE Column2 7; Second - you can filter datatable object: DataTable.Select Method (System.Data) |...
15 Aug 2022 by Member 11291660
I have one desktop application (c#). The database is mssql which is located in another system. It is working fine. Now i am curious about whether could i move the database to some webserver. I am not sure this question makes sense. Need some...
14 Aug 2022 by OriginalGriff
That's not a question we can answer, or at least not directly. It is possible - it's called "remote access" but it has to be enabled by the hosting service, and that's not too common because it's a huge security risk - you open up the whole DB...
27 Jun 2022 by Member 15689284
I have a C# Desktop Application. when i make release its generated with setup file. and i always need to setup the app first. and i don't need that step.any help ? What I have tried: all ways i've tried generate setup.exe file
27 Jun 2022 by OriginalGriff
To add to what Richard has said, the biggest problem may be your selection of .NET framework: Windows since Vista has included a version of the .NET framework, but if you have built your app to run with a later version than the OS default, you...
27 Jun 2022 by Richard Deeming
If the user has already installed all of the prerequisites, then you can just copy the compiled executable and its supporting files to a folder on the target computer and run it. If not, then you either have to provide a setup file, or you have...
29 May 2022 by ahmedbelal
System.NullReferenceException HResult=0x80004003 Message=Object reference not set to an instance of an object. when add new customer i want to make pictureBox accepted Null Error Here byte[] img; MemoryStream ms1; ms1 = new...
29 May 2022 by OriginalGriff
This is one of the most common problems we get asked, and it's also the one we are least equipped to answer, but you are most equipped to answer yourself. Let me just explain what the error means: You have tried to use a variable, property, or a...
6 Apr 2022 by OriginalGriff
Look at the Show_Customer_Image method, and see what it returns. That'll help you work out what the Row[0][0] cell is, and if it's actually a byte array. Use the debugger - it lets you look at the data while your code is running. Hint: it isn't....
6 Apr 2022 by Dave Kreskowiak
Reposting the same question will not change the answers, nor absolve you from actually thinking about what your code is doing. There is only one place in that line of code where you're converting something to an integer, then you're casting that...
27 Mar 2022 by Subhan Malik 2022
A network-related or instance-specific error occurred while establishing a connection to SQL Server What I have tried: i also using crystal report (32-bit,64-bit)according to client computer and also install sql server management studio...
27 Mar 2022 by Paul Denton 2022
This article has. Good troubleshooting guide, with pictures Resolving could not open a connection to SQL Server errors[^]
27 Mar 2022 by Paul Denton 2022
As Griff suggested, put the connections string in a file, or as a defualt on your inteface. If you test the Crystal report on the same machine as the server and it works, but gives you an error when you run the report from another machine, there...
24 Mar 2022 by OriginalGriff
The connection string that you use for development is unlikely to work in production - in fact it definitely should not work as developing software against the production database is a good way to learn "I really should have a better backup...
16 Mar 2022 by ahmedbelal
i need to Edit row in database from DataGrid View the Problem is i need solution for System.FormatException: 'The string was not recognized as a valid DateTime. There is an unknown word starting at index 0.' i click f10 and compiler work my...
16 Mar 2022 by Maciej Los
If f_Patient.dateTimeNOW is a DateTimePicker Control[^], you need to pass proper date/time value instead of string! So, this is wrong: f_Patient.dateTimeNOW.Text = this.DGV.CurrentRow.Cells[7].Value.ToString(); try: f_Patient.dateTimeNOW.Value...
16 Mar 2022 by OriginalGriff
We can't help - we have no idea what part of that is working on what value. All we - and presumably you - know is that something is trying to parse a string to a DateTime value, and it's probably the dateTimeNOW.Text property assignment. And we...
10 Mar 2022 by tim_c
Little background, my main experience has been vb.net/winforms and I've recently moved to c# and winui3 (desktop) and been banging my head to understand things. I've been going through a book called 'Learn WinUI 3.0' which has helped but isn't...
11 Feb 2022 by DoingWork
I want to start 2 applications with one shortcut. One application is GUI based while other is shell based (Terminal=true in .desktop file). What I have tried: For this goal, I created a file name **Starter** having following script in this...
11 Jan 2022 by Member 12187876
I want to develop a screen sharing application application in WPF, Please help me out and give me proper link and sample projects in WPF,C# only. Thanx in Advance... What I have tried: Basically, the connectivity software should be able to do...
11 Jan 2022 by Richard MacCutchan
This is not something that you can write in an afternoon. There are many issues that you need to understand before you can create such a project. Take a look at RealVNC® - Remote access software for desktop and mobile | RealVNC[^] to get a better...
11 Jan 2022 by OriginalGriff
While we are more than willing to help those that are stuck, that doesn't mean that we are here to do it all for you! We can't do all the work, you are either getting paid for this, or it's part of your grades and it wouldn't be at all fair for...
9 Jan 2022 by DoingWork
Dear All I am beginner in Asp.net and ElectronJs. What I have tried: I made a login page in Asp.net. When opened in Web browser, then Password visibility eye icon is available. It is Ok behavior. But when I run it as Desktop application using...
24 Sep 2021 by User_Awais
The company I work for has grown a lot in the past few years. And so has their data. All of our accounts databases are Excel files used as databases for everything along with reports that are generated off of them. It has become increasingly...
24 Sep 2021 by Patrice T
Quote: I have some programming background albeit very limited but keen nonetheless. What you describe is not a task for beginner, it is for experienced professional. There is no way you can get the necessary experience from this little textbox. ...
24 Sep 2021 by RickZeeland
I agree with Richard that you probably need a development team for this. You can find some options for cross-platform development here: Slant-cross-platform[^] And also see: ...
3 Sep 2021 by Richard Deeming
Read the error message again. Your byte array is called fileBytes, but you are trying to write an uninitalized field called byteArr into the file. Your code can be simplified to: using System; using System.IO; internal static class Program { ...
3 Sep 2021 by Nisrja
I wanted to convert a binary file to a byte array and save the output to a text file My code appears below: using System; using System.IO; namespace WindowsFormsApp9 { internal static partial class Program { [STAThread] private...
28 Aug 2021 by Richard MacCutchan
string start = comboBox1.SelectedItem.ToString(); // you get the selected combobox item System.Diagnostics.Process.Start(@"C:\Users\Ronit\Pictures"); // but you always start this hardcoded one If you wish to start the filename that you have...
27 Aug 2021 by OriginalGriff
Quote: BUT I DONT KNOW HOW AND I DONT NEED TO LEARN IT I JUST NEED A SIMPLE CODE WHY YOU GUYS CANT HELP ME EVERYONE ON EVERY PLACE SAY IT AGAIN AND DOSENT HELP Well ... probably because you haven't tried, and don't want to learn: you just want...
13 Jul 2021 by Member 14770565
I had develop windows file watcher service to launch UI (as user give file print from menu) using createuserprocess winapi. It works fine for single user. For multi user this UI get launch in wrong user's session. So I need launch UI in...
13 Jul 2021 by Dave Kreskowiak
Save yourself the pain of this not working at all in future versions of Windows and create a small application that launches on user login. This app can "register" itself with the service application, receiving notification from it and launching...
27 May 2021 by slex1one-Musdy
Can i style the python desktop app ? (e.g like CSS) What I have tried: I found a library named "Eel". But i am not sure if it works for app.
27 May 2021 by Richard MacCutchan
The only way to find out is by reading the Eel documentation. Python is a simple 'scripting' language and has no standard features to create GUI applications. There are various libraries available that may offer what you want: Graphic User...
25 Mar 2021 by Aleh Baradzenka
In this article, you will learn about an adjustable control that has zooming and scrolling tabs, dragging with the mouse, custom drawing and much more.
16 Mar 2021 by Aleh Baradzenka
This control is another kind of tab. Tabs are displayed as horizontal stripes and can be collapsed into buttons. Each tab is assigned its own window, which is shown when you click on the tab.
16 Mar 2021 by Aleh Baradzenka
In this article, you will learn about a control that is necessary for the partition of the dialog, main or child window of your program by several parts.
13 Feb 2021 by RickZeeland
That could be a problem with EnumDisplaySettings() and lpszDeviceName. Maybe this will help: windows - C# EnumDisplaySettings not working for lpszDeviceName - Stack Overflow[^] Otherwise try this: c# - Keep track of screen change and screen...
5 Feb 2021 by Member 1329249
Hi, I currently have a program that will get each connected monitor location, once i get the location I atach a windows media player object to the desktop handle for each monitor, the problem is the locations are wrong. 1 Monitor returns X:0 Y:...
22 Jan 2021 by DoingWork
Dear Friends I want to implement UI control based Access Rights in WPF. My application has different level of Users i.e. Manager, Purchaser, Seller etc. I want to give access to PurchaseForm only to Purchaser and SaleForm to Seller. Please...
22 Jan 2021 by Gerry Schmitz
WPF: Implementing Custom Authentication And Authorization - TechNet Articles - United States (English) - TechNet Wiki[^]
11 Nov 2020 by Member 2362679
Good afternoon, My apologies if this is the wrong forum to help. If there is a better forum, I would appreciate being redirected. I am a programmer from decades ago (VMS mainframes & Unix). I am looking to transition a small MS Access database...
11 Nov 2020 by Richard MacCutchan
You would be better using C# as .NET supports OLEDB which allows you to use MSAccess quite easily. I have not tried it with C++ but see Developing Access 2007 Solutions with Native C or C++ | Microsoft Docs[^]. That is written for VS 2007 and the...
11 Nov 2020 by RickZeeland
This will probably spoil the fun of doing it yourself, but take a look at: microsoft-access-alternatives~symphytum[^]
11 Nov 2020 by Rick York
This series of articles might help : Using C++ to Simplify the Extensible Storage Engine (ESE) API - Part 1[^]
2 Sep 2020 by dsjohn
I have been assigned a “legacy” .Net 3.5 C# “desktop” application. I have limited C#/.Net 3.5 experience. The users of the “desktop” application want the load of a specific Windows form to have better performance. On load, the form reads into a...
2 Sep 2020 by F-ES Sitecore
using System.Data; namespace MyNamespace { public sealed class MyData { private static readonly MyData instance = new MyData(); private DataTable data; public DataTable Data { get ...
1 Sep 2020 by Dave Kreskowiak
Caching really isn't going to help much with that problem. First, loading all the records doesn't scale well, even if you cache the result. You're just transferring more and more data all in one block. The problem you have is that you're...
1 Sep 2020 by Afzaal Ahmad Zeeshan
Recommendation is to never get your hands dirty for such performance-oriented parts of your application unless you have a solid experience/understanding. Oh, before I start the answer, I should suggest that migrating the code to .NET Framework 4...
16 Aug 2020 by Michael Haephrati
Desktop application that can be used to convert from and to various audio formats, such as .mp3, .m4a and .wav
8 Aug 2020 by OwenDavies
Installing a desktop environment and setting up RDP to allow us to connect to our Virtual Machine
30 Jul 2020 by DiponRoy
Making schedule jobs exe using Quartz scheduler
20 Jun 2020 by Just Perfection
In this article, you will learn about the GNOME Shell extension basics, schema, gettext and more.
4 Jun 2020 by RickZeeland
This tool probably comes closest to what you want: way-to-lock-down-a-windows-pc~frontface-lockdown-tool[^]
4 Jun 2020 by Rojik
Basically, I have an idea for an app and want to know if you can create an app that's embedded into windows and can't be uninstalled. And how would you go about doing it? What I have tried: Tried googling, couldn't find anything / don't know...
3 Jun 2020 by Dave Kreskowiak
Considering you can even uninstall Windows itself, no there isn't. Think about what you're asking in the world where viruses and malware run rampant and then think of what would happen if those apps found a way to do what you want. THAT is why...
27 May 2020 by Garth J Lancaster
Pretty sure you asked the same thing recently .. this post Q: How do I authenticate with an OAUTH2 access token? · Issue #606 · jstedfast/MailKit · GitHub[^] points out that await credential.RefreshTokenAsync(CancellationToken.None); seems to...
27 May 2020 by Grupo Microsistemas
Hello, i have an app that send emails correctly, the problem is later that day a error shows up saying "Authentication Error code:334". I think that i need to refresh the token or maybe gmail smtp have a limit for free emails. What I have tried:...
23 May 2020 by Member 14729532
im tried to make purchase form in visual studio desktop application using C# code. i tried this code to save textbox values, datetime, and datagrideview colums value to database table and i check table and query its same but i got "number of...
23 May 2020 by Maciej Los
The error message "number of query values and destination fields are not same" is quite easy to detect and repair... All you have to do is to define the number of fields in which you want to insert data: INSERT INTO purchase (field1, field2,...
21 May 2020 by Patrice T
Quote: How to solve error number of query values and destination fields are not the same. In C# windows application Rather simple: count number of values in query, count number of fields in table, there should be a surprise. After that, you need...
20 May 2020 by Grupo Microsistemas
I´m trying to send a email using Oauth2, but i´m getting a error when i authenticate my user. This is the error "An unhandled exception of type 'MailKit.Security.AuthenticationException' occurred in mscorlib.dll Additional information: 334:...
20 May 2020 by MadMyche
I would recommend that you read through the following page and verify that you have everything set up correctly; sounds like the MailKit sample code may not be the same as Google provides MailKit Issue #962: AuthenticationException 334[^] It...
20 May 2020 by Garth J Lancaster
The 334 indicates an authentication error of some kind - I'd have expected extra information in the response alluding to the exact problem
13 Apr 2020 by OriginalGriff
Don't bother, unless it's been designing in a sensible way: PL, BL, and DL. The problem is that web apps rely on two things: a server and a client - and the client software is all in HTML (for the basic display description) and JavaScript (for...
13 Apr 2020 by Richard MacCutchan
There are too many differences between webforms and windows forms for a simple conversion. You will need to create the desktop app from scratch based in the design of your web project.
18 Mar 2020 by vijay anjur
Hi: I posted a question for the ListView control on Feb 18, 2020. For some reason it does appear amond the questions in the ListView control page. What did I miss? The question was under heading - APIsEnums.WindowMessages.PAINT message is not...