15,895,011 members
Sign in
Sign in
Email
Password
Forgot your password?
Sign in with
home
articles
Browse Topics
>
Latest Articles
Top Articles
Posting/Update Guidelines
Article Help Forum
Submit an article or tip
Import GitHub Project
Import your Blog
quick answers
Q&A
Ask a Question
View Unanswered Questions
View All Questions
View C# questions
View C++ questions
View Javascript questions
View Visual Basic questions
View Python questions
discussions
forums
CodeProject.AI Server
All Message Boards...
Application Lifecycle
>
Running a Business
Sales / Marketing
Collaboration / Beta Testing
Work Issues
Design and Architecture
Artificial Intelligence
ASP.NET
JavaScript
Internet of Things
C / C++ / MFC
>
ATL / WTL / STL
Managed C++/CLI
C#
Free Tools
Objective-C and Swift
Database
Hardware & Devices
>
System Admin
Hosting and Servers
Java
Linux Programming
Python
.NET (Core and Framework)
Android
iOS
Mobile
WPF
Visual Basic
Web Development
Site Bugs / Suggestions
Spam and Abuse Watch
features
features
Competitions
News
The Insider Newsletter
The Daily Build Newsletter
Newsletter archive
Surveys
CodeProject Stuff
community
lounge
Who's Who
Most Valuable Professionals
The Lounge
The CodeProject Blog
Where I Am: Member Photos
The Insider News
The Weird & The Wonderful
help
?
What is 'CodeProject'?
General FAQ
Ask a Question
Bugs and Suggestions
Article Help Forum
About Us
Search within:
Articles
Quick Answers
Messages
Comments by Member 12941572 (Top 22 by date)
Member 12941572
8-Mar-17 7:36am
View
i use your code inside the btnSendFile but i got an error at this place
if (!buffer.IsNullOrEmpty())
and where should i write the code for timer event function ? inside any button or in main function ??
Member 12941572
5-Mar-17 0:13am
View
inside sending block or inside select file block
Member 12941572
4-Mar-17 23:56pm
View
yeah when i click on on send the total text file is transfered but i want to send line by line can you you please suggest me how it is ..?? i tried with stream Reader but didnt get the solution
Member 12941572
4-Mar-17 23:54pm
View
it doesn't mean i am expecting code from you...
i tried what he said but the problem is not solved
Member 12941572
4-Mar-17 8:11am
View
i didn't get my solution even now.
Member 12941572
4-Mar-17 8:07am
View
Ha ha but i didn't get my answer till now please help me guys
Member 12941572
4-Mar-17 6:51am
View
didn't get even a single word :-)
Member 12941572
4-Mar-17 5:30am
View
actually i didnt write any data while executing the program , i have to send a text file which have 400 lines i have to read one by one hope you understand what i said
Member 12941572
3-Mar-17 23:14pm
View
I think you didn't understand my question, i have to read the text file line by line and it is success in console application. What i need is the same operation will be done on winform application where do i insert the code
Member 12941572
3-Mar-17 23:10pm
View
Deleted
yeah it read all the lines with the code i mentioned but its all done on console application..?? how do i use the same on winform application and where do i insert the code
Member 12941572
3-Mar-17 23:08pm
View
there is buttons in winforms as i mentioned code in the question. where do i insert the code ??
Member 12941572
8-Feb-17 6:59am
View
i declare " OpenFileDialog ofd = new OpenFileDialog(); " at top of the code at that time it shows exception handling errors
but now if i use your code, the project executes perfectly...... thank you so much
Member 12941572
6-Feb-17 5:50am
View
thank you for your patience sir... i am working on visual studio 2010 .NET framework 4.5 i want to develop a small website with 3 screens in c# ( WINDOWS FORM APPLICATION) so i put 3 buttons for 3 pages on the home page and it executed with out any problem
now i want to put one more button on home screen and done all the thing what it requires and start executing the project and it executed without any errors the output screen is displayed.... but the screen contains only 3 buttons and new changes are not displayed on output screen
i tried adding or removing tools to the project but they are displayed in output
even though i remove all the content that form and executed it gives the same output as which gives previous result
Member 12941572
6-Feb-17 5:25am
View
come on sir ....! i think you didnt understand my question or else i am unable to explain my doubt clearly to all of you what ever it may be
i am designing a webpage by using windows form in c# in visual studio 10 , i designed something and when we run the program it will be executed with out any fault.. but the problem is now i add few more buttons and checklists to that windows form and start executing that project ... but it executes previous form only new changes are not displayed on output screen.. hope you get my problem
Member 12941572
6-Feb-17 5:09am
View
yess sir we have exe file and as well as my project program if i want to add more features to the web form or remove some from existing file the changes are saved in the file in visual studio but if we execute the program the changes are not executed and the program is executed as same as previous (i..e, with out any changes ) file
Member 12941572
2-Feb-17 6:05am
View
windows form
Member 12941572
2-Feb-17 2:28am
View
welcome
Member 12941572
31-Jan-17 8:52am
View
PROBLEM SOLVED THANK YOU ALL
Member 12941572
31-Jan-17 8:22am
View
Deleted
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.IO.Ports;
using System.Windows.Forms;
using WindowsFormsApplication3;
namespace CodeProjectSerialComms
{
public partial class Form1 : Form
{
SerialPort ComPort = new SerialPort();
internal delegate void SerialDataReceivedEventHandlerDelegate(object sender, SerialDataReceivedEventArgs e);
internal delegate void SerialPinChangedEventHandlerDelegate(object sender, SerialPinChangedEventArgs e);
private SerialPinChangedEventHandler SerialPinChangedEventHandler1;
delegate void SetTextCallback(string text);
string InputData = String.Empty;
public Form1()
{
InitializeComponent();
SerialPinChangedEventHandler1 = new SerialPinChangedEventHandler(PinChanged);
ComPort.DataReceived += new System.IO.Ports.SerialDataReceivedEventHandler(port_DataReceived_1);
}
OpenFileDialog ofd = new OpenFileDialog();
private void btnGetSerialPorts_Click(object sender, EventArgs e)
{
string[] ArrayComPortsNames = null;
int index = -1;
string ComPortName = null;
//Com Ports
ArrayComPortsNames = SerialPort.GetPortNames();
do
{
index += 1;
cboPorts.Items.Add(ArrayComPortsNames[index]);
} while (!((ArrayComPortsNames[index] == ComPortName) || (index == ArrayComPortsNames.GetUpperBound(0))));
Array.Sort(ArrayComPortsNames);
if (index == ArrayComPortsNames.GetUpperBound(0))
{
ComPortName = ArrayComPortsNames[0];
}
//get first item print in text
cboPorts.Text = ArrayComPortsNames[0];
//Baud Rate
cboBaudRate.Items.Add(300);
cboBaudRate.Items.Add(600);
cboBaudRate.Items.Add(1200);
cboBaudRate.Items.Add(2400);
cboBaudRate.Items.Add(9600);
cboBaudRate.Items.Add(14400);
cboBaudRate.Items.Add(19200);
cboBaudRate.Items.Add(38400);
cboBaudRate.Items.Add(57600);
cboBaudRate.Items.Add(115200);
cboBaudRate.Items.ToString();
//get first item print in text
cboBaudRate.Text = cboBaudRate.Items[0].ToString();
//Data Bits
cboDataBits.Items.Add(7);
cboDataBits.Items.Add(8);
//get the first item print it in the text
cboDataBits.Text = cboDataBits.Items[0].ToString();
//Stop Bits
cboStopBits.Items.Add("One");
cboStopBits.Items.Add("OnePointFive");
cboStopBits.Items.Add("Two");
//get the first item print in the text
cboStopBits.Text = cboStopBits.Items[0].ToString();
//Parity
cboParity.Items.Add("None");
cboParity.Items.Add("Even");
cboParity.Items.Add("Mark");
cboParity.Items.Add("Odd");
cboParity.Items.Add("Space");
//get the first item print in the text
cboParity.Text = cboParity.Items[0].ToString();
//Handshake
cboHandShaking.Items.Add("None");
cboHandShaking.Items.Add("XOnXOff");
cboHandShaking.Items.Add("RequestToSend");
cboHandShaking.Items.Add("RequestToSendXOnXOff");
//get the first item print it in the text
cboHandShaking.Text = cboHandShaking.Items[0].ToString();
}
private void port_DataReceived_1(object sender, SerialDataReceivedEventArgs e)
{
InputData = ComPort.ReadExisting();
if (InputData != String.Empty)
{
this.BeginInvoke(new SetTextCallback(SetText), new object[] { InputData })
Member 12941572
10-Jan-17 4:17am
View
Thank you ,but i want make a gui based on the program so i want to run the program on normal screen instead of command prompt
Member 12941572
10-Jan-17 4:11am
View
how can you please explain the procedure
Member 12941572
10-Jan-17 4:10am
View
actually i have a code to read usb based card when we insert the card and run the program it displays the information about the card in command prompt and the code is written in console application type in c# .NET
it has both input and output properties but i want the output on webform instead of command prompt any suggestions ???
Show More