|
i want to delete bmp from the hard(no specified location), is this possible!!!
|
|
|
|
|
Zzzz wrote:
no specified location
????????
But if you have a "specified location" then you can use FileSystemInfo to open a file and then use the member method Delete() to delete it.
------------------------------------
Rickard Andersson, Suza Computing
ICQ#: 50302279
I'm from the winter country SWEDEN!
------------------------------------
|
|
|
|
|
Zzzz wrote:
(no specified location)
You mean that the files location may change, is that correct? Or are you actually doing a search for the file each time to find the location?
Nick Parker
|
|
|
|
|
yeah that's what i meant, or we may say that at runtime i cannot specify the location, i can only know the filename..
|
|
|
|
|
The static File.Delete method
|
|
|
|
|
It's not a good idea to delete all bmps in a hard disk
Nish
Check out last week's Code Project posting stats presentation from :-
http://www.busterboy.org/codeproject/
Feel free to make your comments.
|
|
|
|
|
surely i won't delete all the bitmaps from the hard.!!!!!!
|
|
|
|
|
Zzzz wrote:
surely i won't delete all the bitmaps from the hard.!!!!!!
Sorry I misunderstood the question.
I still havent understood what exectly you want to know!
Nish
Check out last week's Code Project posting stats presentation from :-
http://www.busterboy.org/codeproject/
Feel free to make your comments.
|
|
|
|
|
it's okay
here what i want,
at runtime, some bitmaps will b generated but if something wrong happned, i'll have to delete these files, without knowing where they are, only their names, Got it, anyway thanx
|
|
|
|
|
Zzzz wrote:
some bitmaps will b generated
If you are doing the generation, surely you'd know the folder where it's being generated.
Zzzz wrote:
without knowing where they are, only their names
You can concatenate the folder where you generate them with their file names and pass this string to the File.Delete function
Nish
Check out last week's Code Project posting stats presentation from :-
http://www.busterboy.org/codeproject/
Feel free to make your comments.
|
|
|
|
|
I fianly knew how to add c a mschart to my form but i still don't knwo how to deal with it, i want to label the axis and pass the array whose data will be represented, cananyone help me!?!
|
|
|
|
|
When I add a string to a RichTextBox like this one:
"Rickard Andersson: Hello to you too, dude!"
Then I want to make the "Rickard Andersson:" bold (yes, I'm making a chat program) to give it a nice look... but how to make it bold!?!?!?!?!
------------------------------------
Rickard Andersson, Suza Computing
ICQ#: 50302279
I'm from the winter country SWEDEN!
------------------------------------
|
|
|
|
|
This is my sample code:
private void btnBold_Click(object sender, System.EventArgs e)
{
Font oldFont;
Font newFont;
oldFont = this.rtfText.SelectionFont;
if (oldFont.Bold)
newFont = new Font(oldFont, oldFont.Style & ~FontStyle.Bold);
else
newFont = new Font(oldFont, oldFont.Style | FontStyle.Bold);
this.rtfText.SelectionFont = newFont;
this.rtfText.Focus();
}
Mazy
"The path you tread is narrow and the drop is shear and very high,
The ravens all are watching from a vantage point near by,
Apprehension creeping like a choo-train uo your spine,
Will the tightrope reach the end;will the final cuplet rhyme?"Cymbaline-Pink Floyd
|
|
|
|
|
Where in this code does "Rickard Andersson:" being bold?
I don't realy understand it... but I haven't tried it yet...
------------------------------------
Rickard Andersson, Suza Computing
ICQ#: 50302279
I'm from the winter country SWEDEN!
------------------------------------
|
|
|
|
|
Never mind!
I have figured it out how you mean with your code!
Now I know how!
Thank you Mazy!
------------------------------------
Rickard Andersson, Suza Computing
ICQ#: 50302279
I'm from the winter country SWEDEN!
------------------------------------
|
|
|
|
|
Thanks!
In fact, I have several user controls, each one with different controls inside. I would like to create a loop for each user control, to go through inside controls one by one, no matter how many in there, and what they are, try to set readonly to true, catch exceptions if there is no such property. But such as combobox, does not have this property, but I still need to set it to readonly, how can I do it, and do you think this loop methodoligy will work?
Thanks a lot!
chris#
|
|
|
|
|
I have an idea for a program that would run in the background and then, when the user presses the windows key (in any application), it would come to the foreground.
Anyone know how I can do this?
|
|
|
|
|
http://www.codeproject.com/useritems/nishhotkeys01.asp
Nish
Check out last week's Code Project posting stats presentation from :-
http://www.busterboy.org/codeproject/
Feel free to make your comments.
|
|
|
|
|
How to make Combobox, Radio buttons (group) read only?
Thanks!
|
|
|
|
|
I know that the RadioButton has an "AutoCheck" property. Setting that to "false" will make it so that the radio button won't change state when the user clicks on it.
I don't know how to make a ComboBox read only. Hopefully some of the more experienced developers will know.
Good luck.
- Sabran
|
|
|
|
|
Sabran wrote:
I don't know how to make a ComboBox read only
Combo boxes are read-only by default! Even if they have that edit box on top [which is easily removed by changing the style], the actual contents of the combo cannot be changed. Of course if someone wants to make it un-clickable, he can make it disabled.
Nish
Check out last week's Code Project posting stats presentation from :-
http://www.busterboy.org/codeproject/
Feel free to make your comments.
|
|
|
|
|
My problem is regarding the refresh of the controls in .net (tree view).
In MFC I had a tool that loaded up all the folders of a drive and there size. This was done with a tree view control, in the main loop where all the folders were read, after that the new folder was added to the control or any text was changed, I just process any pending messages and the end result was excellent.
But in .net when I do the exact same thing each time that I add a new node or change the text of an old node (to update the size of the folder) the entire tree view is redrawn, I get the nice flickering effect… I process any pending messages with the “Application.DoEvents()” function, is that my problem? Is it a property I have to change?? I mean why in MFC I didn’t have to take this in consideration but in .net I have to??? In MFC when I added a new node or change the text of a node it just updated that node.
I’m kind of disappointed.
|
|
|
|
|
Try enabling double buffering and see if that helps.
The cause of flicker is that you can see each part of the window being redrawn, starting with erasing the current contents. If you enable double-buffering all the drawing will be done off screen, then once the drawing is done it will draw that image to the screen.
James
Simplicity Rules!
|
|
|
|
|
Thanks...
Did MFC had the double-buffering embedded in the controls? I never heard of double-buffering for MFC controls and they never flickered...
|
|
|
|
|
Don't know, both are wrappers around the Tree control provided by Windows so I would assume it wouldn't interfere too much.
James
Simplicity Rules!
|
|
|
|