|
Hi,
I want to know which process had called my application built using C# .NET.
Example:
Their is an application named "Example1.exe" build using C# .NET. When you open the file manully by double clicking or by any other way then, "Explorer.exe" is the parent process of my application. In this case I want to find that "Explorer.exe" is my parent process. Please help me with the code which has to be placed inside the Main() method of my application (Example1.exe) to find this.
Normaly when it is double clicked this is not important but in case if my application is called by any other application then i had to work accordingly.
ashok
|
|
|
|
|
|
Hi all,
i am new in C# environment.
i try to create a desktop application.
i have 2 classes (form1 & createXML)
the form1 located a textBox that called txtPhoneNumber.
now, when the user will write his phone number the application will send him an SMS.
the problem is that the txtPhoneNumber.Text doesn't send the user number to the createXML class.
the XML is look like:
strBuild = strBuild.Append("<to>"); //Destinations
strBuild = strBuild.Append(inputForm.txtPhoneNumber.Text); //input from the form1 Class
strBuild = strBuild.Append("");
but in the debug i see that there is no number. and there is no any hint for error.
any idea?
please help!!!
|
|
|
|
|
i didn't ignore the HTML tags........
fixed XML builder:
strBuild = strBuild.Append("<TO>");
strBuild = strBuild.Append(inputForm.txtPhoneNumber.Text);
strBuild = strBuild.Append("</TO>");
|
|
|
|
|
Why dont you look into using system.data.datatable
you can add columns names and data etc.
then you can use datatable.writexml() to produce the file for you
Just a suggestion BTW
|
|
|
|
|
Hi, thanks for the fastest answer!!
i don't need to add columns or names, the single integer in the XML is the txtPhoneNumber.
the XML is ok, but he doesn't get the phone number integer.
|
|
|
|
|
should you have a number as an integer? you will lose a leading 0 with some numbers.
your 'To' is a column name, no?
|
|
|
|
|
How exactly is inputForm getting into the createXML class?
DaveBTW, 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)
|
|
|
|
|
namespace.TakeNumber inputForm = new TakeNumber();
then:
input get the txtPhoneNumber but without values......
|
|
|
|
|
Ido Shahar wrote: new TakeNumber()
That's why. It's an different instance so the new instance's txtPhoneNumber is empty
DaveBTW, 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)
|
|
|
|
|
o.k. got it! what an idiot i am. thank you so much!!
|
|
|
|
|
After a good deal of head scratching to the extent that I've now got a handful of splinters, I have now concluded it seems that Visual Studio 2008 does not like "#" characters in a project directory path. For example "D:\SwDev\C#\projects" is problematic however "D:\SwDev\CSharp\projects" is fine.
Specifically the problem occurs with Windows Presentation Foundation Designer in certain circumstances with where the XAML xmlns:customControl="clr-namespace: etc..." statement has been used to reference a library which has "#" in its path.
A brief sequence of my events follow...
Initially I had been working on a simple C# project which resided in a directory with a path such as "D:\SwDev\C#\projects\proj1", and all Visual 2008 tools seemed to be working well. I then created a Custom Control library by creating a new project with a path such as "D:\SwDev\C#\libs\myControls" - again all Visual 2008 tools worked well.
I then tried including my new controls in my main project. I did all the usual things such as adding a Reference to my library (from within the work bench), adding appropriate "using" lines to my cs files and adding the appropriate XML namespace statement to my main window's XAML file (e.g xmlns:customControl="clr-namespace:myControls;ssembly=myControls"). The result was that Windows Presentation Foundation Designer then put a red squiggly line under the new xmlns statement and suspended the graphical layout editor with a message saying that there were errors in the AXML which must be sorted before graphical editing can be resumed.
At this stage I found could successfully compile my main project with no errors, however the problem remained. It seemed that the main thing that did not work was the Windows Presentation Foundation Designer tool, but I also noted that the intellisense tool was not picking up the presence of my new library when entering the xmlns statement.
I eventually tried renaming my /C# directory to /CSharp and miraculously the problems disappeared .
Stephen Dickinson
Organised Technology Ltd
UK
|
|
|
|
|
Hi, I am working on a small prototype that does some business integration work.
Lets say I am developing 2 application. Each of the application is installed on SEPERATE PC in the SAME network.
The first application :
Have a interface with fields like PO_Number, PO_Date, Seller_ID, Buyer_ID, and a Generate Button
When the 'Generate' button is clicked, a XML file is being created with all those information stored inside. After the file is being created, I wan it to store somewhere whereby another PC running my 2nd application can automatically retrieve it without using a thumbdrive to copy the created XML file over.
The second application :
This application will then use some communication mechanism(FTP??) to retrieve the file created in the first application. This application will then read the content in the XML file that is being retrieve and store it to the database.
Problem
What mechanism can i use so that the file can be transfer over without using a thumbdrive and loading in manually? Can you provide me with some resources or code to help me get started with this
Thanks alot
|
|
|
|
|
why dont your first app FTP the file to the server then the second app can use a file listener to detect the upload (or something like that) i think your second app will need to be on the server thou.
Of course you could create a server app, that the first app connects to and sends the file to, then it can handle however it wants.
why not just write straight to a database?
|
|
|
|
|
Can i install a FTP server software on the First application PC and the IP will be localhost
Then for the second pc, the ip address to connect to the first application will be the first pc IP, example 192.168.1.5(first pc IP)
|
|
|
|
|
|
BTW you should be able to just enable the FTP service in windows (if your running, of course) rather than install ftp server software
i.e.
Add/Remove Programs -> Add/Remove windows components -> Internet Information Services (IIS) -> FTP Service
you may need operating installation disk thou
|
|
|
|
|
Okay thanks will check that out
|
|
|
|
|
Imho, the easiest way to do this would be to use a shared network folder. The 2nd app can watch for changes to the shared folder and read the file when it appears.
/ravi
|
|
|
|
|
You could use WCF and transfer the file in chunks.
"Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997 ----- "...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001
|
|
|
|
|
hi everyone,
as long as the Vnc project is free src, i have searched the web for vnc server and vnc client(viewer). i have found sth for Vnc server at VnC#(http://cdot.senecac.on.ca/projects/vncsharp/index.html) but this is only the viewer, i found the code for vnc server but it is in C++, can any one converts it?or know how to convert it? or know where to find the vnc server code in c#!??
|
|
|
|
|
Did you manage to find a C# library or something for a vnc server?
|
|
|
|
|
Hey, if you get the c# code for this, appreciate if you could pass it on. Got to do a project at work involving this.
Thanks
Paul
|
|
|
|
|
|
Hi guys..Have you found something about this?..Please help me
|
|
|
|