Ok it took a while to find out the correct answer to this- I'm posting the answer to hopefully help anyone else coming up against the same problem and not wanting to *hack* a rough solution. Here goes:
Firstly you should never reference a path in your code like...
Jason, thanks for your suggestion, however......
Sorry I'm feeling a bit stunned. Surely one of you C# developers out there has developed an app that either saves or references a document on a Vista PC. Has no one else come across this? And I can't believe that there is no way of doing this...
But I try and avoid hard coding any file paths if I can - is there really no other way to reference this path? Doing it the way you have suggested will mean having to have an XP version of the software and a Vista version!
Any other suggestions?
I developed a C# app last year which has been used on 4 or 5 pcs regularly during that time with no problems. Part of the app copies a Word document (docx 2007) then dynamically appends a few pages then saves it in a set place on the PC.
The app has been installed on XP, Vista, with PCs that...
I am building an app which consists of two forms - one for data entry (datagridview databound to a custom object) and one for display on a separate display screen (hence the separate form). Is it possible to use databindings across forms when using a custom user control? The problem I have is...
If I understand you crrectly I don't think you need to do this.... open your form which has the datagridview and click the datagridview once. You'll see a little black arrow top right hand corner of the datagridview. Click it and then click the 'edit columns' option. Select the column that you...
I am looking into building a C# app that will let the user enter information which will then be formatted and displayed on a separate screen. I guess I could either show the formatted data in a new windows form or in a web browser.
The system will be set up on a lap top so the user will be...
Oh dear I knew it would be simple. Actually realised it was because I wasn't setting the objects date propertuy to a default value of today. Thanks though!
I'm using a datetimepicker control and it's text and value properties are databound to a datetime property of a custom object. The date value defaults to todays date.
If I open the application and enter other data, but don't change the date value in the picker (because I want todays date and...
Ok so you're getting a list of values out of a database? I would be inclined to putting the results of the db query into a BindingList of objects eg:
BindingList<Record> records = new BindingList<Record>
where the Record object would something like:
class Record
{
private int mainTypeId...
I found the following article really useful for Lists - it might be worth a look.
http://www.c-sharpcorner.com/UploadFile/camurphy/csharpLists03302006170209PM/csharpLists.aspx
I've been using a bindinglist to databind a list of objects to a datagridview in the project I am working on. The bindinglist type is 'Issue' where 'Issue' is a custom object. However, there has been a small change in the spec and I think I am now going to have to use a custom collection as the...
eb24 - can you explain what it is you are trying to do? What is it you are trying to show in the checkedlistbox? To databind an object to a control the normal process is to set a bindingsource up in your project with the object as the data source. You then use the bindingsource to bind to the...
I didn't think you could use templateColumns with a datagridview (Windows Forms)? I thought you could only use them in a datagrid in asp.net. If I'm wrong could you point me to an example? Thanks.
I have a datagridview which is databound to an object. There are 4 properties in this object all boolean which are shown as checkboxes in the datagridview.
I want them to act like radiobuttons so when one is checked the others are all unchecked. So I added a method to my class so that whenever...
I have a bit of code here which looks really awful to me - what would be the best way to redesign/rewrite this?
public ImpactType ImpType
{
get
{
if (costD)
{
if (r1)
{...
I am programmatically adding a tabpage to a tabcontrol, and then adding a user control to this tab page. The application starts maximized and I need to make sure that this user control stretches to fill the tab page by setting it's anchorstyles. However my code just doesn't seem to be having any...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.