|
Thank you, pramodhegde88! It worked perfectly. 
|
|
|
|
|
Better use Microsoft Visual Studio. If you don't want to purchase a full version, you can get the "Express" edition for free. Just use the "Build" menu.
|
|
|
|
|
You're right. That happened because I was following a tutorial that does not use Visual Studio.
Thank you
|
|
|
|
|
When you're compiling a C# application or library, you have to include all the files you want to be compiled into the assembly.
If you want both of these files in the same assembly:
csc *.cs /out:TestaCliente.exe
or
csc TestaCliente.cs Cliente.cs
If you want a separate .dll for the first class, you can first create that with
csc /t:library Cliente.cs
... and then reference it like
csc TestaCliente.cs /r:Cliente.dll
In general, though, it makes more sense to use an IDE to manage your files as a project. I recommend SharpDevelop.
Edit: An IDE will do exactly the same thing, but it will construct the command for you even when it gets very complex, chain builds together for multiple assemblies and so on.
|
|
|
|
|
|
In SQL Server Integration Services (2008) I have a created a task script using C# that converts Microsoft Project (2010) MPP files to an ASCII text CSV format. The problem I have encountered is that because some of the files still have their macros enabled, the process stops and presents a window asking whether to "Enable" or "Disable" the file's macros. Because multiple files are being automatically processed, I need to set in the C# code a default of disabling all macros.
Does anybody know how to do this?
I tried the following, but couldn't get it to work because it would not recognize the "AutomationSecurity" item under Application. It returns the message: 'System.Windows.Forms.Application' does not contain a definition for 'AutomationSecurity'.
Application.AutomationSecurity = Microsoft.Office.Core.MsoAutomationSecurity.msoAutomationSecurityForceDisable;
Here are the references being applied at the top of the class file.
using System;
using System.Drawing;
using System.Collections;
using System.ComponentModel;
using System.Windows.Forms;
using System.Data;
using System.IO;
using Microsoft.Office.Core;
using MSProject = Microsoft.Office.Interop.MSProject;
Thanks.
The science of business is the science of service, to this end it is better to do more than you promise than to promise more than you do.
modified 23-Aug-12 17:37pm.
|
|
|
|
|
Read the message. Application is being resolved to System.Windows.Forms.Application. I suspect you are trying to interact with an instance of some other application class you've instantiated through interop.
|
|
|
|
|
Once the C# class files were pulled over and fully applied in the SSIS Task Script, the popup box requesting to either Disable or Enable macros no longer appeared. There is no code in the Task Script for disabling the macros.
This is no longer an issue.
|
|
|
|
|
Hi I am new to active directory. I have an application in c# and want to use active directory login dialogbox in the application. I saw lots of code everywhere. Want to know how the login screen will popup. Is it automatic if you call code below?
DirectoryEntry userEntry = new DirectoryEntry(users.Path, LDAPUser, LDAPPassword);
ADUserDetail userInfo = ADUserDetail.GetUser(userEntry);
userlist.Add(userInfo);
}
directorySearch.Filter = "(&(objectClass=group)(SAMAccountName=" +fName + "*))";
SearchResultCollection results = directorySearch.FindAll();
Thanks in advance,
Sai
|
|
|
|
|
The code you have would be used to validate the entry a user has made in a login dialog, but you still have to show the login dialog before you can call this code.
I wasn't, now I am, then I won't be anymore.
|
|
|
|
|
Where can I find the log in dialog call. It is a windows c# applicatin.
Thanks,
Sai
|
|
|
|
|
There isn't one by default. You have to create it. (at least that is the case in Windows.Forms) If you are using WPF, I'm not entirely sure if there is a prebuilt component you can use.
I wasn't, now I am, then I won't be anymore.
|
|
|
|
|
Thanks,
So I have to create a login form using buttons and textboxes and then use the active directory code to verify the user?
Thanks,
Sai
|
|
|
|
|
correct.
I wasn't, now I am, then I won't be anymore.
|
|
|
|
|
Thank you .
|
|
|
|
|
How can I use WPF? I heard the name before. What is Active Directory Common Dialog and DirectoryObjectpickerDialog?
Thanks,
Sai
|
|
|
|
|
Those won't be what you want. If your application isn't already WPF you can't just use it. You would have to create a new project in WPF then.
Since you are using WinForms, you'll have to create a login dialog from scratch.
I wasn't, now I am, then I won't be anymore.
|
|
|
|
|
Hi Friends
I Want to Learn How to make Electronic Gadgets.
Currently I am developing ERPs using .Net2010 in C#.
I want to know from where, I should start.
Thanks..
Er. Varinder
|
|
|
|
|
Member 7820220 wrote: Electronic Gadgets
Sorry I am not seeing the connection between you wanting to create electronic gadgets and this being a programming site....
[Edit]
Check out
www.ghielectronics.com[^]
Why is common sense not common?
Never argue with an idiot. They will drag you down to their level where they are an expert.
Sometimes it takes a lot of work to be lazy
Please stand in front of my pistol, smile and wait for the flash - JSOP 2012
modified 23-Aug-12 9:55am.
|
|
|
|
|
Any 'gadget' that is advanced enough that you can program on it will be using embedded C (possibly C++), not C#.
|
|
|
|
|
BobJanova wrote: embedded C (possibly C++), not C#.
Not necessarily true. GHIElectronics, www.ghielectronics.com, manufactures a microprocessor that uses the .NET compact framework and you can program them in C# or VB.NET. WPF if you use a touchscreen.
[Edit]
Granted anything that he does professionally with probbably be C.... but for a hobby project GHI might be just the thing he is looking for.
Why is common sense not common?
Never argue with an idiot. They will drag you down to their level where they are an expert.
Sometimes it takes a lot of work to be lazy
Please stand in front of my pistol, smile and wait for the flash - JSOP 2012
|
|
|
|
|
Hm, interesting. I thought that chips wanted to keep the environment down as much as possible, and even the Compact Framework is a lot bigger than a C-capable device.
|
|
|
|
|
BobJanova wrote: environment down as much as possible
That is true. But it's a very cheap way for a hobbyist to get into that arena. Which is the market I think that they go after. I know that the processors that we used in my previous life were cheap and all that but oh my lord how they raped you on the price for the programming tools and the interface.
Why is common sense not common?
Never argue with an idiot. They will drag you down to their level where they are an expert.
Sometimes it takes a lot of work to be lazy
Please stand in front of my pistol, smile and wait for the flash - JSOP 2012
|
|
|
|
|
And countered.
Why is common sense not common?
Never argue with an idiot. They will drag you down to their level where they are an expert.
Sometimes it takes a lot of work to be lazy
Please stand in front of my pistol, smile and wait for the flash - JSOP 2012
|
|
|
|
|
You've posted your message to C# Forum then ask us "not C#".
Maybe C/C++ forum was more helpful.
Meysam
|
|
|
|