|
Aalst wrote:
They could have done away with EventHanlders all together, and just have the event use the += operation on the method directly, and -= on the method directly.
But an eventhandler is a delegate which in turn is really a function pointer, thats why u need new EventHandler(MyHandlingfunction) to create a pointer to the function handling the event.
Im not gonna make a big point but, C# is not MS Java (it mite look and feel like it), so there is no point comparing, if you dont like the way C# works use Java or even J# (all of .Net plus most of Java)
MYrc : A .NET IRC client with C# Plugin Capabilities. See
http://sourceforge.net/projects/myrc for more info.
|
|
|
|
|
i am tring to develop an application which can install any type of software on any platform with out user interaction in dot net.
First of all my application will learn all events and messages at least one time then it will perform the task on the network on any computer.
is it possible?
if yes how?
can some one provide the helping metrial and links about that?
r00d0034@yahoo.com
|
|
|
|
|
First of all, make sure your not re-inventing the wheel.
There are currently some commercial products:
InstallAnywhere Zero G (Java based)
JExpress from DeNova (Java based)
And an open source projects:
InstallBase MPI (C & TCL based)
I am sure there are more of these in each area, this is all I could remember quickly.
Also C#/.NET really is not the best language to write cross-platform software yet. Unless you are talking across multiple Windows platforms since Windows is the only OS that has full support for the .NET Framework at this time. There is a UNIX/Linux port in process called the Mono Project. However they have a lot of work to do still before it is finished. I have not heard anything about a MAC .NET Framework yet.
Right now the only true "write once, and run 'almost' anywhere" is Java. C/C++ is also good if you stick to ANSI standards, and keep any platform specific code modular. Then you have pretty much "write once, and compile many times, then run on those compiled platforms". Other than C/C++ or Java there is not popular cross-platform language right now.
So if you have looked at those products and your idea has something they done, either open source versions of the commercial ones, or some newer or better than the existing open source ones. I would say go for it in Java or C/C++.
If not, then you may want to just use one of the ones listed or if you do some searching you may find more that are even better than those.
And remember -- Anything is possible, if you don't give up.
Aalst
|
|
|
|
|
|
imran_rafique wrote:
i am tring to develop an application which can install any type of software on any platform with out user interaction in dot net.
Have fun.
What is the end purpose here? Are you looking to create a marketable product or just for personal use?
If marketable, you have a lot of competition out there. Microsoft's SMS allows a fair amount of remote installing (sit in one console and install all over a network, regardless of OSs). PC-Duo Enterprise (formerly LANutil) has been getting some rave reviews lately as a cheaper, more powerful alternative (I should know, I work for the company that writes it) and will soon be available as an MMC plug-in.
Then there's a LOT of cheap alternatives for smaller companies and individual use (that is, products that do the job you're talking about without the inventory and other functionality offered by PCDE or SMS), several listed by the previous poster.
Also: The first thing we're bearing in mind before considering a .NET conversion is that .NET doesn't work on Win 95, so you've already discounted that option once you look at C#.
Finally, pay a lot of attention to Windows Installer which is doing the job automatically and an increasing number of companies are already picking up on it (we are, despite the fact that it threatens to drive us out of business in the long term!).
Just a few comments for you there, not to discourage you (we're not afraid of healthy competition) but to say "ask yourself the question: why are you doing it? Then research the available products (some of which will be converting to .NET a lot quicker than you can start from scratch) because the effort will be huge and you're not the first to think of it!"
If it's just a personal project, for learning C#, think of something more simple to do first .
Paul
|
|
|
|
|
thanks
let me tell u why i am doing this.i am doing mine final project of MCS.
can u provide the links related to these type of application and available products so that i can study them.
Because i want to do it as fast as possible.
plz provide links if u could?
|
|
|
|
|
You can find PC-Duo Enterprise at
http://www.vector-networks.com[^]
There's a 30-day trial download which includes all sorts of different things, if you look at the product properly you might even find something easier to emulate. Software Distribution is the bit you're looking for though.
I'm sure you can find SMS at Microsoft's site, but I don't know any more than that. You can also find info on Windows Installer there.
Not sure where you'll find the smaller products but I would advise looking for them, there's probably something much more simple to base your ideas on.
Looking at
http://www.installshield.com
http://www.installsite.com
may be useful to you also.
Paul
|
|
|
|
|
thanks
i am doing it as mine final project of MCS?
r00d0034@yahoo.com
|
|
|
|
|
when i use that function (AfxGetInstanceHandle())in managed class i got an exception i do not know how to handle it.
how to sue it in managed vc++ code ?
how to sue it in c# code ?
plz help me.
r00d0034@yahoo.com
|
|
|
|
|
How can I have propertypage or propertysheet in C#?
Mazy
"If I go crazy then will you still
Call me Superman
If I’m alive and well, will you be
There holding my hand
I’ll keep you by my side with
My superhuman might
Kryptonite"Kryptonite-3 Doors Down
|
|
|
|
|
I'm trying to change the timeformat to be based upon frames instead of time. I've read everything I could but I don't know how to create a proper GUID to give the mediaSeek.SetTimeFormat(ref System.Guid pFormat) function.
Can anyone help?
the GUID is: TIME_FORMAT_FRAME
|
|
|
|
|
I have a server that accepts a socket connections and accepts authentication requests in a specific protocol. I want to use this for an ASP.NET authentication. How can I make my ASP.NET app maintain a single connection to this auth server and send authentication requests to it?
I mean a COM object does not seem to be the right way anymore. What is the preferred .NET way of implementing this?
Thomas
modified 29-Aug-18 21:01pm.
|
|
|
|
|
I have a Control library that works fine when referenced between projects. But I created an install for the control library which deploys the Interop.SQLDMO.dll and SQLServerControls.dll (my output). The SQLDMO.dll (and references) are already installed, yet when I attempt to use or reference the SQLServerControls controls in a project that uses the installed dll it gives me a "file assembly Interop.SQLDMO, or one of its dependencies, was not found." I have validated that everything is there. I have also tried deploying the sqldmo.dll and sqldmo.rll files with the setup but to no avail. If anyone has any ideas I'd love to here em
|
|
|
|
|
Hi,
how to put a Text File into a Assembly as Resource, get this resource from assembly at runtime and write this file back to harddisk ?
.:Greets from Jerry Maguire:.
|
|
|
|
|
Step 1: Embedding a resource into your assembly
If you are using VS.NET simply add the text file to the project and in the properties for the file, set the Build Type to Embedded Resource.
If you are using the command line compiler add the following to your existing command line csc command.
/resource:mytextfile.txt,Name.You.Want.The.File.To.Have.In.The.Assembly.txt
Step 2: Getting a Stream object to your file
In Step 1 you either chose a name for the file or VS.NET created one for you. VS.NET names embedded files with this format: DefaultNamespace.Folder.Filename.ext if you just have the file sitting in the root of the project directory then it will just be DefaultNamespace.Filename.ext
First you need a reference to the Assembly object containing the file; this is usually done by getting a Type object for one of the classes in the assembly.
Assembly asm = typeof(MyClassInAssembly).Assembly;
Now that you have the assembly, you can get a Stream object for the file
Stream stream = asm.GetManifestResourceStream("name of my file in assembly");
Now that you have the stream you can do whatever you want with it; in your case you probably want to open up a FileStream and proceed to read the contents of stream and write them to the new FileStream.
HTH,
James
"And we are all men; apart from the females." - Colin Davies
|
|
|
|
|
I want to read Image field from my dataset and create Bitmap object and show it.I use this code:(Northwind database in Access)
int i = myDataGrid.CurrentRowIndex;
byte[] b = (byte[])dataSet11.Tables["Employees"].Rows[i]["Photo"];
if(b.Length > 0)
{
System.IO.MemoryStream stream = new System.IO.MemoryStream(b, true);
stream.Write(b, 0, b.Length);
Bitmap bmp = new Bitmap(stream);
if( bmp.Width > 500 && bmp.Height > 300)
.
.
.
But at the lone Bitmap bmp = new Bitmap(stream); this unhandled error happend:
Invalid parameter used.
Any idea?
Mazy
"If I go crazy then will you still
Call me Superman
If I’m alive and well, will you be
There holding my hand
I’ll keep you by my side with
My superhuman might
Kryptonite"Kryptonite-3 Doors Down
|
|
|
|
|
the Stream is an abstract base class. Whenever you want to use a stream, any type of stream i think your supposed to do this.
Stream stream = new MemoryStream(...);
try that.
Email: theeclypse@hotmail.com URL: http://www.onyeyiri.co.uk "All programmers are playwrights and all computers are lousy actors."
|
|
|
|
|
Nope.That does not help.
Mazy
"If I go crazy then will you still
Call me Superman
If I’m alive and well, will you be
There holding my hand
I’ll keep you by my side with
My superhuman might
Kryptonite"Kryptonite-3 Doors Down
|
|
|
|
|
i just looked it up in msdn, but the constructor u are using requires that you have two parameters:
new Bitmap(Stream s, bool useColorCorrection)
the constructor you are using does not exist, thats why u get the error. try this.
new Bitmap(stream, true);
if that doesnt work, then i haven't got a clue what to do.
Email: theeclypse@hotmail.com URL: http://www.onyeyiri.co.uk "All programmers are playwrights and all computers are lousy actors."
|
|
|
|
|
Thank you friend.I solved it.See the below replies.
Mazy
"If I go crazy then will you still
Call me Superman
If I’m alive and well, will you be
There holding my hand
I’ll keep you by my side with
My superhuman might
Kryptonite"Kryptonite-3 Doors Down
|
|
|
|
|
The byte array held in an Image in Access doesn't appear to be strictly the same format that you'd use in the stream.
When I used the example in this article:
File Upload in ASP.NET[^]
to upload pictures to my web site, I noticed that Access couldn't recognise that they were actually images, it just saw them as Byte arrays.
Paul
|
|
|
|
|
So couldn't you find any solution for it?
Mazy
"If I go crazy then will you still
Call me Superman
If I’m alive and well, will you be
There holding my hand
I’ll keep you by my side with
My superhuman might
Kryptonite"Kryptonite-3 Doors Down
|
|
|
|
|
Well... the solution for me was to upload it to the database using exactly the opposite code I used to download it from the database. ie. insert the picture as-is into an OLE object. It can't be read as a graphic by Access, but you can use the code you have to download it.
But if the picture is already in Access then you can't do that.
The alternative is to figure out what is different between the byte array you read from the database and the stream you're trying to create and adjust it.
One idea is to upload a picture to a database then write a piece of code to upload the same image as a byte array. Then write another piece of code to download both and compare the arrays.
Once you've done that, let us know what the difference is
|
|
|
|
|
pdriley wrote:
One idea is to upload a picture to a database then write a piece of code to upload the same image as a byte array. Then write another piece of code to download both and compare the arrays
Well,I do it for myself too.
pdriley wrote:
The alternative is to figure out what is different between the byte array you read from the database and the stream you're trying to create and adjust it.
I begin to try to figure it out.If I find it I'll tell you.
Mazy
"If I go crazy then will you still
Call me Superman
If I’m alive and well, will you be
There holding my hand
I’ll keep you by my side with
My superhuman might
Kryptonite"Kryptonite-3 Doors Down
|
|
|
|
|
Yohooooooooo,I found it.
When you insert bitmap from Access,it insert some extra byte at the beginning of array bytes.It insert exactly 78 bytes.So when you read them from your application you have to read from byte nember 78 to the end.Then it will be OK.
But don't forget its only when you insert BitMap Object from Access,not from your program.This number maybe different for different kind of data.
Mazy
"If I go crazy then will you still
Call me Superman
If I’m alive and well, will you be
There holding my hand
I’ll keep you by my side with
My superhuman might
Kryptonite"Kryptonite-3 Doors Down
|
|
|
|