|
My database is SQL Server 2000.
Thanks to all answer & suggestion.
Future belongs to C#!
|
|
|
|
|
|
How do I make my windows forms run a html page? Thanks!
"To teach is to learn twice"
|
|
|
|
|
Add a COM component name axWebBrowser . For more information about how to use it search this site.
Mazy
No sig. available now.
|
|
|
|
|
How do I transfer files across a network? Does anybody know how? Please help!
"To teach is to learn twice"
|
|
|
|
|
1. Create a share on the target system, and use two FileStreams (one for a file on the local system, the other for a file on the target system) to copy the data over.
2. Use sockets and have a sending application on the source system and a receiving application on the target system. Obviously the target app has to be installed and running before this will work.
3. Use .NET Remoting instead of sockets. Again the target app needs to be installed in the target system.
I'm sure that there are other ways, but that'll get you started.
Cheers, Julian
Program Manager, C#
This posting is provided "AS IS" with no warranties, and confers no rights.
|
|
|
|
|
I'm currently learning C# and Visual Studio and have run into this problem.
I'm reading Petzold's "Programming Windows with C#" and am working with two classes, both of which have Main() methods.
The second class, CsDateInheritance, is an inherited class of the first, CsDateConstuctors, and I want the program to use the Main() method of the second class, CsDateInheritance.
If using a DOS command line, the program can be complied as such:
<br />
C:\(rootfolder)>csc CsDateInheritance.cs CsDateConstructors.cs /main:CsDateInheritance <br />
<br />
Microsoft (R) Visual C# .NET Compiler version 7.10.3052.4 <br />
for Microsoft (R) .NET Framework version 1.1.4322 <br />
Copyright (C) Microsoft Corporation 2001-2002. All rights reserved. <br />
<br />
C:\(rootfolder)> CsDateInheritance.exe <br />
Birthday = 21 Aug 1981 <br />
Today = 24 Aug 2003 <br />
Days since birthday = 8038 <br />
<br />
C:\(rootfolder)>_<br />
Program works perfectly.
Though, I want to be able to run/debug this program in Visual Studio .NET 2003. I'm using the C# Standard Edition.
I have the first class file inserted into the solution as a linked file.
When I compile in VS .NET, I get a "this program has more than one entry point defined" error. How can I fix this in VS .NET, without having to compile from the command line?
I have found that I can set the Main() method of CsDateConstructors "IsShared" value to false, and I get a clean build. Though, this sets the class to basically be "Inheritable" only, and not stand alone.
Anyone know the trick? All help/suggestions welcome.
Joe
realmrat@msn.com
|
|
|
|
|
Problem solved. Thanks to ericgu @ experts-exchange
You can set this in the project properties.
Look for the "startup object" setting, and enter the name of the class that the Main() method is in.
Joe
realmrat@msn.com
|
|
|
|
|
I'd be pleased if somebody could help me on these:
1. OnStart() event get a string[] argument. From where I can send these argument to the service,the service start on start up,so what are these commands for?
2. Some services only run when admin logged in, how can I do it too?
Mazy
No sig. available now.
|
|
|
|
|
1. The string[] contains arguments passed from the command line. If the service starts automatically or is started by teh control manager, there are no arguments. But you can enter commands like "start [service_name] -install".
2. Alter the service, or become an admin
Which srvice do you want to start?
|
|
|
|
|
Thanks for your reply.
Corinna John wrote:
Which srvice do you want to start?
I don't want anything with standard services.I want my service only run when admin login.Just curious to know how to do it.
Corinna John wrote:
But you can enter commands like "start [service_name] -install".
But where is its argumennt.It install the service,ya?
Mazy
No sig. available now.
|
|
|
|
|
1. You can check in the OnStart-Method, whether the active user is in the Administrators-group (start) or not (cancel).
2. -install is only one possible argument. You can pass all arguments you like, if you start your service using the start command instead of the service control manager.
|
|
|
|
|
Well, thank you Corinna. Just one more question. How can I stop service programically inside the service.I know I can do it with ServiceController but is it the way you do inside service too or not?
Thanks
Mazy
No sig. available now.
|
|
|
|
|
You couldt throw an exception in OnStart, but this is not a very clean way.
I haven't tried yet, but
ServiceController sc = new ServiceController(serviceName);
sc.Stop(); sc.Close();
shouldt work from inside the service.
|
|
|
|
|
I'm trying to figure out how to read in an excel file then put some extra values in the spreadsheet. The problem I have (I looked up in the msdn and they gave me "Driver={Microsoft Excel Driver (*.xls)};DBQ=Excel test.xls" for a connect string. The problem is when I run it it tells me I need to put a Provider= in it. That would be great if I could find the string for the provider. I'm working with Office 2000 and office xp.
another question is would Crystal Reports be better to use? I'm not doing any major manipulation of the spreedsheets I'm just reading them in to find where to put the data so I don't overwrite anything and then inserting some rows and colums.
Thanks for the help.
|
|
|
|
|
Is it possible to insert a WinForm in a WebForm?
I'd like for example to insert a managed directx viewer in a webform,
that would display 3d graphics on the form?
Is this possible?
Regards,
Z.
|
|
|
|
|
|
leppie wrote:
hosting the Runtime in IE
I thought IE already does that .. ?
Is this the same as the gotdotnet workspace source control(it looks / behaves similar to an embedded activex control), another doubt is how does this differ from href exes (like chris sells Wahoo! which pops as a separate app)
thanks,
Kannan
|
|
|
|
|
Kannan Kalyanaraman wrote:
I thought IE already does that .. ?
Not without intervention. There is a huge section in MSDN.
leppie::AllocCPArticle("Zee blog");
|
|
|
|
|
I have program like this:
private void pictureBox1_MouseDown(object sender,
System.Windows.Forms.MouseEventArgs e)
{
pictureBox2 = new PictureBox();
Bitmap img = (Bitmap)Bitmap.FromStream(this.GetType
().Assembly.GetManifestResourceStream("Program.kolko.bmp" ) );
this.Controls.AddRange(new System.Windows.Forms.Control[] {this.pictureBox2});
pictureBox2.Image = img;
pictureBox2.Location = new System.Drawing.Point(e.X, e.Y);
pictureBox2.Size = new System.Drawing.Size(28, 28);
pictureBox2.SizeMode = System.Windows.Forms.PictureBoxSizeMode.AutoSize;
pictureBox2.TabIndex = 1;
pictureBox2.TabStop = false;
}
I want to add a button to my Form, that OnClick will delete all instances of PictureBox2 from Form (will clear my form from Pictureboxes). I don't know how do it.
|
|
|
|
|
1. Search this.Controls for PictureBoxes objects (on types, names, images etc. properties) in for loop and delete them.
2. Create ArrayList (like Controls) and store PictureBoxes into it while creating them and next delete all (without searching) in button OnClick().
Zdrufko,
AW
|
|
|
|
|
Dziekuje bardzo za pomoc panu
|
|
|
|
|
|
|
Hey Leppie,
How are you going with that MSIL addin for #D?
Cheers,
Erick
|
|
|
|