|
How to do it that include a exe file In a project? I have some method in a exe file.but I want to use them in another project.Can do ti? How to do it?
|
|
|
|
|
hi there,
u cannot include an exe file as reference an dll. But u can reuse methods in exe file by executing it from ur application
<< >>
|
|
|
|
|
In .NET, you can reference .exe files just like you do with .dll files.
|
|
|
|
|
But you have to note that you can't add the reference with VS.NET, as only DLLs are selectable as assembly references.
But if you simply rename the EXE to DLL, it can be referenced without problems.
Regards,
mav
|
|
|
|
|
Hi
I want to make a windows application conditional in following way:
If I start the application without parameters, then it should start as a windows application
If I start it with parameters, it should run as a console application.
Currently I solved it by creating a console application and check the input parameters. If no parameters are given, it starts a windows.forms class. This works perfectly - almost.
The problem is, that if it runs as a windows application, it starts also a dos box, which I would like to have prevented. Now the question is: How can I start the windows application conditional without the dos box?
Thanks Fredy
|
|
|
|
|
One simple solution may be like this:
1. Make a skelton wrapper application (which should preferrably be a console application), which should have a very simple main method to call or execute the relevant application.
2. So, in the wrapper application's main method, check for parameters and start the windows application or the console application, as the case may be.
3. Immediately after the second step, the skelton wrapper application may exit.
Although there may be some better methods, but this simple solution may work too.
Regards,
Ashok Dhamija
_____________________________
Padam Technologies
|
|
|
|
|
|
i've made a simple (System, IO, Collection) console .exe and given to a friend has Windows XP Home.
if he tries to run gets a runtime error.
why?
|
|
|
|
|
Sasuko wrote:
i've made a simple (System, IO, Collection) console .exe and given to a friend has Windows XP Home.
if he tries to run gets a runtime error.
why?
What is the runtime error message?
Does the XP home machine have the same version of the .NET framework as your application is compiled against?
Michael
CP Blog [^] Development Blog [^]
|
|
|
|
|
no, he hasn't any version of the .NET framework.
I thought for console applications it wasn't need but just for windows application.
Do i need to create a setup solution so... isn't it?
Anyway how can i add to my setup solution the newest framework?
|
|
|
|
|
Without the .NET framework, a .NET application will not work on a machine. Your setup program can ask a user to download .NET framework (1.1) from Microsoft site from address http://www.microsoft.com/downloads/details.aspx?FamilyID=262D25E3-F589-4842-8157-034D1E7CF3A3&displaylang=en[^] if it is not found on his machine.
Adding the redistributable .NET framework in your setup itself is not advisable due to its size of about 22 MB. But, if you have to consider it, then in your setup project in the VS-IDE, under the "Detected Dependencies" node, find the "dotnetfxredist_x86.msm" entry. Right-click on this and remove the check-mark from the "Exclude" property. It should do the trick and the .NET framework may get included in your setup project.
Regards,
Ashok Dhamija
_____________________________
Padam Technologies
|
|
|
|
|
hi there ,
i have a C# Form in VS.Net and i am working whit Sql DB now i have datagrid on my Form
i want to see all the orders From date 1 to date 2
Sample :
show me all the orders from : 01/09/05 to 09/09/05
and i all geeting the data and everything is fine.
whan i want to print this report iall get all of the orders beetwen the 2 dates .
i want to see also the dates that i typed in the Form how can i do it ?
in the opper report i want to see it like that
this is the orders beetween 01/09/05 to 09/09/05
how can i pass this dates from the Form to the report ?
thanks aloot....
|
|
|
|
|
I have a class with two integer properties.
An array of this type is assigned to a DataGrid as DataSource.
I have a Hashtable, which contains the textual representation of the integer properties of the previous array.
How can I make grid to show these textual values instead of numbers if the first array is assigned as DataSource?
-- example:
<br />
public class Book<br />
{<br />
private int bookID;<br />
private int amount;<br />
<br />
public int BookID { get { return this.bookID; } }<br />
public int Amount { get { return this.amount; } }<br />
}<br />
<br />
<br />
private void InitGrid()<br />
{<br />
Book[] books;
books = GetBooks();
<br />
Hashtable bookTitles = new Hashtable();<br />
bookTitles.Add(17, "Jungle Book");<br />
bookTitles.Add(38, "Another Book");<br />
<br />
this.dataGrid1.DataSource = books;<br />
<br />
}<br />
|
|
|
|
|
Well Dear!
i have a problem. i have to set the scren resolution ,monitor refresh rate of three monitors(Dual Display) @ same time with win xp sp2 in c#. I m using a Win32 API function EnumDisplay Settings to get all the display modes that the VGA cards support then i Call ChangeDispaySettings API function to change the resolution . but when i change all monitors display to one resolution any one of them flickers may be due to refresh rate settings. i want to know how to select the best display setting and refresh rate programatically so as my screen doesnt flicker without restarting the system. waiting reply anxiously
I M new in .net p
|
|
|
|
|
AFAIK, you can't. How is the application going to "see" if the flicker is acceptable to you or not?
You can enumerate all the modes that the video card supports. You'll have to check to see if that includes the refresh rates that are supported too. You might have to interrogate the monitor driver to see what refresh rates are supported (I have no idea how to do this!)
Then it's a matter of selecting the best rate. I don't see how you could possibly do this in code. My Mitsubishi DiamondPro can handle refresh rates up to 120Hz at 1360x768, but that doesn't mean it looks good doing it!
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Hi,
I wonder could anyone help me. Basically, I need to use reflection to get all the classes, methods and parameters of an assembly which im going to use to output NUnit tests. Problem is for some reason when i call Type and MethodInfo i get all the information no problem, when i try to call ParameterInfo for a given Method it's giving me a System.IO.FileNotFoundException. I can see nothing I'm doing differently for ParameterInfo. These things always end up being something silly, you anyone sees what im doing wrong please point it out, Thanks
The error seems to occur on m.GetParameters() by the way.
foreach(Type t in mytypes)
{
OutputLabel.Text += "CLASS: " + t.Name + System.Environment.NewLine;
MethodInfo[] mi = t.GetMethods();
foreach(MethodInfo m in mi)
{
OutputLabel.Text += "-- Method: " + m.Name + System.Environment.NewLine;
foreach(ParameterInfo p in m.GetParameters())
{
OutputLabel.Text += "Parameters: " + p.Name + System.Environment.NewLine;
}
}
}
|
|
|
|
|
My bad, a mistake in my references, sorry for wasting time
|
|
|
|
|
Please help me out with this problem using C# programming:
using my method(GetData) , i have to locate and read an xml file.After reading from the file,i have to search the value of an element in that file.
Then i have to get the data corresponding to that element value in string format.This data will also include the type of value object.Then deserialize that string into valueobject.Return the valueobject.
kindly mail the solution to my mail id saptarshi_basu@infosys.com as i dont have internet connection.
|
|
|
|
|
Hi,
I need to send a request to a server (a XML file or stream) and recieve a response to that request.
Now I know that there are WebRequest (or HttpWebRequest) and WebResponse, but with them I can only use e.g. WebRequest.Create("http://www.google.com") and recieve the response.
What I need is where I can specify the URL, send data to that URL and recieve a response.
Can anyone help me?
Regards
|
|
|
|
|
You specify the url when you create the WebRequest object.
The data that you send has to be a proper request, in order for the server to recieve the data at all. Send the xml as a value in a field in the form data in the request.
The response that you recive from the WebRequest will be exactly what the server returns.
---
b { font-weight: normal; }
|
|
|
|
|
Guffa wrote:
Send the xml as a value in a field in the form data in the request
Sorry for the stupid question, but how do I do this? I can't find any proper functions in WebRequest for putting values to the request...
Regards
|
|
|
|
|
The GetRequestStream property returns the stream object that will be used to send the request stream. Put a key in front of the value and htmlencode it.
theStream.Write("code=" + Server.HtmlEncode(theXml));
---
b { font-weight: normal; }
|
|
|
|
|
Ok, that worked. Thank you
|
|
|
|
|
plz help me how to add comboBox in datagird.
|
|
|
|
|