|
ms
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Default Path and Cursor files.I've been setting the location of a cursor file like this: this.Cursor= new Cursor("HandCur.cur"); I've just found out (the hard way) that if, elsewhere in the application, the user browses for a file using the openFileDialog then the default path is changed and the application looks for the cursor file in the last openFile path, and run-time error. I can solve it with hard-coded paths, but is there a better way of avoiding this problem in general? I'd appreciate suggestions. John South www.wherecanwego.com Pangbourne UK John,
You can use the following this.Cursor = new Cursor(Application.StartupPath + "HandCur.cur") Regards Scott Blood C# Developer Show quoteHide quote "JohnSouth" <JohnSouth***@gmail.com> wrote in message news:1142508227.925376.182260@i39g2000cwa.googlegroups.com... > Hi > > I've been setting the location of a cursor file like this: > > this.Cursor= new Cursor("HandCur.cur"); > > I've just found out (the hard way) that if, elsewhere in the > application, the user browses for a file using the openFileDialog then > the default path is changed and the application looks for the cursor > file in the last openFile path, and run-time error. > > I can solve it with hard-coded paths, but is there a better way of > avoiding this problem in general? > > I'd appreciate suggestions. > > John South > www.wherecanwego.com > Pangbourne UK >
Late binding with unmanaged code
Encrypt/Decrypt serialized data Practicla .NET2 and C#2 asp.net c# concept question VisualStudio : start application directly without build ??? reading and writing to binary files how to convert a char array(byte[]) to a string variable? Binding a TextBox to a particular cell of an Access database table Http in C# Windows Form C# Web Service |
|||||||||||||||||||||||