15,898,134 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 Sayan Bera (Top 45 by date)
Sayan Bera
28-May-14 8:42am
View
You can access Protected member of a class(student) only in the class(Csstudent) which derives it, Not any other class(Program).
Sayan Bera
28-May-14 8:39am
View
will this work?
class Program: student
{
static void Main(string[] args)
{
Csstudent cs = new Csstudent(101, "Sha", 56, 96);
cs.StudentDetails();
Program pp = new Program();
pp.DisplayData();
Console.ReadLine();
}
}
Sayan Bera
28-May-14 8:27am
View
Deleted
What is the error you are getting?
"cs.DisplayData();" is this giving error?
Sayan Bera
12-May-14 8:29am
View
Are you asking what to use or saying what you are using?
Anyways -> Handle the ItemChecked event for the control if you are using CheckedListBox.
private void OnItemChecked(object sender, ItemCheckEventArgs e)<br>
{
//foreach (string obj in checkedListBox1.CheckedItems)
//{
// MessageBox.Show(Obj);
//}
MessageBox.Show("Name: "+checkedListBox1.SelectedItem.ToString()+" Index: "+checkedListBox1.SelectedIndex.ToString());
}
Sayan Bera
12-May-14 8:09am
View
What is CHECKBOXLIST in C# Windows Application?
Are you using Few checkboxes or CheckedListBox?
Sayan Bera
12-May-14 6:36am
View
"<Where><Eq>",
"<FieldRef Name='Time_x0020_of_x0020_Selection'/>",
"<Value Type='DateTime'><Today OffsetDays=’-0′></Value>",
"</Eq></Where>");
Sayan Bera
12-May-14 6:32am
View
Deleted
Do a google search, you'll get so many solution that you'll be confused which one to choose.
Sayan Bera
12-May-14 6:08am
View
After converting to Int32, how can it show decimal??
Use Convert.ToDouble
Sayan Bera
12-May-14 5:47am
View
What is the value you are entering to check?
<value type="\"Text\">" + "</value>"
What is "+"?
Sayan Bera
10-May-14 15:39pm
View
H->show opens the new blank window. And for the second problem try to add the controls through QDesigner with proper layouts, or add layout to the code maunally
like -> 'gridLayout_2->addWidget(widget, 0, 0, 1, 1);'
See this http://s30.postimg.org/thtllj6n5/Untitled.png.
Sayan Bera
10-May-14 14:55pm
View
public static List<string> myList = new List<string>();
Look in the code where and how its being declared and defined in the above comment.
If it helps mark the answer as accepted. Thank you.
Sayan Bera
10-May-14 14:47pm
View
I guess you haven't declared the myList as Static!
Sayan Bera
10-May-14 14:38pm
View
I'm putting the whole code .....Try this out.
First Form
-----------
namespace CodeProject
{
public partial class Form2 : Form
{
public static List<string> myList = new List<string>();
public Form2()
{
InitializeComponent();
}
private void Form2_Load(object sender, EventArgs e)
{
Form3 fm3 = new Form3();
fm3.Show();
for (int i = 0; i < listBox1.Items.Count; i++)
myList.Add(listBox1.Items[i].ToString());
}
}
}
------------------------------------------------------------------
Second Form
-----------
namespace CodeProject
{
public partial class Form3 : Form
{
public Form3()
{
InitializeComponent();
}
private void button1_Click(object sender, EventArgs e)
{
for (int i = 0; i < Form2.myList.Count; i++)
listBox1.Items.Add(Form2.myList[i]);
}
}
}
Sayan Bera
10-May-14 14:32pm
View
Where are you declaring the List myList? Does your second form contain listbox control named listbox1??
Sayan Bera
10-May-14 14:01pm
View
post a big sized image.....its too small to be visible!
Sayan Bera
10-May-14 13:39pm
View
Upload image in some sites like postImage.org and post the link here. Like -> http://s28.postimg.org/pf9f1ap5p/Desert.jpg
Sayan Bera
10-May-14 13:18pm
View
Sorry, I can't really make-out the problem mentioned. Post some image(PrintScreen). I can suggest you to add all controls QPushButton, QScrollArea, QLabel by opening the .ui file from QDesginer and apply a Grid Layout to the CentralWidget.
Sayan Bera
10-May-14 13:04pm
View
Can you take some screenshots of the windows and post the links. because its really hard to understand the problem. Are you adding the controls by QDesigner? What IDE are you using?
Sayan Bera
10-May-14 1:19am
View
Check if ServiceReference1Client is the correct name of the class you are using. Generally it's Service1Client. Open the service reference in Object viewer and check.
Sayan Bera
9-May-14 12:42pm
View
Deleted
http://msdn.microsoft.com/en-us/library/microsoft.office.tools.excel.worksheet.hyperlinks(v=vs.90).aspx
use worksheet.HyperLink.Add(.....)
Sayan Bera
9-May-14 12:26pm
View
DataGridView has scrollbars. You can it by myDGView.Scrollbars = Scrollbars.Vertical;
Sayan Bera
9-May-14 12:06pm
View
You can use 3rd party zip libraries, zip it with password. Or you can get some idea from this link http://www.codegain.com/articles/csharp/miscellaneous/folder-protection-for-windows-using-c-sharp.aspx.
try this -> http://www.codeproject.com/Questions/712147/Create-folder-with-password-protection
Sayan Bera
7-May-14 13:10pm
View
Have you added the path of the library folder in project properties->Linker->Additional Library Directories and added the .lib in Linker->Input->Additional Dependencies?
Sayan Bera
13-Dec-13 23:00pm
View
The code will work for .doc also.
Sayan Bera
12-Dec-13 10:23am
View
What is the communication cable you are using? Sometimes coding is correct, but due to faulty cable, data is not transmitted.
Sayan Bera
11-Dec-13 13:26pm
View
You can get paragraph count of any .docx by using Microsoft.Office.Interop.Word. like
int paragraphs = doc.Paragraphs.Count;
Sayan Bera
6-Dec-13 11:43am
View
Why are you using "style="display: none;" for the textbox?
Sayan Bera
4-Dec-13 10:40am
View
Okay, so in Form_load event set the mindate for datetimepicker1 to DateTime.today and then handle the event as I gave the code above.
Sayan Bera
4-Dec-13 10:29am
View
check your project properties, I guess you are not building an application(.exe).
Sayan Bera
4-Dec-13 10:05am
View
As far i understand, the first datetimePicker will display normally and you choose a date(say X), and second one will display dates starting from X.
subscribe a event handler(dtp1_ValueChanged) for datatimepicker1's ValueChanged event and try the below code
private void dtp1_ValueChanged(object sender, EventArgs e)
{
//get the value from first datetimepicker
DateTime dt = dateTimePicker1.Value;
//apply the datetime to second one
dateTimePicker2.MinDate = dt;
}
Sayan Bera
15-Nov-13 10:01am
View
Yes. But the thing you mentioned is having the logic in a separate function and not in Open().
Well, I'm having another problem in that way(SharePont related), so I need to post that separately. The thing I tried seems to be a no-go.
Thanks very much for your replies.
Sayan Bera
15-Nov-13 8:20am
View
Thanks for the quick reply.
I tried exactly as mentioned on the demo link. But its not solving my purpose.
in Open() function i did as follows...
Open()
{
.....
var r = fnOpenNormalDialog();//I require to wait here till the user selects Yes/No and get the returned value
if(r == false)
return;
.... else it proceeds below
....
}
I want the mechanism exactly as confirm(msg) does.
Sayan Bera
11-Nov-13 8:18am
View
Yes, its not possible with JavaScript. So encoding with JavaScript Obfuscator is good way.
Sayan Bera
8-Nov-13 3:41am
View
Thanks for the response.
In 1st Link, by JavaScript Obfuscator i can achieve my reqd., but i able to decode the code also. In another approach, I didn't understand where should unloadJS() and unloadAllJS() be called.
Can you suggest any server side technique to do this?
Sayan Bera
4-Oct-13 6:41am
View
Thanks Mr. Richard.
Yes there could be many reasons, but I'll first give a try with this lock.
Sayan Bera
4-Oct-13 6:16am
View
Can this happen because of time synchronization or COM port?
I have done a few tests, then I found that if a post data by generating it in Client1 not getting values from the COM port, then this corruption of data doesn't happen.
Sayan Bera
6-Sep-13 23:42pm
View
Thanks Jason.
Yes proper hardware handshake is not happening. TxD(Pin 3) at one end of the cable is connecting to TxD on the PC, but which should connect to RxD(Pin 2) of the PC.
We did this manually and terminal apps responds correctly in both PCs. We need to use some adapters to cross the connection at one PC end.
Sayan Bera
6-Sep-13 2:52am
View
Yes, Hyperterminal is not present in windows 7, so I have already downloaded it and tested.
Image of Cable and ports used are given in the link above "Serial cable used and PC ports".
I am using a null modem cable, and the cable is okay, as the loopback test mentioned above by shorting the pins 2 and 3 by a jumper is working fine. But when the the cable is connected to both the PC, data is not exchanged.
I suspect connection is not being established between the 2 PC, because when I plug/unplug the cable, nothing changes in the Device Manager->Port(COM and LPT) COM1, COM2, LPT1. No Yellow/red mark on the items.
Is there any kind of specific device driver for this null modem cable for Windows 7?
Sayan Bera
5-Sep-13 8:10am
View
Thanks for the reply and I will give it a try.
Does this work for windows 7, because Create a new connection->Connect directly to another computer as mention in http://support.microsoft.com/kb/305621/en-us is removed from windows vista onwards!
Sayan Bera
8-Mar-13 5:19am
View
Sorry, the problem still exists for Windows XP SP2 and SP3. I guess there is a version mismatch between Office 2007(including Service Packs for Office and HotFix for Office) and OS.
The problem is solved on Windows 7 and Windows 8, ie, after installing Hotfix KB976477 the COM addins register under HKLM is loaded at Office application startup.
But in Windows XP SP2 after installing the Hotfix, the COM addins still remains unloaded.
Any response to this issue is appreciated.
Thanks and Regards,
Sayan.
Sayan Bera
6-Mar-13 1:24am
View
The above problem got solved by installing the Hotfix KB976477 for Office 2007.
Actually Office 2007 searches COM addIns which are registered only under HKCU.
So this hotfix makes the Office 2007 apps to search COM addIns registered under HKLM.
Thanks and Regards,
Sayan.
Sayan Bera
6-Mar-13 1:21am
View
Deleted
The above problem is solved by installing hotfix kb976466 for Office 2007.
Actually Office 2007 searches COM addIns only registered under HKCU. So the above hotfix makes possible for Office 2007 apps to search COM addins registered under HKLM and load them at app startup.
Thanks and Regards,
Sayan.
Sayan Bera
6-Mar-13 1:21am
View
Deleted
The above problem is solved by installing hotfix kb976466 for Office 2007.
Actually Office 2007 searches COM addIns only registered under HKCU. So the above hotfix makes possible for Office 2007 apps to search COM addins registered under HKLM and load them at app startup.
Thanks and Regards,
Sayan.
Sayan Bera
6-Mar-13 1:14am
View
After a few testing over different OS, I found-
In Windows 7, initially it remains invisible but, after a while sometimes if I refresh(F5) on desktop it becomes visible.
In Windows XP also same as above.
But in Windows 8 it remains visible as soon as application launches.
Sayan Bera
22-Feb-13 1:28am
View
Sorry for that, it is a printing mistake, in code I am using App.Visible = false;
Show More