|
See the post 6 below this one - how to protect application
Regards
Malc
*********************************************
|
|
|
|
|
I am working in VS2003 and I created a project which is properly installing, however I need to add 2 more files, but I need them to go directly to the c:\
Currently the setup package is placing those files inside the application folder.
Is this possible?
Thanks
|
|
|
|
|
hi.
i wanna execute a PHP file on a remote server in C# and retreive some data from that PHP file!
how can i do this?
thanks
asamay
-- modified at 21:08 Monday 9th October, 2006
|
|
|
|
|
Hi,
i haven't done anything similiar before but i'm sure you can do this with the System.Net.WebClient class. It provides methods like DownloadFile and ReadFile if i remember right. Executing a PHP file isn't anything else than doing a webrequest.
You will never see the php script code on a page (unless php does not work properly) - those scripts will be preprocessed. that means it generates an output which will be send to the one who did the request.
Hence you just have to "behave" like an internet browser and ask for the files.
Since i don't know how to use the webclient class i would suggest you to use google and learn something about it - i'm sure it's the solution for your problem
Good luck,
mik
|
|
|
|
|
thank you mik,
i will look at webclient class in google!!
asamay
|
|
|
|
|
Hi.
I'm looking to create an application which is able to dynamically update the display name depending on certain conditions.
I have looked around and there's alot of stuff on creating a new client but not much on interacting with MSN directly
Can anyone point me in the right direction?
Thanks
|
|
|
|
|
Two Questions:
1.) Does the image that you set the wallpaper to have to be a bitmap? I know that in the Display Properties you can select a number of different image types, but does Windows convert them to bitmaps before it sets the wallpaper? I ask because if I use a bitmap as the wallpaper I can change it fine, if I use a jpeg it doesn't work (just sets it to a gray background).
2.) Is there a more .NET'ish was to set the desktop wallpaper? I'm currently using P/Invoke with SystemParametersInfo to change it.
I guess that's three questions...Any help on this would be appreciated.
Thanks
- Aaron
|
|
|
|
|
1.) Yes it has to a bitmap and Windows converts pictures with another format into a bitmap before it sets them as wallpaper.
2.) AFAIK there isn't.
"Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning." - Rick Cook www.troschuetz.de
|
|
|
|
|
Thanks very much for the information.
- Aaron
|
|
|
|
|
I have an object class I need to compare for equality, but for which the greater/less than returns that IComparable uses to implement sorting are meaningless. Is there an interface that supports this comparison, or do I have to choose between abusing an existing one and rolling my own?
|
|
|
|
|
Unless you actually need to implement a specific interface, you could just override the == and != operators and the Equals method.
---
b { font-weight: normal; }
|
|
|
|
|
Thanks. I was overthinking the problem.
|
|
|
|
|
How can I protect my app in my computer ?
What I mean that how can I start my program
ONLY in my computer.
If someone else try to start the program in another
computer it will not start.
how can I know the unique id of my harddisk ??
and read it from my app .... ?
|
|
|
|
|
Use the network MAC address :-
ManagementClass oMClass = new ManagementClass("Win32_NetworkAdapterConfiguration");
ManagementObjectCollection colMObj = oMClass.GetInstances();
string macAddress = "";
foreach (ManagementObject objMO in colMObj)
{
if (objMO["MacAddress"] != null)
{
macAddress = objMO["MacAddress"].ToString();
break;
}
}
Is there a better, quicker way to get this anybody?
Regards
Malc
*********************************************
|
|
|
|
|
Mac addresses are changable. CPU(?)/mobo serials would be a better bet. You'll need to use WMI to get that sort of information.
|
|
|
|
|
Is there some reason the XML serializer doesn't support serializing a property whose type is an interface?
Is there some workaround to that, given that I WANT to serialize the property? A work around other than making an abstract class and using XmlInclude?
I don't know the concrete types to serialize, since the object I want to serialize can be defined in a different assembly, and I'd end up with a circular reference. Plus, I don't want to entangle the general purpose class I already have with application-specific implementations of objects that need to be serialized, hence the interface to begin with!
Marc
Thyme In The CountryPeople are just notoriously impossible. --DavidCrow There's NO excuse for not commenting your code. -- John Simmons / outlaw programmer People who say that they will refactor their code later to make it "good" don't understand refactoring, nor the art and craft of programming. -- Josh Smith
|
|
|
|
|
Marc Clifton wrote: Is there some reason the XML serializer doesn't support serializing a property whose type is an interface?
what is there to serialize? Generaly you serialize "data", an interface contains no data.
If you want the data resulting from some method of the interface to be serialized then you need to represent that as a property where the type would be like "string" or whatever. Then the implementation of the property would call the method of the interface to produce the data.
led mike
|
|
|
|
|
led mike wrote: Generaly you serialize "data", an interface contains no data.
Xml serialization supports serializing objects, not just value types, building an object graph. In this case, the interface is implemented by some classes that I want serialized. Why the serializer can't simply output the type information is beyond me.
Marc
Thyme In The CountryPeople are just notoriously impossible. --DavidCrow There's NO excuse for not commenting your code. -- John Simmons / outlaw programmer People who say that they will refactor their code later to make it "good" don't understand refactoring, nor the art and craft of programming. -- Josh Smith
|
|
|
|
|
Marc Clifton wrote: Xml serialization supports serializing objects
Well I hate to point out the obvious but an interface is not a concrete object. Another approach could be custom serialization. Not very difficult.
led mike
|
|
|
|
|
Hi,
first of all the serialization mechanisms of .NET don't serialize properties - they serialize fields. This is important because not everything which determines the state of an object is accessible via its public interface. Are you getting some kind of exception? If the property encapsulates a field it should work as long as the concrete class hanging in this field is marked with [Serializable].
Robert
|
|
|
|
|
Hi
i devlope a application in which i used a lot of png image files.i place the image folder ,where the exe is,.
this is also working in release mode .but whenever i place .exe file to desktop it demand for image folder.
i have to put image folder to destop.
How can i escape of putting the image folder to desktop.
Can i place all image file to solution explorer then what the path would if this time path is
btn_select_folder.BackgroundImage=System.Drawing.Image.FromFile(Application.StartupPath+@"\dbxpngs\002.png");
plase tell some solution
parshant
|
|
|
|
|
Why do you put the program on the desktop? Put a shortcut to the program on the desktop.
---
b { font-weight: normal; }
|
|
|
|
|
I don't know, but it seems the crystal reports doesn't like me or my computer or something, because I can't get the following simple scenario to work:
- I used strongly typed datasets in the application to build my model with
- I Added a couple of forms and used databinding to connect the datasets
This all works fine, so I created a crystal report to print some of the data.
It's a report with a parent child-relation in it, because I'm showing a delivery note with delivery items on it. I used the wizard, so I can assume that works out.
But when I run the app and try to print something using the report, I get an empty report from my printer. After two hours of searching and finding it out myself, I'm out of options.
The code to load and print the report is as follows:
Pakbon report = new Pakbon();<br />
<br />
report.SetDataSource(ds);<br />
report.PrintToPrinter(1, true, 0, 0);
WM.
What about weapons of mass-construction?
|
|
|
|
|
A short update on the problem.
I thought it had something to do with me using multiple related tables, but I was wrong. After trying one more time, this time with a single table for the report head and a single table for the report details, that didn't work out.
WM.
What about weapons of mass-construction?
|
|
|
|
|
Its weird, but I solved it. Crystal report doesn't seem to eat more than one table per report. So I created a view which merges the data from the different tables and used that in the report.
Now everything is fine and my shipping items are showing up in the subreport, but I still think it's weird that it isn't possible to use more than one table in the report.
WM.
What about weapons of mass-construction?
|
|
|
|