1
I have a problem loading a cursor file in Windows Forms.
Type I put the files in the folder but the program notes that the course file is not valid or is corrupted. But I really need these cursors to develop an applicator.
I tried using this code to solve my problem:
void FormLoaded(object sender, EventArgs e){
this.Cursor = new Cursor("app\\point.cur");
}
but the above mentioned code did not work.
I tried this one too but it didn’t work either:
void FormLoaded(object sender, EventArgs e){
Cursor.Current = new Cursor("app\\point.cur");
}
The VS2010 says the following message:
Invalid image format. Maybe the image file is corrupted.
Name of the parameter: stream
Just citing what is being argued is Exception: Argumentexception
– FRNathan13
But do you have any questions? The error message is very clear what your problem is. The problem is not in the code. Either of the two ways may be correct or wrong, just with this snippet you can’t know which one is right but it doesn’t matter because the error occurs before assigning to any member.
– Maniero