|
Have a look at the MSDN Nuggets videos on debugging. There's one called "Tools for Debugging" or something like that. There's a whole section just on VS 2005 debugging. But some of it is applicable to VS 2002/3 debugging too. You will get some ideas from watching a few of them.
http://www.microsoft.com/uk/msdn/events/nuggets.aspx[^]
Kevin
|
|
|
|
|
Hi all
I'd like to write a Winform application (C#) which shut down the computer after certain minutes but i don't know how to call and which WIN32 API to do this.I've read an article on this site about that but it's not clear.Please help me.Tnx
|
|
|
|
|
|
Hi,
I would like to know how to use code to change text's font and style within a text box or an enrichtextbox. Thank alot
|
|
|
|
|
|
is it possible to change partially of the document's style and fonts within the enrichtextbox?
|
|
|
|
|
Is there anyway to embedd a J2ME/J2SE application into C#? For example, i have the code for a small java game, i want it to be able to be ran in c#, is there anyway? maybe thru j# or something?
|
|
|
|
|
Sure, compile the Java code as J#. From there, you can call the methods in your J# application from C# as if it were written in C#.
Also, an alternate route is compiling your code using Mono's IKVM[^].
Tech, life, family, faith: Give me a visit.
I'm currently blogging about: Bought a House!
Judah Himango
|
|
|
|
|
Is there a way to specify a timeout to StreamReader.ReadToEnd() ?
Thanks,
/ravi
My new year's resolution: 2048 x 1536
Home | Music | Articles | Freeware | Trips
ravib(at)ravib(dot)com
|
|
|
|
|
No, there isn't.
Why would yo want a timeout for something that returns the contents of the Stream immediately? What are you trying to do?
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Dave Kreskowiak wrote: Why would yo want a timeout for something that returns the contents of the Stream immediately?
If only it (always) did. I was hoping to not have to spin off a worker thread to do the read.
<code>
HttpWebRequest req =
(HttpWebRequest) WebRequest.Create ("http://ravib.com");
HttpWebResponse resp = (HttpWebResponse) req.GetResponse();
Stream stream = resp.GetResponseStream();
StreamReader streamReader = new StreamReader (stream);
string strContent =
streamReader.ReadToEnd(); <code>
/ravi
My new year's resolution: 2048 x 1536
Home | Music | Articles | Freeware | Trips
ravib(at)ravib(dot)com
|
|
|
|
|
Wow!! The new information makes all the difference in the world! Now we know you're actually using this to download a web page.
Try using the WebRequest[^] version instead. This one supplies asynchronous methods to BeginGetRequestStream and, more importantly, End it!
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Dave Kreskowiak wrote: This one supplies asynchronous methods to BeginGetRequestStream
While that form allows the caller to asynchronously get the stream, that's not the problem. The problem is waiting for a read from the obtained stream to complete.
/ravi
My new year's resolution: 2048 x 1536
Home | Music | Articles | Freeware | Trips
ravib(at)ravib(dot)com
|
|
|
|
|
Setup your own timer that waits for however many second before you call EndGetResponseStream. You'll get whatever was returned until the timer expired.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
|
How Do I Execute shell command in c# ?
{like i you do in DOS}
|
|
|
|
|
|
I've got (what I think is a simple) problem.
To which (I fear is not so simple) to fix.
Currently I am trying to configure a setup project for my current solution (written using VS 2005 TS) now my solution consists of two or more projects (not including the setup project of course) I say two or more projects because my solution houses at the moment 2 VSTO designed word documents that are coded to pull information from a database fill in the blanks and print out the resulting document and close word automatically, I still have several Excel spreadsheets to code so the project list will grow.
Now to access each of the word "documents" the Main project has a Process object that has it's properties set to point to the required word document. the program simply runs the process and each document handles closing itself and word automaticaly. right now the two documents full path locations including the document file name are stored in two string constants in the main programs .config file.
under VS each of the two string constants are pointing to the ..\bin\release\"Document".doc under each word document's project folder
Now my setup project at the moment has all the outputs from each project installed into the same folder under Program Files (which is just fine by me it's not that complicated to warrant sub folders)
Now the problem lies in the fact that now the required document are no longer located where the .config file constants say they should be (they will be in the installion folder). Now I understand that any .config file under .net is XML and as such reading and writing to it should be as simple as reading and righting to a DB table my problem is how do I get my setup project to change the .config file's constants to point to the installed documents new locations.
Ryan
Data error reading Common Sense
Abort,Retry,Ignore,Fail?iiiiiiii
|
|
|
|
|
My frd just write a custom action that will do the job for you and then add it in the setup project using Custom Actions view.
To create a custom action, add a new project of type "Class Library", then add an installer class and override its "Install" and "Uninstall" methods. Both methods contains an argument of type IDictionary which can be used to store information that you want to pass to uninstaller from the installer. Call your config update logic from the install method.
Finally add this project in setup as custom action from custom action view.
Akif
|
|
|
|
|
Thanks so much for the help it was exactly what i needed much appreciated
Ryan
|
|
|
|
|
Hi, happy new year!
For me it is not starting very well, with VS2005 at least.
I have been using crystal report form vb6 up to now, not because I like it, in fact I don't, too many bugs. But now with VS2005 I believe it is worse!!
I wrote a class in VS2003 that can be called to preview and generate reports. When I had to move to VS2005 (big sigh!!) in december last, I tried to re-used that class. I converted it fine, until I write a report using parameters.
The class I used in the previous version of VS were working fine up to now.
With this actual version of Crystal report It seems to me that the parameters are not transferred to crystal report.
Below is one of the overloaded proc that I use. When compiled it generates no errors but when the report is loaded crystal keeps on prompting for the parameters. Could any one figure out what is wrong.
Thanks to help.
public void ReportON (string ReportName,string ParameterName1,string ParameterName2,
string ParameterValue1,Single ParameterValue2)
{
string repToload=null;
try
{
this.Cursor=Cursors.WaitCursor;
repToload = ReportLoc + ReportName;
reportDocument1.Load (repToload,CrystalDecisions.Shared.OpenReportMethod.OpenReportByTempCopy);
}
catch
{
MessageBox.Show ("Report template missing." + "\n"
+ "You need to run setup again to repair the installation.","Report Viewer",MessageBoxButtons.OK,MessageBoxIcon.Error);
this.Cursor=Cursors.Default;
return;
}
SQLcnx.ConnectionString = DBconnect.connection;
#region reset login info (overiding of crystal local server login)
CrystalDecisions.CrystalReports.Engine.Table CurrentTable;
CrystalDecisions.Shared.TableLogOnInfo CurrentLogin;
reportDocument1.Load (repToload,CrystalDecisions.Shared.OpenReportMethod.OpenReportByTempCopy);
CurrentTable = reportDocument1.Database.Tables[0];
CurrentLogin = CurrentTable.LogOnInfo;
CurrentLogin.ConnectionInfo.ServerName = DBconnect.ServerName;
CurrentLogin.ConnectionInfo.UserID = Registry.CurrentUser.OpenSubKey("GreenWorm\\PRMS\\Data").GetValue("accName").ToString();
CurrentLogin.ConnectionInfo.Password = Registry.CurrentUser.OpenSubKey("GreenWorm\\PRMS\\Data").GetValue("passWord").ToString();
CurrentLogin.ConnectionInfo.DatabaseName = "PRMSdb";
CurrentTable.ApplyLogOnInfo(CurrentLogin);
#endregion
reportDocument1.SetParameterValue (ParameterName1,ParameterValue1);
reportDocument1.SetParameterValue (ParameterName2,ParameterValue2);
SQLdataAdapter.Fill(repDataset);
reportDocument1.SetDataSource (repDataset);
crystalReportViewer1.ReportSource = reportDocument1;
this.Show();
this.Cursor=Cursors.Default;
}
Joseph Robert
|
|
|
|
|
Hi All,
I want to watch a particular registry key and whenever any sub key under this key changes i am trying to get the name of that subkey.for getting when a particular key is changed I can use RegNotifyChangeKeyValue but this only tells me that the key has been changed it didn't tell which subkey has been changed under the key which i am watching.One way will be i can compare the registry tree befor and after the changes which will be a very clumsy and tedious solution.Any suggestions how to do this?Any help will be greatly appreciated.Thanks in Advance.
Rakesh
|
|
|
|
|
I try to run my C# application from a network drive and I get a Security Exception saying: "Request for the permission of type 'System.Security.Permissions.SecurityPermission, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed."
Why does this happen? what should I do?
|
|
|
|
|
capuano wrote: Why does this happen?
Running an application from another computer is not a trusted action. In other words, your computer does not trust that the assembly sitting on the other computer is acceptable to run on your computer.
capuano wrote: what should I do?
This is from a guide I wrote regarding a .NET 1.1 application. It should be approximately the same:
Trust needs to be set up for windows applications written for the .NET framework to run through the on remote machines via UNC paths.
* Launch "Microsoft .NET Framework 1.1 Configuration" from the Administrative Tools programs folder.
* In the tree control on the left expand the elements My Computer ~ Runtime Security Policy ~ Machine ~ Code Groups ~ All_Code ~ LocalIntranet_Zone
* Ensure that the LocalIntraner_Zone node is selected so that the panel on the right is headed LocalIntranet_Zone Code Group.
* Select the "Add a Child Code Group" link in the right panel.
* Give the new Code Group the name "What ever name you want"
* Press Next
* Choose the condition type of "URL"
* In the URL box type the full URL to the wincode directory, e.g. file://server_name/share_name/folder_name/*
* Remember to include the asterisk to ensure that all assemblies can run
(For a more restrictive set each assembly can be individually named in its own code group)
* Click Next
* Choose the permission set "Full Trust"
* Click Next
* Click Finished
* A reboot may be necessary.
The above may or may not be acceptable to your situation - but you'll see where you need to make changes and with some experimentation you can see what other things are possible too.
ColinMackay.net
"Man who stand on hill with mouth open will wait long time for roast duck to drop in." -- Confucius
"If a man empties his purse into his head, no man can take it away from him, for an investment in knowledge pays the best interest." -- Joseph E. O'Donnell
|
|
|
|
|
I have to develop and email notification system, all the employees will keep their TO DO list in Sql server and an email notification will be fire to them before some specific perioud of every Job to do ...
Kindly tell me pacakages n libs used for this work.
R A M
|
|
|
|