The Wayback Machine - https://web.archive.org/web/20090228183228/http://www.codeproject.com:80/script/Forums/View.aspx?fid=1649
Click here to Skip to main content
5,932,047 members and growing! (14,238 online)
Announcements
* Bold indicates new messages since 8:32 28 Feb '09
BullFrog Power
Advanced Search
Sitemap

C#


Home > Forums > C#

 Msgs 1 to 25 of 13,366 (Total in Forum: 242,418) (Refresh)FirstPrevNext
AdminHow to get an answer to your questionadminChris Maunder17:31 10 Nov '05  
For those new to message boards please try to follow a few simple rules when posting your question.
  1. Choose the correct forum for your message. Posting a VB.NET question in the C++ forum will end in tears.
  2. Be specific! Don't ask "can someone send me the code to create an application that does 'X'. Pinpoint exactly what it is you need help with.
  3. Keep the subject line brief, but descriptive. eg "File Serialization problem"
  4. Keep the question as brief as possible. If you have to include code, include the smallest snippet of code you can.
  5. If you are posting source code with your question, place it inside <pre></pre> tags, or click the "Ignore HTML tags in this message" check box.
  6. Be courteous and DON'T SHOUT. Everyone here helps because they enjoy helping others, not because it's their job.
  7. Please do not post links to your question in one forum from another, unrelated forum (such as the lounge). It will be deleted.
  8. Do not be abusive, offensive, inappropriate or harass anyone on the boards. Doing so will get you kicked off and banned. Play nice.
  9. If you have a school or university assignment, assume that your teacher or lecturer is also reading these forums.
  10. No advertising or soliciting.
  11. We reserve the right to move your posts to a more appropriate forum or to delete anything deemed inappropriate or illegal.

cheers,
Chris Maunder
CodeProject.com : C++ MVP

Questionwindows version checkmembershabya6mins ago 
hello,
i developed a c# program which unfortunatly cannot run on WINDOWS95 , 98 etc.
is there a way to fish the windows version as soon as i start my application ?
coz if its not the right one i'll just abort. better than letting the software spread its wings and fly..

thanks in advance,

avi
AnswerRe: windows version checkmemberharold aptroot2mins ago 
Environment.OSVersion


QuestionStrip progress bar using background thread while uploading file in C#?memberrasingh122mins ago 
I want to run a strip progress bar on winform using background thread while uploading a file from my hard disk.i am getting an exception on xmlDocument.Load(txtFileName.Text) saying " System.ArgumentException was unhandled by user code Message="Illegal characters in path."

public partial class TreeDisplay : Form
{
public string Filename
{ get { return filename; } }
protected string filename;
//Declaring constructor of the Class
public TreeDisplay()
{
InitializeComponent();
this.Text = "Tree View of XML File";//Form Title.
}//TreeDisplay Constructor
private void initiatingTree(string nameofFile)
{
try
{
treeView1.Nodes.Clear();
if (xmlDocument.DocumentElement != null) treeView1.Nodes.Add(new TreeNode(xmlDocument.DocumentElement.Name));
//Creating TreeNode and adding the first node to it.
TreeNode tNodeObj = treeView1.Nodes[0];

XmlNode xNode = xmlDocument.DocumentElement;

//Declaring function for adding Nodes to tree View.
AddingNodesToTree(xNode,tNodeObj);
toolStripStatusLabel1.Text = "Opened file " + nameofFile;
treeView1.Nodes[0].Expand();
treeView1.CollapseAll();
}//try block ends
//Exception Handlers to catch any sort of error
catch (XmlException xmlex)
{
MessageBox.Show(xmlex.Message, "Error");
}//catch
catch (Exception exp)
{
txtFileName.Text = exp.Message;
}
}//initiatingTree
private void btnBrowse_Click(object sender,EventArgs e)
{
bgWorker1.RunWorkerAsync();
StripProgressBar.Value = 0;
toolStripStatusLabel1.Text = "Browsing for a Xml file";
OpenFileDialog open = new OpenFileDialog();

if (open.ShowDialog(this) == DialogResult.OK)
{
txtFileName.Text = open.FileName;
initiatingTree(open.FileName);
}
while (this.bgWorker1.IsBusy)
{
StripProgressBar.Increment(1);
Application.DoEvents();
}
}//Browse button
private void bgWorker1_DoWork(object sender, DoWorkEventArgs e)
{
xmlDocument = new XmlDocument();
Thread.Sleep(5000);
xmlDocument.Load(txtFileName.Text);
btnBrowse.Enabled = false;
}
private void bgworker1_RunWorkerCompleted(object sender, RunWorkerCompletedEventArgs e)
{
StripProgressBar.Value = 100;
if (e.Error == null)
{
MessageBox.Show(xmlDocument.InnerXml, "Download Complete");
}
else
{
MessageBox.Show("Failed to download file");
}
// Enable the Browse button and reset the progress bar.
this.btnBrowse.Enabled = true;
StripProgressBar.Value = 0;
toolStripStatusLabel1.Text = "work finished processing request.";
}//workerCompleted
}// TreeDisplay Class

Please help me in removing the exception.
Thanks..
QuestionFile caching C#membersatsumatable1 hr 39mins ago 
Hi,

Is there any options provided by .Net framework to implement caching effectively? I want to capture files in that for some time.

Thanks in advance ...
AnswerRe: File caching C#memberharold aptroot1 hr 8mins ago 
Isn't the file caching that Windows does enough?


QuestionI need real help from some of you! thanks.memberSeraph_summer3hrs 14mins ago 
I know this may not be the appropriate place for me to ask about this quesiton, but I don't know
where can I ask this,I am really confused with the default page for the Html help workshop, I do believe someone who has used HTML help workshop can give me one hint:

I am using html help workshop to create the .chm for one c# application.

I try to set the default page by change "project options" and set "default file", but it does not work.

when I open the .chm and it always display "This program cannot display the webpage" on the first page. it does not display the default page I set. I don't know the reason.

by the way, except this problem, .chm works fine.

anyone has used html help workshop and please give me one hint for it.

Many thanks!!
Questionhow to do the custom deployment of c# .net windows applications project ?memberpramod25173hrs 22mins ago 
hi , how to do the custom deployment of vb.net windows applications project . for example after completing deployment project application , when we install .exe file i want to show two options
.custom install
.typical install
after when i click custom install it should be showing modules but i cont see modules how to add modules in custom installation .
please send me step by step how to custom install deployment of c#.net windows application.
AnswerRe: how to do the custom deployment of c# .net windows applications project ?memberCalin Tatar3hrs 16mins ago 
Seems that you have to create a Setup Project in VS.

http://msdn.microsoft.com/en-us/library/ms228283.aspx[^]

Calin
GeneralRe: how to do the custom deployment of c# .net windows applications project ?memberpramod25171 hr 41mins ago 
thanks for giving url , its very usefullThumbs Up
QuestionProblem with Matrix control for rdlc file in win formsmemberMember 30578874hrs ago 
Hi,
I've generated a report using Matrix control in a C# win application.
I want to display sum of the values of a column at the end. I request any one who knows this to help me in this task. I've done for a TABLE control by adding table footer. Now I need it for matrix

Thanks in advance
Questionhow to watch on a directorymemberWinSolution5hrs 4mins ago 
How to watch on directory let say "C:\windows\temp". I want to log; by whom and when it is accessed , some thing new created.

Thanks.
AnswerRe: how to watch on a directorymember[DK]KiloDunse5hrs 1 min ago 
Look in the Filesystemwatcher class.

Programming is like Mathematics… you take ONE step at the time! Wink

QuestionLogging file accessmember[DK]KiloDunse5hrs 7mins ago 
Hi.

Is there a way to log which process has accessed/changed a file?

I looked at the FileSystemWatcher class, but it dos not tell which process.

Programming is like Mathematics… you take ONE step at the time! Wink

QuestionDrawing Borders' Corners [SOLVED]member Xmen 6hrs 1 min ago 
I found the solution Wink

I'm drawing a gradient border for a control, everything is drawn but corners.
Here[^] is the screenshot, I tried to draw on top left corner but its looking odd.



                Rectangle topLeftRect = new Rectangle(0, 0, borderThickness, borderThickness);

Rectangle topRect = new Rectangle(borderThickness, 0, this.Width - (borderThickness * 2), borderThickness);
Rectangle botRect = new Rectangle(borderThickness, this.Height - borderThickness - 1, this.Width - (borderThickness * 2), borderThickness);
Rectangle leftRect = new Rectangle(0, borderThickness, borderThickness, this.Height - (borderThickness * 2));
Rectangle rightRect = new Rectangle(this.Width - borderThickness - 1, borderThickness, borderThickness, this.Height - (borderThickness * 2));



e.Graphics.FillRectangle(new LinearGradientBrush(topRect, Color.Transparent, Color.Gray, 90, false), topRect);
e.Graphics.FillRectangle(new LinearGradientBrush(botRect, Color.Transparent, Color.Gray, 270, false), botRect);
e.Graphics.FillRectangle(new LinearGradientBrush(leftRect, Color.Transparent, Color.Gray, 0, false), leftRect);
e.Graphics.FillRectangle(new LinearGradientBrush(rightRect, Color.Transparent, Color.Gray, 180, false), rightRect);

e.Graphics.FillRectangle(new LinearGradientBrush(topLeftRect, Color.Transparent, Color.Gray, 35, false), topLeftRect);


TVMU^P[[IGIOQHG^JSH`A#@`RFJ\c^JPL>;"[,*/|+&WLEZGc;`AFXc!L
%^]*IRXD#@GKCQ`R\^SF_WcHbORY87֦ʻ6ϣN8ȤBcRAV\Z^&SU;~%CSWQ@#2
W_AD`EPABIKRDFVS)EVLQK)JKSQXUFYK[M`UKs*$GwU#(QDXBER@CBN%
Rs0~53%eYrd8mt^7Z6]iTF+(EWfJ9zaK-i’TV.C\y<pŠjxsg-b$f4ia>
--------------------------------------------------------
128 bit encrypted signature, crack if you can

modified on Saturday, February 28, 2009 7:47 AM

QuestionListview and tooltip popup for each cell?membergp3436hrs 2mins ago 
Hi All,

I've got a Listview control on a windows forms and it is set to details view, shows full grid lines - so that it looks like a grid. I've three columns in the list view and have 10 rows of data. My problem is, I need a way so that when the user mouse cursor is over a particular cell of data, I want a popup (almost like a tooltip) to be displayed. Once my mouse cursor is removed from over the cell, the popup should automatically close down. Of course, this popup, will have a lot of other prepopulated data within it.

Is this possible with C#, Windows Forms? If so, can you provide some ideas on how I might go about do this? I do see this on some web site, but have never seen this on a windows forms application before.

Many thanks,
Jim
AnswerRe: Listview and tooltip popup for each cell?member Xmen 5hrs 58mins ago 
Use ItemMouseHover event of ListView, like this
        private void listView1_ItemMouseHover(object sender, ListViewItemMouseHoverEventArgs e)
{
toolTip1.SetToolTip(listView1, e.Item.Text);
}


or use ToolTipText property of ListViewItem

TVMU^P[[IGIOQHG^JSH`A#@`RFJ\c^JPL>;"[,*/|+&WLEZGc;`AFXc!L
%^]*IRXD#@GKCQ`R\^SF_WcHbORY87֦ʻ6ϣN8ȤBcRAV\Z^&SU;~%CSWQ@#2
W_AD`EPABIKRDFVS)EVLQK)JKSQXUFYK[M`UKs*$GwU#(QDXBER@CBN%
Rs0~53%eYrd8mt^7Z6]iTF+(EWfJ9zaK-i’TV.C\y<pŠjxsg-b$f4ia>
--------------------------------------------------------
128 bit encrypted signature, crack if you can

GeneralRe: Listview and tooltip popup for each cell?membergp3435hrs 29mins ago 
Thank Xmen, but the tooltip will only show or popup when the user cursor is place over the first column in the listview first. What I want is something that will also popup when the user hovers over different columns.

Thanks,
Jim
GeneralRe: Listview and tooltip popup for each cell?mvpDaveyM694hrs 34mins ago 
Have a look at this article's[^] meesages, especially the section named Simple Solution.

Dave
BTW, in software, hope and pray is not a viable strategy. (Luc Pattyn)
Visual Basic is not used by normal people so we're not covering it here. (Uncyclopedia)

QuestionDesktop CalandermemberWinSolution6hrs 15mins ago 
I want to display a calender on desktop [right side] if any one can help me helping link

Please keep following points in mind
- application will be running in background. [at startup]
- icon will be in Tray no tab in Task bar. when double clicked then in Task Bar.

Thanks
AnswerRe: Desktop CalandermemberSearril2hrs 58mins ago 
Install Vista. There's a calendar available by default in the sidebar.
GeneralRe: Desktop CalandermemberJaiprakash M Bankolli1 hr 14mins ago 
Yes, there are gadgets available that you will get it for free in Vista or windows 7.

Thanks

Regards,
Jaiprakash M Bankolli
jaiprakash.bankolli@gmail.com
My Blog
Suggestions for me
Visit:www.OracleQuest.com

GeneralRe: Desktop CalandermemberWinSolution43mins ago 
Dear Both

I am going to built a reminder application in which i have to display a calendar on desktop that's why i ask for help

thanks
QuestionHow To Get Local Printer statusmembernaeemnimi6hrs 18mins ago 
Hi All,

I want to know how we can get the printer status/state whether it is out of paper, paper jammed etc.
AnswerRe: How To Get Local Printer statusmemberPhilip F.1 hr 48mins ago 
Maybe this helps:
http://msdn.microsoft.com/en-us/library/aa394363.aspx[^]

Phil

I won’t not use no double negatives.

General General    News News    Question Question    Answer Answer    Joke Joke    Rant Rant    Admin Admin   


Last Updated 9 Aug 2007
Web18 | 2.2.1042 | Advertise | Privacy
Copyright © CodeProject, 1999-2009
All Rights Reserved. Terms of Use