Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
S

sonic747

@sonic747
About
Posts
6
Topics
3
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • how about erasing trace of Rectangle? [modified]
    S sonic747

    how do working GDI+ . i don't know.. you see. mothod.. . please..!!

    C# csharp wpf graphics linq com

  • how about erasing trace of Rectangle? [modified]
    S sonic747

    if exist background image, don't this mothod this mothod is fill the white color... are you other mothod ??....

    C# csharp wpf graphics linq com

  • how about erasing trace of Rectangle? [modified]
    S sonic747

    hello.. this program is based of C# and WPF i draw Rectangle as mouse but this program get stain of Rectangle i want to disply without leaving any trace of Rectangle.. help me.. im sorry short english.. Screen Capture Image DownLoad ////////////////source///

    using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Text;
    using System.Windows;
    using System.Windows.Controls;
    using System.Windows.Data;
    using System.Windows.Documents;
    using System.Windows.Input;
    using System.Windows.Media;
    using System.Windows.Media.Imaging;
    using System.Windows.Navigation;
    using System.Windows.Shapes;
    using System.Drawing;

    namespace rectTest
    {
    /// <summary>
    /// Interaction logic for Window1.xaml
    /// </summary>
    public partial class Window1 : Window
    {
    public Window1()
    {
    InitializeComponent();
    }

        System.Drawing.Rectangle myRec;
        System.Windows.Point firstPoint;
    
        bool flg = false;
        private void Window\_MouseLeftButtonDown(object sender, MouseButtonEventArgs e)
        {
            flg = true;
            firstPoint = e.GetPosition(mainwin);
            myRec = new System.Drawing.Rectangle((int)firstPoint.X, (int)firstPoint.Y, 0, 0);
        }
    
        private void mainwin\_MouseMove(object sender, MouseEventArgs e)
        {
            if (flg == true)
            {
                System.Windows.Point currentPoint;
                currentPoint = e.GetPosition(mainwin);
    
                double width = currentPoint.X - firstPoint.X;
                double height = currentPoint.Y - firstPoint.Y;
    
                if (width > 0 && height > 0)
                {
                    Graphics g = Graphics.FromHwnd(new System.Windows.Interop.WindowInteropHelper(this).Handle);
                    System.Drawing.Pen myPen = new System.Drawing.Pen(System.Drawing.Color.Red, 5);
                    g.DrawRectangle(myPen, myRec);
                    myRec.Width = (int)width;
                    myRec.Height = (int)height;
                    InvalidateVisual();
                }
            }
    
        }
    
        private void mainwin\_MouseLeftButtonUp(object sender, MouseButtonEventArgs e)
        {
            flg = false;
        }
    }
    

    }

    modified on Tuesday, June 1, 2010 3:37 AM

    C# csharp wpf graphics linq com

  • please help me!, delete error of the image files(attached source code)
    S sonic747

    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"); }

    C# csharp help wpf workspace

  • Plz, des'nt File Delete ,, [modified]
    S sonic747

    //image 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 /// 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"); } //error message.. do not access ! becouse using of other process

    C# csharp wpf help workspace

  • Plz, des'nt File Delete ,, [modified]
    S sonic747

    i want delete image file. very well insert image file to listbox. but, does'nt delete image file , plz, take me a error,, --- c#, wpf, .net3.5 /.... source code attched project files, source file download //////////error code//// //image 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 /// 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"); } //error message..

    modified on Tuesday, May 18, 2010 7:31 AM

    C# csharp wpf help workspace
  • Login

  • Don't have an account? Register

  • Login or register to search.
  • First post
    Last post
0
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups