|
Thanks.
I had that one nailed down, but I felt an urge not to use it. Every time I see P/Invoke-stuff, I feel a cold chill running down my spine.
--
Kein Mitleid Für Die Mehrheit
|
|
|
|
|
I don't know any alternative, some holes in .NET need to be filled with P/Invoking old stuff. I just keep those in a separate class of mine.
Luc Pattyn
Local announcement (Antwerp region): Lange Wapper? Neen!
|
|
|
|
|
I AM NEW IN WINDOWS SERVICES. I AM CREATING A WINDOW SERVICE THAT USES A EXTERNAL CALL….. THAT CLASS WORK FINE IN WINDOW APPLICATION BUT WHEN I CALL THAT CLASS IN WINDOW SERVICE …….. SERVICE NOT WORKING…
MY SERVICE CAPTURES AN EVENT …. TO ATTACH THAT EVENT I AM USING DELEGATE
CAN ANY ONE HELP
|
|
|
|
|
Hi,
do you use an external assembly for your windows service. If yes, you need to register that assembly in the GAC so that the service can access it.
Regards
Sebastian
|
|
|
|
|
Hi,
Suppose i have an entity class which belongs to version table in the database having following properties for the fileds(columns)
#region Properties
private string _Program;
public string Program
{
get { return _Program; }
set { _Program = value; }
}
private string _AllowVersion;
public string AllowVersion
{
get { return _AllowVersion; }
set { _AllowVersion = value; }
}
#endregion
Suppose in a method i need to pass only one property so i will have to intitalize Entity class of version
which will have two properties but i need only one.
Do we have any way to tell version entity class that only load AllowVersion property only while initializing version entity and discard rest of the properties i.e my VersionEntity object must have only
one field.
I guess the only possible ways could be attributes or reflection. If possible please provide code snippet
to achieve this.
Is it possible to do this without performance cost??
Thanks In Advance
|
|
|
|
|
Hello Experts,
I am Creating Printer For PDF Writing Like: Windows XPS Document Writer,Journal Note Writer.
If you have any type of suggestion. Your most thanks.
Thanks
If you can think then I Can.
|
|
|
|
|
Your answer is here[^]
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
Individuality is fine, as long as we do it together - F. Burns
Help humanity, join the CodeProject grid computing team here
|
|
|
|
|
eg_Anubhava wrote: I am Creating Printer For PDF Writing
You probably need to start here[^] for details on the PDF data formats.
However, you can also check Google for one of the existing products.
|
|
|
|
|
i can write a file in the any drive of XP operating System but i can not on vista. plz see my code and suggest me how i can write on VISTA operating System.
Server = txtServerHost.Text.Trim();
User = txtUserName.Text.Trim();
Password = txtPassword.Text.Trim();
DBName = "db_outlook";
DataTable dt = new DataTable("Server Configuration");
dt.Columns.Add("Server");
dt.Columns.Add("User");
dt.Columns.Add("Password");
dt.Columns.Add("DBName");
dt.Rows.Add(Server, User, Password, DBName);
dt.WriteXml(Application.StartupPath + "\\ServerInformation.bin");
Thanks in advance
|
|
|
|
|
If you launch your program from the Program Files folder I don't think you're allowed to write to that directory in Vista.
|
|
|
|
|
thanks for ur reply. yes when i install the software it creates into program file. it creates in xp but not in VISTA.
have any permission system?
plz help me...
thanks
|
|
|
|
|
I think Microsofts policy in Vista and 2008 Server is that you shouldn't write to the Program Files folder (except at install time). Simply choose another folder to store that file (for instance another predefined folder found in Environment.SpecialFolder ). But as someone else wrote, do you really want to store a password in plain text like that?
|
|
|
|
|
thaks for ur reply.i will not put password info in plain text. but if i do that in installation time file can not create.
it is not possible? what i changed in my code. i will try it in diffent directory.
Thanks
|
|
|
|
|
Don't store stuff in program files!
There are two folders recommended for application storage depending on whether the data being stored is user specific.
Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData);
Environment.GetFolderPath(Environment.SpecialFolder.CommonApplicationData);
|
|
|
|
|
thank u very much for ur reply
|
|
|
|
|
What error message are you getting.
By the way it is a REALLY bad idea to store passwords and usenames in plain text
CCC solved so far: 2 (including a Hard One!)
|
|
|
|
|
thanks for ur reply. no error message shown. only i found no file is created in program file.
if i wanna write how? i created it in startup path if i install in different drive. will it install and create the file?
Thanks
|
|
|
|
|
khosnur wrote: i can write a file in the any drive of XP operating System but i can not on vista.
I just tried this on Windows 7 and it worked fine. Have you run it through the debugger to check the value of Application.StartupPath ?
|
|
|
|
|
Hello there,
i'm trying to create a program that copies some files to the CD BLANK area.
i created the program working For Windows XP, but in Vista it is not working/
can anyone help me in that
thanks in advance
|
|
|
|
|
There was a component called XPBurn, which worked in XP. If it's not supported in Vista, then you need to search the web for samples in Vista, assuming it's even possible in Vista.
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
Using Image mastering API[^] might be help. If I am not wrong there was an article on CP about using IMAPIv2
Sohail
modified on Wednesday, September 30, 2009 8:50 AM
modified 21-Apr-21 21:01pm.
|
|
|
|
|
Hi.
I saved color in Mssql datatable from C# colordialog (colordialog.color.toArgb() & 0xFFFFFF )and i put the result in crystal report color formula but the result is not the color what i choose in colordialog window.
Why ? What's wrong ?
Excuse me for my English
THX.
|
|
|
|
|
C# colors are ARGB, might Crystal Reports use RGB or BGR ?
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
If I want to locate the minimum value for a column in a datatable I would use something like:
int minArrangementID = (int) debtorDataSet.PaymentArrangements.Compute("MIN(PaymentArrangementID)", "PaymentArrangementID > 0");
How can I find the minimum value within a binding please?
|
|
|
|
|
Hi;
I'm calling stored procedures using linq to sql to fill comboboxes from a database.
I have the method ConnectFilter() above that i want to refactor.
I started refactoring using FillComboWithData(ComboBox combo, string value, string display, DataClassesReferentielDataContext dc, XXXXX) above.
DataClassesReferentielDataContext is the Linq datacontext, it contains all the database mapped into objects.
By the way the stored procedures call many fields of many tables.
Here an example of a stored proc: P_ESS_Categorie_BIS.
I don't know how to enter the stored procedure as an argument (in place of XXXXX).
I think the argument should be an enumerable.
Thanks.
private DataClassesReferentielDataContext _dc = new DataClassesReferentielDataContext();
private void ConnectFilter()
{
comboBoxCountryFilter.DataSource = _dc.P_ESS_Entite();
comboBoxCountryFilter.ValueMember = "PAY_Code";
comboBoxCountryFilter.DisplayMember = "PAY_Libelle";
var statut = from s in _dc.TR_Statuts select s;
comboBoxStatusFilter.DataSource = statut.ToArray();
comboBoxStatusFilter.ValueMember = "STA_ID";
comboBoxStatusFilter.DisplayMember = "STA_Libelle";
comboBoxCategoryFilter.DataSource = _dc.P_ESS_Categorie_BIS((int) Selections.VueRefId);
comboBoxCategoryFilter.ValueMember = "CAT_Code";
comboBoxCategoryFilter.DisplayMember = "CAT_Libelle";
comboBoxItPlanFilter.DataSource = _dc.P_ESS_ITPlan_BIS((int) Selections.VueRefId);
comboBoxItPlanFilter.ValueMember = "ITP_Code";
comboBoxItPlanFilter.DisplayMember = "ITP_Libelle";
comboBoxGroupFilter.DataSource = _dc.P_ESS_GroupeProjet_BIS((int) Selections.VueRefId);
comboBoxGroupFilter.ValueMember = "GRP_Code";
comboBoxGroupFilter.DisplayMember = "GRP_Libelle";
comboBoxSponsorFilter.DataSource = _dc.P_ESS_Sponsor_BIS((int) Selections.VueRefId);
comboBoxSponsorFilter.ValueMember = "SPO_Code";
comboBoxSponsorFilter.DisplayMember = "SPO_Libelle";
comboBoxThemaFilter.DataSource = _dc.P_ESS_ThematiqueProjet_BIS((int) Selections.VueRefId);
comboBoxThemaFilter.ValueMember = "THE_Code";
comboBoxThemaFilter.DisplayMember = "THE_Libelle";
comboBoxPersonFilter.DataSource = _dc.P_TR_Personne_Liste_Filtre();
comboBoxPersonFilter.ValueMember = "PER_ID";
comboBoxPersonFilter.DisplayMember = "PER_NomUT";
}
private void FillComboWithData(ComboBox combo, string value, string display, DataClassesReferentielDataContext dc, XXXXX)
{
combo.DataSource = _dc.P_ESS_NatureProjet_BIS((int)Selections.VueRefId);
combo.ValueMember = value.Trim();
combo.DisplayMember = display.Trim();
}
ALTER PROCEDURE [dbo].[P_ESS_Categorie_BIS]
@Vue_Referentiel numeric(10,0)
AS
BEGIN
SELECT [CAT_Code]
,[CAT_Libelle]
FROM [TR_Categorie]
WHERE ([TR_Categorie].VUR_Id = @Vue_Referentiel)
order by [CAT_Libelle]
END
|
|
|
|