Click here to Skip to main content
15,913,941 members
Home / Discussions / C#
   

C#

 
AnswerRe: How to combine byte array with sql command Pin
Erich Ledesma19-May-10 1:44
Erich Ledesma19-May-10 1:44 
QuestionWorking on with word files Pin
CodingLover18-May-10 18:09
CodingLover18-May-10 18:09 
AnswerRe: Working on with word files Pin
Christo66718-May-10 23:04
Christo66718-May-10 23:04 
AnswerRe: Working on with word files Pin
CodingLover19-May-10 17:41
CodingLover19-May-10 17:41 
GeneralRe: Working on with word files Pin
Christo66720-May-10 2:27
Christo66720-May-10 2:27 
QuestionHow to binding TreeView to Unlimit Category? Pin
yuzifu18-May-10 17:00
yuzifu18-May-10 17:00 
AnswerRe: How to binding TreeView to Unlimit Category? Pin
Christo66718-May-10 23:09
Christo66718-May-10 23:09 
Questionplease help me!, delete error of the image files(attached source code) Pin
sonic74718-May-10 15:06
sonic74718-May-10 15:06 
i want delete image file.
very well insert image file to listbox.
but, do not delete image file ,
please, take me a error,,
attached the source project files,

reply send to me(sonic747@esolgorup.co.kr)
---env
c#, wpf, .net3.5
/....
source file download



//imagefile insert to listbox///
private void button1_Click(object sender, RoutedEventArgs e)
{
savepath = System.Environment.CurrentDirectory.ToString();

foreach (string f in Directory.GetFiles(savepath + "/image", "*.jpg"))
{
BitmapImage my;
my= new BitmapImage();
my.BeginInit();
my.CacheOption = BitmapCacheOption.OnLoad;
my.UriSource = new Uri(f, UriKind.RelativeOrAbsolute);
my.EndInit();
listBox1.Items.Add(my);

}


}
/////////delete image file (error) ///
private void button2_Click(object sender, RoutedEventArgs e)
{
string makestr1, item1;
item1 = listBox1.Items[0].ToString();
makestr1 = item1.Substring(8, item1.Length - 8);

listBox1.Items.Remove(listBox1.Items[0]);
if (System.IO.File.Exists(makestr1))
{

System.IO.File.Delete(makestr1); //<--error point
}
else
MessageBox.Show("Nothingfile");
}
AnswerRe: please help me!, delete error of the image files(attached source code) Pin
Yusuf18-May-10 15:33
Yusuf18-May-10 15:33 
AnswerRe: please help me!, delete error of the image files(attached source code) Pin
Luc Pattyn18-May-10 15:33
sitebuilderLuc Pattyn18-May-10 15:33 
AnswerRe: please help me!, delete error of the image files(attached source code) [modified] Pin
Dr.Walt Fair, PE18-May-10 15:46
professionalDr.Walt Fair, PE18-May-10 15:46 
GeneralRe: please help me!, delete error of the image files(attached source code) Pin
Luc Pattyn18-May-10 16:16
sitebuilderLuc Pattyn18-May-10 16:16 
GeneralRe: please help me!, delete error of the image files(attached source code) Pin
Dr.Walt Fair, PE18-May-10 16:30
professionalDr.Walt Fair, PE18-May-10 16:30 
GeneralRe: please help me!, delete error of the image files(attached source code) Pin
Luc Pattyn18-May-10 16:31
sitebuilderLuc Pattyn18-May-10 16:31 
GeneralRe: please help me!, delete error of the image files(attached source code) Pin
Dr.Walt Fair, PE18-May-10 18:12
professionalDr.Walt Fair, PE18-May-10 18:12 
QuestionMy LCD doesnt show anything? [modified] Pin
THeKiNG2018-May-10 14:54
THeKiNG2018-May-10 14:54 
AnswerRe: My LCD doesnt show anything? Pin
Yusuf18-May-10 15:34
Yusuf18-May-10 15:34 
GeneralRe: My LCD doesnt show anything? Pin
THeKiNG2018-May-10 15:39
THeKiNG2018-May-10 15:39 
AnswerRe: My LCD doesnt show anything? Pin
Luc Pattyn18-May-10 15:37
sitebuilderLuc Pattyn18-May-10 15:37 
GeneralRe: My LCD doesnt show anything? Pin
THeKiNG2018-May-10 15:40
THeKiNG2018-May-10 15:40 
AnswerRe: My LCD doesnt show anything? Pin
THeKiNG2019-May-10 9:36
THeKiNG2019-May-10 9:36 
QuestionQuery users in Security Tab from an AD member Pin
Scolo18-May-10 11:10
Scolo18-May-10 11:10 
QuestionOpening IE7 without menus or an address bar Pin
Melanie Peterson18-May-10 11:04
Melanie Peterson18-May-10 11:04 
AnswerRe: Opening IE7 without menus or an address bar Pin
Not Active18-May-10 11:19
mentorNot Active18-May-10 11:19 
GeneralRe: Opening IE7 without menus or an address bar Pin
Melanie Peterson18-May-10 11:25
Melanie Peterson18-May-10 11:25 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.