|
This line seems to be the problem. You need to change:
markymark82 wrote: File.Move(di+fileinfo.Name, Newdirandname);
into
File.Move(fileinfo.FullName, Newdirandname);
the last thing I want to see is some pasty-faced geek with skin so pale that it's almost translucent trying to bump parts with a partner - John Simmons / outlaw programmer
Deja View - the feeling that you've seen this post before.
|
|
|
|
|
Hi,
I have been trying to override System.Windows.Forms.Form's Dispose(bool disposing) method, in order to release the resources held by my form.
However, when I type "override <spacebar>" VS displays a list with overridable items, but it does not include the Dispose(bool disposing) method.
In an earlier post of mine[^], I was instructed to use the form's events to dispose of the resources.
But why not use the dispose pattern if its already implemented by System.Windows.Forms.Form?
And what is the reason for VS not to show the Dispose(bool disposing) method in the list?
Thanks in advance,
Shy.
|
|
|
|
|
You don't need to override the Dispose method, just implement the IDisposable interface and the Dispose method will be called automatically. Since it's not an override it doesn't show up in the code completion feature.
Standards are great! Everybody should have one!
|
|
|
|
|
Hi!
I'm saving images in png format from a tiff file. But only sometimes following error occurs.
A generic error occurred in GDI+.<br />
System.Runtime.InteropServices.ExternalException: A generic error occurred<br />
in GDI+.<br />
at System.Drawing.Image.Save(String filename, ImageCodecInfo encoder,<br />
EncoderParameters encoderParams)<br />
at System.Drawing.Image.Save(String filename, ImageFormat format)
Its a windows application.
I've cross checked for the permission etc.
But after lots of Googling I've only got to know that permission issue which is not there in my case. Please reply, it is giving me lots of headaches.
Thanks in advance.
Don't Quit
|
|
|
|
|
Yes, it is a known weakness of GDI+: almost all kinds of failure result in
"A generic error...". My advice is twofold:
1) look carefully at the line numbers that Visual normally shows in its traceback
when a program fails while running from inside Visual Studio. This should tell you
exactly where it fails. (If not, try single stepping).
2) assuming it fails in Image.Save(arg1, arg2, ...) output each of the args to make
sure they are all correct (there may be problems with double slashes/backslashes,
relative vs absolute paths, etc). If all args are correct, check for file already exists,
file is locked, and such things. I suggest you add code to do all that until you
found what is causing your trouble (then you may remove it, or leave it in the catch
that now no longer fires).
BTW: some questions you may ask yourself: does it always succeed the first time ?
does it always fail the second time ? are multiple threads involved, if so could
they overlap their image operations ?
Luc Pattyn
|
|
|
|
|
Thanks Luc for your reply! I will check out everything as told by you.
Don't Quit
|
|
|
|
|
Dear all,
I am trying to clear the cache in webbrowser control, I have used the sample code given in the MSDN. But it is clearing the whole cache.. How to clear the known cache entry..i.e i know the URL entry that needs to be removed from cache. the problem is iam directing Webbrowser control to change password screen when user presses ChangePwd button, once he logged in to page, every time when user clicks chnage pwd button it shows the Change Pwd page, instead of login page.
I tried one more solution, like everytime i am diposing the webbrowser control and loading it again, but that also doesn't clear the cache. but if you open the same URL in IE it is going correctly(mean login page instead of change pwd page)
Thanks
Srini
|
|
|
|
|
Hello,
I have a setup project for my app, which installs some shortcuts in the User's Programs Menu.
I want these shortcuts to have icons, but I couldn't find a way to attach an icon to them without adding the .ico file to the installation directory.
Is it possible to somehow use icons embeded within other files?
Thanks in advance,
Shy.
|
|
|
|
|
Icons can be embedded as resources within a project.
Add you icon files as resources to the project, then right-click them, choose the properties and set the Build Action to Embedded Resource
SkyWalker
|
|
|
|
|
hi all
I need to create Report(like Crystal Report but not Using Crystal report S/w ) in HTML
Can anyone help me plz
thanks for y'r time
|
|
|
|
|
i'm currently working on the same topic, but how are u making crystal reports on html???
html based reports are static reports i.e. suppose u created a report today. added more data to ur database after creating report, this report will not have the current data after updating the database table.
so, for showing currently updated data,dynamic/crystal reports are needed. i'm using the approach to write reports through the StreamWriter class.
first create a '.cs' file that contains all items or variables which are going to be displayed on the report. Create another '.cs' file that contains the items of a form in C# plus the event handler that has the query to select all records, so whenever this event occurrs, the query is called and the current data is fetched from the db. Create a project file, Assembly file and then run these files in VS.Net.
Voila, crystal reports are made.
if u don't fully understand the idea or approach i'm using, do tell.
Saira
|
|
|
|
|
|
i am Taking abt Crystal Report , I am Taking on HTML based Report for details of HTML Rrport Plz login to following site and see how it's work
http://crm.tustena.com/
User: ganesh@eway-software.com
Password: 27lfq0yf
http://crm.tustena.com/CRM/QBDefault.aspx?m=55&dgb=1&si=42[^]
thank's alot's
|
|
|
|
|
I used menubar control.
There is edit menu that contains cut,copy paste option.
without coding How can I used the cut,copy and paste opration.
Is there any other solution for that.
Thanks
|
|
|
|
|
|
Hi
please go to this link
(this map have 3 level for zoom)
http://www.arianews.com/tehraninf/Tehran%20Map/L1.htm
I need codes about this zoom .
|
|
|
|
|
... then you will have to write some ...
SkyWalker
|
|
|
|
|
|
you have to understand that you have to write code and, eventually, ask questions on certain topics you consider difficult.
Nobody is gonna do your homeworks
SkyWalker
|
|
|
|
|
it is not my homework,
i intrested on work this subject
i want to understand how can save many image and in 3 level load this image
it is very difficult because in each level ,i have very image
i can zoom in one picture , i can not zoom on picture then load another picture
|
|
|
|
|
Have a look here[^] for ideas.
SkyWalker
|
|
|
|
|
You can use Internet Explorer (or any other browser) to look at the html code
they use (on IE6 it is menu View/Source);
you will notice it is all there, and relies on multiple images, there is no real
zooming at all !
Luc Pattyn
|
|
|
|
|
Hello
Can anyone help with this.
I created a gridview programatically, but noew I can´t make the pagging work.
When I had the gridview in HTML I add the attribute OnPageIndexChanging ="GridViewPaging" that is a custom build function to pagging.
Now I must add the same attribute OnPageIndexChanging but programatically.
Best regards
Rui
|
|
|
|
|
Is it actually "responding to events" what you need ?
SkyWalker
|
|
|
|
|
Hi
thank you for your response
I had this code
<asp:gridview runat="server" id="GeneralGridView" onpageindexchanging="GridViewPaging">
....
In the code behind I have a function called GridViewPaging that is responsable for pagging
But now I build the gridview programatically, like this
protected void GridViewBuild()
{
GeneralGridView.ID = "GeneralGridView";
GeneralGridView.AllowPaging = true;
GeneralGridView.PageSize = 5
....
this.Controls.Add(GeneralGridView);
}
But I cant add a property that allows me to call the GridViewPaging function
there is no GeneralGridView.OnPageIndexChanging= "GridViewPaging";
So I cant have pagging.
Don't know any other way to make pagging work.
Best regards,
Rui
|
|
|
|