|
If you are using visual studio ,then you will find the project file contains the language in it's extention like *.csproj , and *.vbproj.
|
|
|
|
|
I am using VS 2005 and for web projects, there is no .vbproj or .csproj in 2005. We can't use this method. Only way is some how findout the language used from the web.config file, since now all are maintaining in web.config file. Also I want to know it programmatically using EnvDTE or some objects like that. Can you help me?
Regards,
Rathish P S
|
|
|
|
|
Extension of project will tell you its type like if its abc.dll it means its a class library, or if its abc.exe its a console application.
Regards,
Ali
Ali
http://aliwritings.blogspot.com/
|
|
|
|
|
Yes, you are right. But I want to know it by using C# code. Currently I am using object of EnvDTE.Project to find it. But for webprojects, we can't follow this method since no project file in VS 2005. I want to solve this issue. If you have an idea about the solution please help.
Regards,
Rathish P S
|
|
|
|
|
In win application you can open the .sln file with the notepad and you will get there the language .
In web application there is no real deffirence between vb.net and C# ,cuz they are in html ,And if you want to know the language as a code behind file then :
It will be either *.aspx.cs OR *.aspx.vb .
|
|
|
|
|
u mean that we can do it by parsing the solution file. Am I right? I have to find out the code behind language by using C#. Now I am doing it by anylysing the extension of project.ie .vbproj or .csproj. But the real problem is that web projects in vs 2005 do not have project file. Infact all are storing in the web config file. We can use this file for parsing and identify the language. But i am trying to found out more easier way to solve this.
Thanks
Regards,
Rathish P S
|
|
|
|
|
I think this maynot be a slight big problem ,since .net 2.0 allows any web project to be in multible languages.
|
|
|
|
|
hi ..
i hav an application , i want if i enter roll no in a textbox and then click button then corresponding name of that rollno will show in other textbox..
i want to do this using dataset when dataset is filled with table "stdrecord"..
|
|
|
|
|
What I understand is user can type some text in a text box and now on click of some button, same text should go in some other text box.
Suppose Textbox1 is first textbox and Textbox2 is second, then on click of button, you only have to write this;
Textbox2.text = Textbox1.text;
Thats it!!!
and in which context are you talking about dataset... please elaborate...
Ali
http://aliwritings.blogspot.com/
|
|
|
|
|
Hi,
so if that was the case ..initially fill the dataset with the desired format ..like for the above case ..fill with number,name,.,,.etc etc
and in textbox leave event handler write the code to traverse inside the dataset and if the match found for number get the corresponding name and fill the desired text box
i hope u got!!!
With Regards,
Vinayaka Shenoy
|
|
|
|
|
I am trying to insert a NULL value into a table but don't know how to do it? Any suggestion?
|
|
|
|
|
You can use DBNull.Value for this.
mav
|
|
|
|
|
I want to serialize a class to an XML file. The class contains an array of objects. The objects are a class with 2 string members.
|
|
|
|
|
|
Hi,
I am making desktop application using C#
How can kill the process of excel file
Suppose i have opened Four Excel file
How I will detect which one to close the excel file
My application contains base files and all the tables are converted to Excel files
Excel files are invisible
what i noted that excel process is still running
I have to close the excel files after converting from database table to excel
How can i completely kill the process of excel file
regards
sanjeev
|
|
|
|
|
Isn't there a Close() or Quit() method for the Excel.Application object? I know there _is_ one for Word, so Excel should be similar...
IMHO you shouldn't kill the process, because if you need to do this it means that you haven't kept track of your references. Close all open Documents, then the COM server should shutdown, too. Or, as stated above, use Quit or something similar.
Regards,
mav
|
|
|
|
|
Ah, I have personally dealt with this before. The problem arises in the Office interop assemblies where if you do not practice the correct method of declaring variables, the instances will never go away. The first thing to remember is to never call something like:
Excel.Application oApp = new Excel.Application
...
Application.WorkBook....
What I mean by this is, you must explicitly declare each of the variables you intend to work with IE..
Excel.Application oApp = new Excel.Application
Excel.WorkBook oWB = Application.WorkBook
So any time you use a subclass within the Application model, make sure you declare a new variable for it instead of directly referencing it. The second most important thing is to lookup Microsofts NAR function and call NAR(...) on any object you create.
Excel.Application oApp = new Excel.Application
Excel.WorkBook oWB = Application.WorkBook
...
NAR(oWB);
NAR(oApp);
These two methods above will insure that all references to the Interop Assemblies are cleaned up, as the cause of lingering Excel applications are the lingering pointers to some aspect of its Application. If you need a better example I could provide you with one, I just do not have the code in front of me at the moment.
Good luck.
Here is the function provided by Microsoft:
private void NAR(object o)
{
try
{
System.Runtime.InteropServices.Marshal.ReleaseComObject(o);
}
catch {}
finally
{
o = null;
}
}
You might want to look at http://support.microsoft.com/default.aspx?scid=KB;EN-US;q317109& for a better idea if what I stated was not clear
|
|
|
|
|
In NDoc there are some additional XML tags defined that are not know to the Visual Studio 2003. As I use the autocompletion of VS2003 often even for the XML tags I am looking for a way to extend the list of the known tags and their attributes.
Is there a way to extend the list, maybe with an add-in or by editing an schema file or ...
Thanks
Roland
Wenn der Computer wirklich alles kann, dann kann er mich mal kreuzweise.
(Manfred Schmidt)
Follow your Euro notes in their tracks
|
|
|
|
|
In richtextbox, how to find & replace a string such as notepad of window ?
|
|
|
|
|
Find first occurrance:
int idx = richTextBox1.Text.IndexOf("SearchText");
Replace all occurrances:
richTextBox1.Text = richTextBox1.Text.Replace("text1", "TEXT2");
mav
|
|
|
|
|
Hi,
I am making desktop application using C#
When the application starts it should find out whether the Excel has been installed or not in that particular machine
When my application starts it should search for
Excel9.olb -- MS Excel 2000
Excel.exe-- MS Excel 2002
Excel.exe -- MX Excel 2003
I have to use this product in both operating system MS Windows XP and MS Windows 2000.
Any body can give me idea
|
|
|
|
|
can u not just look for HKEY_CLASSES_ROOT/.xls
if you find it excel is installed
regs
g00fy
|
|
|
|
|
Does your program only have to find out whether Excel is installed or do you want to do anything with Excel, once it's found?
I'd assume the latter, so you could simply try to instantiate an Excel.Application object and see if you get the object.
Place the call in a try/catch and you'll get the correct object or a COM exception telling you that Excel isn't installed (correctly).
Regards,
mav
|
|
|
|
|
Hi Mav,
Thanks for your reply.
How will i know which version has been installed on the particular computer.
I need basically three given below for my product.
If some one has installed Excel 97 or other version it should says the message pls installed only three version of Excell 2000,2002,2003.
When my application starts it should search for
Excel9.olb -- MS Excel 2000
Excel.exe-- MS Excel 2002
Excel.exe -- MX Excel 2003
I have to use this product in both operating system MS Windows XP and MS Windows 2000.
Accoding to your answer does Com intialization code will work for all of Excel version
regards
sanjeev
|
|
|
|
|
Can anybody tell me how to connect to a *.dbf file?
I tried via odbc and oledb.
ODBC
Driver={Microsoft dBASE Driver (*.dbf)};DriverID=277;Dbq=" + txtbox_filepath.Text + ";"
DRIVER={Microsoft dBase Driver (*.dbf)};DBQ=" + txtbox_filepath.Text + ";DriverId=533;MaxBufferSize=2048; PageTimeout=5"
OLEDB
Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" + txtbox_filepath.Text + ";Extended Properties=dBASE IV;User ID=; Password="
I've tried different variations and google and msdn tell me nothing new.
(txtbox_filepath.Text gives the path to the file)
I only try to open it and close it, but it still fails. The error message is something like invalid path, but after double and triple checking this, Removing the path (leaving the filename) and trying to add the directory with the odbc sources (via administrative tools), it still doesn't work
I'm at a loss here, hope somebody can help me...
tnx.
No hurries, no worries.
|
|
|
|