|
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
|
|
|
|
|
Hi . I can not good speak english . if in vs 2008 pressed ctrl + G keys and insert line number and click ok button , mouse cursor to go in the that line number . how go to line in richtextbox in my program ?
|
|
|
|
|
amir-haghighi wrote: . I can not good speak english . i
That's fine. I'm sure whatever language you speak natively, I can't speak as well as you speak English.
amir-haghighi wrote: how go to line in richtextbox in my program ?
You can't, because the line numbers no longer exist when your code is compiled, the code does not exist in remotely the form you created it at that time. Also, it's not possible to jump execution to a random spot in the code, even the VS debugger cannot do that, it can only jump within the current method, and within the current try block. What you're asking is basically impossible, there is no chance of you being able to do it.
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.
|
|
|
|
|
Take a look at the answer in this[^] thread on MSDN.
If you ignore the bit about selecting the RichTextBox from a Tab , you should be able to work it out.
[Edit]
Just found this code:
public void GoToLineAndColumn(int Line, int Column)
{
Cursor.Current = Cursors.WaitCursor;
int Offset = 0;
int i = 0;
foreach (String L in Lines)
{
if (i < Line - 1)
{
Offset += L.Length + 1;
}
else
{
break;
}
i++;
}
Select(Offset + Column - 1, 0);
Cursor.Current = Cursors.Arrow;
}
Lines is RichTextBox.Lines property
You might also need the ScrollToCaret method, as I cannot remember if the Select(int, int) automatically brings it into view.
[/Edit]
Henry Minute
Do not read medical books! You could die of a misprint. - Mark Twain
Girl: (staring) "Why do you need an icy cucumber?"
“I want to report a fraud. The government is lying to us all.”
|
|
|
|
|
Hi all,
Could someone please tell me how to write code for the below situation?
When entering numbers into a text box
input 126 => output 1,26
input 1234 => output 12,34
It shouldn't accept letters and should allow me to leave textbox empty
Thanks in advance
|
|
|
|
|
|
As I only seek for a simple validation, I thought I could have a piece of code instead of using a custom control.
I'm sure it is a valuable reference for future needs. Thanks anyway
I still need a simple code to do it
|
|
|
|
|
Use the KeyUp Event to validate what's written in the TextBox and then alter the text.
But you'll have to write the code for it yourself..
|
|
|
|
|
i have a folder which name is Test in D: Drive , now want create Test.zip ,How it Posible
|
|
|
|
|
|
Hi,
You can use System.IO.Compression namespace to do that. You can find lot of help on msdn site for that.
Regards,
Paramhans Dubey
|
|
|
|