|
Sure in code. But I was talking about an install project. There is a property for a folder called DefaultDirectory. I havn't done very many installs and the ones I have done are pretty straight forward so I could be missing something.
|
|
|
|
|
Hello
You can make an exe file that will copy the files you want to "My Documents" using C# code, and excute it during/after your installation as a custom action.
Regards
|
|
|
|
|
Yes, but there must be a way to do it from the installer. That's probably too big of a hammer for this particular nail. MS must have allowed for a way to do this within the Install Project.
|
|
|
|
|
Tad McClellan wrote: MS must have allowed for a way to do this within the Install Project.
Sorry! Looks like you don't know MS that well!! They are not the "Good guys" anymore.. It would be rational to think that "My Documents" folder is private to the user and why would you put anything in it?!! Stupid, I know, but it's the case. The closest you can get is the "Application data" folder which is in the Documents folder. Otherwise there is one silly workaround. Get a special folder's path -eg. User's Start menu-, which is close to "My Documents" folder, then use a relative path from there to "My Documents".
Regards
|
|
|
|
|
|
I have application which need the windows based authentication so I need help to get the username and user password who has logged in the system currently for the authentication.
Please tell me it's urgent.
regards,
Mr. Dhiraj karmalkar
|
|
|
|
|
You probably can get this info our of MSDN but ...
You won't get the users password (You don't really need it if all you are looking for is to identify the current windows user). Other wise use ...
Environment.UserName
Lots of good stuff in the Environment class so you should check it out.
|
|
|
|
|
Damn right there is, its full of so much useful stuff its not even funny. (Oh, the time i could have saved if only i'd known sooner)
|
|
|
|
|
Hi
how can i kil thread gracefully in c#1.1
|
|
|
|
|
The most graceful way is to tell the thread to stop on it's own.
If the thread is running an instance method of a class, you could change a proeprty in the class to flag that it's time to stop.
Otherwise there is a special exception (don't recall what it's called right now) that you can raise in the thead, that you can initiate from outside the thread and catch inside the thread. That gives the thread a chance to clean up whatever it needs before turning in.
-- modified at 9:11 Sunday 8th October, 2006
I was just reading about Monitors, and stumbled upon the Exception that is used to interrupt a thread. The exception is ThreadInterruptedException , and is created with the Interrupt method of the Thread class.
---
b { font-weight: normal; }
|
|
|
|
|
Use something like a volatile bool quit , set it to true and periodically check if it's true in your thread.
regards
modified 12-Sep-18 21:01pm.
|
|
|
|
|
Hi,
Using VS2005
I have three comboboxes with the purpose of selecting a member from a lookup table and inserting their meberID into another table. Each combobox has the same links ie:
The datasource -> nameLookuptable
The displaymember -> memberName
The valuemember -> memberID
The databindings - selected value will link to another table that is to record the memberID although I have tried leaving this blank to test the workings but this doesn't make any difference to the problem.
The problem I have is that selecting a member from the drop down list in any one of the comboboxs results in all three changing.
I've tried everything to isolate the problem but can't.
On another form in the same project, I have no problems with the configuration of the comboboxes as above.
Any suggestions welcomed.
Glen Harvy
|
|
|
|
|
If three combos have the same data source, they will do this. The solution is to set the data source in code, and to use the Clone method to make copies of the data source, so they point to different objects, but with the same data.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
Hi,
There will be at least 15 combos required on the page - do I need 15 clones!
I'm confused because the combos works fine on a different tabbed page on the same form !
Glen Harvy
|
|
|
|
|
Glen Harvy wrote: do I need 15 clones!
In my experience, I think so. Or a better design, why do you need 15 combos that have the same info in them ?
Glen Harvy wrote: I'm confused because the combos works fine on a different tabbed page on the same form !
I'd be surprised if the code was the same, I've had the same problem, and making copies of the array ( in my case ) being used for the combos was what solved it.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
Christian Graus wrote: n my experience, I think so. Or a better design, why do you need 15 combos that have the same info in them ?
The form requires the user to select which member did what - in this case propose, second motions etc.
I'm beginning to think the problem lies elsewhere and may be linked to the bindingnavigator.
I can't believe that you need to clone when what I want to do is really standard out of the box stuff.
Glen Harvy
|
|
|
|
|
Do a simple test. Create a form with as many combo boxes as you like. Create a List, and make it the data source. They will all change selection. Clone the list for each data source. They won't. At least, that's how it works here.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
Yep - that's how it works here - unbelievable!
I'm now creating individual bindingsources to work around this - at least it works.
I'd clone if I knew how to
Glen Harvy
|
|
|
|
|
Clone is one of the four magic methods that Object ( and therefore every .NET class ) has. So, if your old code is
combo1.DataSource = x
combo2.DataSource = x
combo3.DataSource = x
change it to
combo1.DataSource = x.Clone()
combo2.DataSource = x.Clone()
combo3.DataSource = x.Clone()
Now, in C# I need to cast the object returned to the correct type, but as VB.NET is weakly typed, you may not need to do that.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
For each duplicate combobox, create a unique BindingContext.
this.comboBox1.BindingContext = new BindingContext();
this.comboBox2.BindingContext = new BindingContext();
...
Otherwise they all inherit the default BindingContext from the forms I believe.
|
|
|
|
|
Hi Friends
I have experience in building Embedded Linux Firewall Linux using NETFILTER Hooks...
Can Any friends over here direct me how to Build a packet filter firewall application using C#.NET..
I have used SHARPPCAP library and WINPCAP
But I dont Know how to DROP a packet according to the rule using this libraries
Hari
|
|
|
|
|
which .dll files are these ??
These are no in the System32....
Are you using some customised DLLs????
<marquee>nishu
|
|
|
|
|
hi,
i have datagrid that contain the data from table named carlicensfines which get information abount fines
i want to check which fines can the customer pay i add the checkbox to datagrid by using asp but i want to do it by using c# windosapplication
ashrafhakiem
|
|
|
|
|
Hello
If you use .Net 2.0 framework you can add a DataGridViewCheckBoxColumn ate the begining of your DataGridView.
Regards
|
|
|
|
|
Hi!
is there any problem with having a public static property with both get and set access. I know there is but not sure where i might have problem
|
|
|
|