Click here to Skip to main content
15,888,977 members
Everything / Forms

Forms

forms

Great Reads

by Member 4206974
FormGen, a JavaScript Form Generator
by Cristian Moldovan
jQuery unobtrusive validation plugin with Twitter Bootstrap 3 showing error messages as tooltips
by Jean Carlo S. Passos
CRUD over Association Entity that maps to association tables
by SREENATH GANGA
Auto updating the exe if the latest exe is available in the network share

Latest Articles

by Member 4206974
FormGen, a JavaScript Form Generator
by Ev Uklad
Developing applications based on Flows, Forms, and Rules using type-safe advantages of C#
by Ev Uklad
Developing applications based on Flows, Forms, and Rules using type-safe advantages of C#
by Ev Uklad
Developing applications based on Flows, Forms, and Rules using type-safe advantages of C#

All Articles

Sort by Updated

Forms 

8 Mar 2024 by Andre Oosthuizen
Your first issue is happening with this code - return pc.ValidateCredentials(username, password); No credentials were found, returning a 'NULL' value. The second part then, based on the NULL value is - // Redirect to login if username is...
8 Mar 2024 by Gcobani Mkontwana
Hi Team I need some help, current issue my web form username is null. I think what i want to achieve, we are using our own domain server. My approach want this web app to be able to authenticate me as a user and be redirected to dashboard. For...
3 Feb 2024 by Graeme_Grant
Why Xamarin forms? It's discontinued and support will end on May 1, 2024. ref: Xamarin official support policy | .NET[^] You are best to move to .Net MAUI, the replacement for Xamarin Forms. - Build your first .NET MAUI app - .NET MAUI |...
3 Feb 2024 by Member 13379347
Need help with an advanced feature development in xamarin forms. I am developing a mobile application in xamarin forms. In the app, user can securely save his personal info like first name, last name, address etc. in securestorage. Now, if user...
15 Jan 2024 by Member 4206974
FormGen, a JavaScript Form Generator
9 Jan 2024 by M Imran Ansari
In addition of Solution-1, the Winform Datagridview lacks direct support for adding a footer. An alternative approach involves creating a custom user control featuring two grids, with the lower grid for displaying the summary or incorporating...
8 Jan 2024 by Richard MacCutchan
Sorry, but this site does not provide code to order. You should start investigating the standard DatagridView to see how you can use it as a base for your own custom control. You might also go to the CodeProject Articles Section[^] to see if...
8 Jan 2024 by Zeyad Jalil
We need a free datagridview support summaries and footers for a small C# windows forms applications. Please help us ASAP. Thank You What I have tried: I tried to use the .net datagridview but it is not support the footer and summaries.
13 Dec 2023 by Inczu
Hello guys and ladies I want to create a code that will add all my local users from Items from listbox public void ExistUserList_SelectedIndexChanged(object sender, EventArgs e) while added local users are in private void LoadLocalUsers() to...
11 Dec 2023 by Deborah Lorraine
This worked to allow either a whole number alone or a number with ".5" to indicate a half point: ^([1-9]?[0-9])(\.[\.5])?$
1 Dec 2023 by Inczu
Hello, I want to create a research for my listbox. I have created listbox called: public void ExistUserList_SelectedIndexChanged(object sender, EventArgs e) and a code that will write in a textbox private void AllText2_TextChanged(object...
20 Nov 2023 by Graeme_Grant
If you use data binding with the ListBox to a List, you don't need to access the ListBox to access the collection. The ListBox becomes a 'view' to the data. This means that you can access the collection of data directly. You can read more on how...
20 Nov 2023 by Ralf Meier
you haven't answered my question - but independant here is an answer for you : Dim l As Integer = ListBox1.Items.Count Dim myEntry as string = ListBox1.Items(l-1) this gives you the last Entry from your Listbox. to get any else you...
20 Nov 2023 by Member 12602897
I have a listbox on my form and I add entries to it throughout the program. Normally the listbox Visible property is set to FALSE. When it is FALSE the SELECTITEDITEM only returns the first entry. When I change it to TRUE I am able in my program...
14 Nov 2023 by Inczu
I have a admin account in Windows Forms. I have a code that create a account to the lusrmgr but the problem is when I want to write username before creating a account, I will always have a username called NowyUzytkownik (in polish language it's:...
6 Nov 2023 by Member 13800132
I have two projects that I need to link together if possible. I've got a C# Windows Form that runs a load of functions. I also have an ASP.NET web page which gives some similar functionalities via a web page. At the moment, they are separate....
5 Nov 2023 by Graeme_Grant
If you want to include a web project within a WinForms application, then traditionally that is not possible, as pointed out by Dave. What you can do is use a WebBrowser control pointed at your website. However, it is possible to create a Hybrid...
5 Nov 2023 by Dave Kreskowiak
You don't host the web service in a Windows Forms app. The normal way to do this would be to have all the functionality exposed and processed by the web service and just rewrite your Forms app to pass data to and call the web service. Or is...
4 Nov 2023 by Inczu
I want to create a code without admin license when I select a username from a Items listbox: private void ExistUserList_SelectedIndexChanged(object sender, EventArgs e) Then the code must search the same username in lusrmgr.msc and put the...
4 Nov 2023 by Inczu
I want to create a code using netuser function that will search by clicking on the button: private void NextForm3_Click(object sender, EventArgs e) if the user by selecting an Item from listbox. private void...
3 Nov 2023 by Dave Kreskowiak
Like Richard already said, I told you how to validate credentials against the machines local account database that does not use shelling out to "NET USE". It is not called "in Windows services". That phrase means something completely different...
1 Nov 2023 by Inczu
I want to create a timer when user picks an Item from listbox: private void ExistUserList_SelectedIndexChanged (object sender, EventArgs e) Then write down the wrong password in textbox: private void FirstPassword_TextChanged (object sender,...
30 Oct 2023 by Dave Kreskowiak
An "admin license," whatever that is, has nothing to do with this. You're completely misunderstanding the Windows security system and directory. You cannot check an entered password against what you perceive to be a plain text password in the...
30 Oct 2023 by Richard Deeming
You can't. Windows does not store user passwords using a reversible encryption. Passwords technical overview | Microsoft Learn[^]: For use in Windows networking, including Active Directory domains, the password is stored two different ways by...
19 Oct 2023 by Inczu
When I want to click on back button private void Back_Click(object sender, EventArgs e) in Form2.cs, I want to create a code that will remember data in textboxes: private void CompanyText_TextChanged(object sender, EventArgs e) , private void...
18 Oct 2023 by Richard MacCutchan
Take a look at the three tips starting with Transferring information between two forms, Part 1: Parent to Child[^], by the esteemed OriginalGriff.
18 Oct 2023 by Dave Kreskowiak
private void Back_Click(object sender, EventArgs e) { Form1 back1 = new Form1(); back1.Show(); this.Hide(); } Assuming this is the code that's called when you click the back button in your app, your code is creating a new instance of...
3 Oct 2023 by OriginalGriff
First off, you don't need to store the same password twice, if that's what you are planning: compare them when he registers to make sure they are the same, but if they are you don't need both ever again - just the one copy. Second, it is your...
3 Oct 2023 by Inczu
I want to create a code in VS2017 Windows Forms that will add users to SQL Server automatically: id, username, first password, second password (repeated password) in database SQL Server Management Studio. That's my code in Form1: using System;...
19 Sep 2023 by Inczu
When I created Form2.cs, I added two radio buttons private void UserExistRadioButton_CheckedChanged(object sender, EventArgs e) and private void UserNotExistRadioButton_CheckedChanged(object sender, EventArgs e), my button private void...
19 Sep 2023 by Richard MacCutchan
if(UserExistRadioButton.Checke...
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()) { ...
21 Jun 2023 by diggudg
I want to use DropdownList in form view in asp.net web application to insert data from list to database. I tried using Please any body can give me code for this to insert data from dropddownlist to database using formview or by manualThanks
15 Jun 2023 by RobertoSky
With ".ani" being animated in the form. I want to make browsing in folders and seeing their contents of cur and ani. I just want the way to display cur and ani files. What I have tried: pictureBox1.ImageLocation=@"D:\cur1.cur"; it shows me...
15 Jun 2023 by OriginalGriff
As Richard has said, .CUR files are cursors: they are the various shapes the mouse pointer can have; and .ANI files are the animated version (spinners and so on). There is no standard control that can display either of these - you will probably...
29 May 2023 by Flo_89
Hello :)For testing purposes I created a C# ConsoleLine application. Now I want to do a GUI and so I choose Project --> Add component and added a "Windows Forms" element. But although there is no Console.WriteLine or something left he always opens the Console and he does not show my Windows...
26 Apr 2023 by Patrick Skelton
I have a Xamarin.Forms application that has a requirement that I would have thought straightforward for the new Shell but is causing no end of problems. I have some 'top-level' pages that can be freely navigated between using a TabBar. One of...
25 Apr 2023 by Gcobani Mkontwana
Hi Team I have an issue when i submit my form, the client side often shows something went wrong, while debugging there are no errors both jquery part and php. console.log i do see the inserted data. How do i clear the inserted data from the form...
23 Mar 2023 by faizy001
i want to create a app where i can create a money wallet, QR code for payment. how to create please give me some link for reading What I have tried: i want to create a app where i can create a money wallet, QR code for payment. how to create...
23 Mar 2023 by Richard MacCutchan
https://developer.paypal.com/h...
23 Mar 2023 by Dave Kreskowiak
There isn't going to be any one or two links to read to do this. If you don't know how to do this before you even start, you're not ready to take on such a project. I'm serious here. If you don't know THE LEGAL RAMIFICATIONS OF GETTING IT WRONG,...
23 Mar 2023 by OriginalGriff
A couple of things before you start ... 1) Never, ever, accept code from a insecure website to handle anything to do with real money. You do not know who is giving you the code, you do not know what it does, you do not know that it places the...
16 Mar 2023 by Relmon
Hello I am a student and we are getting online lessons. Teachers provide us 6 digit number codes so we can enter them to a mobile application to check we are absence in the lesson. What I want to do is when a teacher or student writes 6 digit...
16 Mar 2023 by OriginalGriff
So let me see if I understand you ... your teachers want to be sure that you are actually present in a lesson and not sleeping at your computer or goofing off playing games when you should be learning, and you need our help to cheat the system so...
8 Mar 2023 by Member 9832225
I am trying to change the Backcolor and style of the datagridview scrollbars control of windows form with below line this.dataGridView_Constants.Controls[1].BackColor = Color.Red It's not working. Is there any solution available for it ,Either...
8 Mar 2023 by Member 9832225
As part of applying the new themes for windows controls, I need to apply new colors to the scrollbars vertical scrollbar and horizontal scrollbars Is there anyway ??
6 Mar 2023 by OriginalGriff
As far as I know, you can't change the system provided scrollbars for your application - and for good reason. Users "know" what scrollbars look like, and how to use them so significant changes could make apps harder to user. This may help: How...
6 Mar 2023 by Gcobani Mkontwana
Hi Team How can write a form table when the instructions are as follows; "Once the submit button is pressed, the information should be displayed in a list below (automatically sorted by last name) along with all the previous information that...
4 Mar 2023 by Gcobani Mkontwana
Hi Team I have a problem with my jquery form, i am using jquery validation plugin and all libraries are imported from the form right. But now the form before a user insert data its not validation before submit and when inspect the element its...
4 Mar 2023 by Gcobani Mkontwana
Hi Team I have managed to do the following after debugging the steps back, i forgot to put the document before the function because i am using jquery validator plugin not javascript itself. DOM element by rule does not support that rule. /** ...
1 Mar 2023 by faizy001
Hi friend i have a object for the list var objlist = JsonConvert.DeserializeObject(Result); which is coming from the API and i want to display into a ListView. if single item of a list is coming properly but i...
1 Mar 2023 by OriginalGriff
Use teh collection as the DataSource for a data-aware grid based control - the Xamarin.Forms Grid - Xamarin | Microsoft Learn[^] for example.
25 Feb 2023 by Meer Wajeed Ali
An unhandled exception occurred during the execution of the current form. Please review the stack trace for more information about the error and where it originated in the codePlease suggest me.What I have tried:I tried with below code.private void btnSave_Click(object sender,...
7 Feb 2023 by faizy001
Hi i am working a LocalDb Application in Xamarin Form. My Requirement is to save Data Locally using SQLite DB. i have created successfully Save interface and method. Data is coming from the xamarin forms successfully but only one data is storing...
7 Feb 2023 by Richard MacCutchan
According to the code you have posted, obj is not a list but a simple object. If you mean that you want to save each member of the object into a separate field of the database, then you need to redesign your table to accomodate all the different...
6 Feb 2023 by Ev Uklad
Developing applications based on Flows, Forms, and Rules using type-safe advantages of C#
3 Feb 2023 by Ev Uklad
Developing applications based on Flows, Forms, and Rules using type-safe advantages of C#
29 Jan 2023 by Ev Uklad
Developing applications based on Flows, Forms, and Rules using type-safe advantages of C#
22 Nov 2022 by faizy001
hi i am working on xamarin forms application. my requirement are Track all data from mobile application like User login location and Menu clicked by User with timestamp. Create a Common function to save track details UserName Location Lat Lang...
17 Nov 2022 by faizy001
hi friends please help me i am creating toolbar menu item in Xamarin forms. i have written codes MVVM. my problem is that once i run the application to application is running properly but toolbar item contents are not displaying the menu items ...
12 Nov 2022 by CarlyJeps
how can i make it take the correct answers from the select and add them to the correct. If answered correctly in the select to write "You got 7 correct". Now it works only for radio button and for the text ... I make for cycle but i dont know...
12 Nov 2022 by RickZeeland
See example here: How to make a simple JavaScript quiz | Simple Steps Code[^]
26 Oct 2022 by Member 15802708
Hello Guys I have a problem I used this line: DateTime DateUTCKin1 = (new DateTime()).AddMilliseconds(TimeKin1); To convert my "TimeKin1" which is in milisecond and is equal to 1664459293023, it is suposed to be 29 sept 2022 13:48 but the...
26 Oct 2022 by Richard MacCutchan
Your value is incorrect, 29/09/2022 13:48 is 62135596786977 in milliseconds.
26 Oct 2022 by Richard Deeming
Your "milliseconds" value is obviously relative to a base date/time. By subtracting the milliseconds from the known value it is supposed to represent, we can find that base value: DateTime baseDate = new DateTime(2022, 9, 29, 13, 48, 0, 0,...
3 Oct 2022 by Richard Deeming
To read the value from the input, you need to get a reference to it. For example: function myFunction() { const maxLength = document.getElementsByName("maxLength")[0]; const element = document.getElementById("textarea"); element.maxLength...
21 Sep 2022 by Member 15774332
Hello! I have a small program written in C# with windows forms to send data bytes using COM ports. I am testing the program on one computer, on two interconnected USB modules supporting serial communication, so that one transmits, the other...
19 Sep 2022 by Ominous Dark
tried many possible ways but none worked. i need a code to make the back button go backwards to the last page (ex if i was on form 4 with multiple buttons that take you to many different forms. when i reach each form i need to be able to go...
19 Sep 2022 by OriginalGriff
There are a number of ways you can do this, but the easiest way to do this is to create a static Stack in the main app form. Each time you open a new form, add yourself to the Stack, and when the user clicks "back" you have the previous...
18 Sep 2022 by Death Smoke
#pragma once #include using namespace std; namespace Project1 { using namespace System; using namespace System::ComponentModel; using namespace System::Collections; using namespace System::Windows::Forms; using namespace...
27 Jun 2022 by Jackie Lloyd
I am new to Python and Flask, and have inherited some Python Flask code, and my task is to write tests for it - bad process I know but we are where we are :/ I have read lots of similar problems to mine but still none of them work in my...
24 Jun 2022 by Vijay Pareek
how can i make exe file from winows form application, like software.
24 Jun 2022 by Member 15686299
1. Go to Visual Studio. 2. Open the app and open the Wndows Forms App project. You see the "Debug" at the options as selected. Instead select "Release". 3. You go to the "Build" tab, select "Publish Selection" and hit that. You get prompted with...
22 Jun 2022 by Richard MacCutchan
Take a look at Testing Flask Applications — Flask Documentation (2.0.x)[^]
17 Jun 2022 by termine1
Forms not being populated with values even though its there in browser > developer tools console.log(data); { "productId": "3", "productName": "G500 cpu", "productDescription": "gaming computer", "productCategory": "computers", ...
15 Jun 2022 by termine1
in my productservice.ts I got : getProductById(id: number){ return this.http.get(`${this.baseUrl}/getProductById/${id}`); } ``` in my UpdateProductComponent: ngOnInit() { this.initializeForm(); const id =...
15 Jun 2022 by Richard MacCutchan
if (id) { console.log(id); this.productService.getProductById(id).subscribe( product => this.product = product) } else { console.log('id is not defined') } this.updateForm.setValue( { 41*** productId:...
15 Jun 2022 by OriginalGriff
If you don't understand an error message, google it: typescript cannot read properties of undefined - Google Search[^] The top hit explains the problem: Resolving the TypeError: Cannot Read Property of Undefined in JavaScript[^]
3 Jun 2022 by Cameron Grant 2021
I am trying to build a registration form for a user on a webpage using python and the Django framework. The form works fine and registers a user if all the fields are valid and Django has built in error messages if fields are left blank etc which...
7 Apr 2022 by Daniel Tsang
Goal: Direct print a CSV file which is selected from another button on my forms application Problem: I don't know how to tell amy btnPrintFile_click method the FileName coming from another method in form1.cs Could someone help me? Im new to...
7 Apr 2022 by OriginalGriff
Create a class level private variable, and put the path in there: private string pathToFile = null; public void openCVSFile(object sender, EventArgs e) { OpenFileDialog ofd = new OpenFileDialog(); ofd.Multiselect = false; ...
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...
29 Mar 2022 by obhasha07
Hi, I need a way to automatically scroll to a selected item in a list view. For example: There are 10 items in the list view and only the first 5 are visible. A function selects the 9th item and the list view should automatically scroll to the 9th item. I tried using the following...
29 Mar 2022 by MontanaMan
Here is another solution: ListView1.TopItem = ListView1.Items(8)
18 Feb 2022 by spencerewina
How to get a form to pop up on the same page when user clicks a profile link. I have put a div by the form. And that div id in the js code, and in the css. What I have tried: I have tried putting a div around the form, and placed the javascript...
18 Feb 2022 by Andre Oosthuizen
You need to use the "show" or "hide" functions, see the code below as an example - > $(function() { $("#popupContainer").dxPopup({ title: "Popup Title", contentTemplate: function () { return $("").text("Popup...
16 Feb 2022 by Melger Stander
I got a Windows Forms application using C# and struggling now for over a week trying to export some textboxes and a datagridview data to a word document. I'v managed to get the textboxes data over to word but cant get the datagridview data in to...
16 Feb 2022 by Maciej Los
Assuming that DataGridView is bounded with datasource, like DataTable: private void btnSaveReport_Click(object sender, EventArgs e) { document = new Spire.Doc.Document(); document.LoadFromFile(samplePath); Dictionary
1 Jan 2022 by User 13045643
Hi all, I make a modalness custom messagebox, that let me click on the calling form. Now on this custom, I have created, two buttons and a dialog result, I also created a public class and Inherits the form where these buttons are. In another form...
1 Jan 2022 by OriginalGriff
As I said when you asked your first question on this subject, calling Show returns immediately - that's the whole point. What you need to do is either raise an event when the button is clicked in the new form (and handle it in the "parent") or...
17 Dec 2021 by Member 15471467
I need to code an iframe on my site to trigger a "thank you" page on the main page where it is embedded because I don't have access to the source code of the form that is iframed. What I have tried: I saw a forum here asking the same question,...
10 Dec 2021 by Member 15463115
I have to create this marquee by concatenating the last character of the string to the first character Then assign a substring starting at the front character then the number of characters in the original string. Confused on the process what...
10 Dec 2021 by Richard MacCutchan
See Create a scrolling text in the title bar of visual studio form[^].
4 Dec 2021 by DevJr
Try open your project .csproj that cause that warning, add below Code to manually add the reference: Note: - Make sure the path is correct. - Change every TheReferenceProject below into the actual project name that you wanna add for reference. ...