Click here to Skip to main content
15,887,027 members
Home / Discussions / C#
   

C#

 
GeneralRe: c# code to search text/string in word doc and get page number Pin
Richard MacCutchan19-Nov-12 23:59
mveRichard MacCutchan19-Nov-12 23:59 
GeneralRe: c# code to search text/string in word doc and get page number Pin
Nitin Varshneya 220-Nov-12 17:59
Nitin Varshneya 220-Nov-12 17:59 
GeneralRe: c# code to search text/string in word doc and get page number Pin
Richard MacCutchan20-Nov-12 21:18
mveRichard MacCutchan20-Nov-12 21:18 
QuestionC# and BitBLT Pin
C-P-User-319-Nov-12 10:04
C-P-User-319-Nov-12 10:04 
AnswerRe: C# and BitBLT Pin
Gerry Schmitz19-Nov-12 21:57
mveGerry Schmitz19-Nov-12 21:57 
GeneralRe: C# and BitBLT Pin
C-P-User-320-Nov-12 8:06
C-P-User-320-Nov-12 8:06 
GeneralRe: C# and BitBLT Pin
Pete O'Hanlon20-Nov-12 8:35
mvePete O'Hanlon20-Nov-12 8:35 
GeneralRe: C# and BitBLT Pin
Gerry Schmitz20-Nov-12 11:50
mveGerry Schmitz20-Nov-12 11:50 
Here's a small C# WPF "code-only" example that allows you to move a rectangle using sliders. You can decide for yourself if the performance is acceptable. (You can accomplish the same thing using XAML)

using System;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Media;
using System.Windows.Shapes;
//
namespace WpfApplication1 {
   //
   class Program {
      //
      [STAThread]
      static void Main( string[] args ) {
         Window window = new Window() {
            WindowStartupLocation = WindowStartupLocation.CenterScreen,
            SizeToContent = SizeToContent.WidthAndHeight
         };
         //
         Canvas canvas = new Canvas() { Width = 400, Height = 400 };
         Rectangle rect = new Rectangle() {
            Width = 20,
            Height = 20,
            Fill = Brushes.MediumBlue
         };
         canvas.Children.Add( rect );
         //
         Slider sliderY = new Slider() {
            Orientation = Orientation.Vertical,
            Maximum = 300,
            Minimum = 100,
            Value = 200
         };
         Slider sliderX = new Slider() {
            Orientation = Orientation.Horizontal,
            Maximum = 300,
            Minimum = 100,
            Value = 200
         };
         //
         StackPanel sp1 = new StackPanel() { Orientation = Orientation.Horizontal };
         StackPanel sp2 = new StackPanel() { Orientation = Orientation.Vertical };
         sp1.Children.Add( canvas );
         sp1.Children.Add( sliderY );
         sp2.Children.Add( sp1 );
         sp2.Children.Add( sliderX );
         window.Content = sp2;
         //
         Binding bindingX = new Binding();
         bindingX.Source = sliderX;
         bindingX.Path = new PropertyPath( Slider.ValueProperty );
         rect.SetBinding( Canvas.LeftProperty, bindingX );
         //
         Binding bindingY = new Binding();
         bindingY.Source = sliderY;
         bindingY.Path = new PropertyPath( Slider.ValueProperty );
         rect.SetBinding( Canvas.TopProperty, bindingY );
         //
         Application app = new Application();
         app.Run( window );
      }
   }  // end class.
}

QuestionHow can i get the innertext from div which hasnt id Pin
Gokce Sezgin19-Nov-12 9:17
Gokce Sezgin19-Nov-12 9:17 
AnswerRe: How can i get the innertext from div which hasnt id Pin
Pete O'Hanlon19-Nov-12 9:18
mvePete O'Hanlon19-Nov-12 9:18 
JokeRe: How can i get the innertext from div which hasnt id Pin
Peter_in_278019-Nov-12 11:18
professionalPeter_in_278019-Nov-12 11:18 
AnswerRe: How can i get the innertext from div which hasnt id Pin
askwjun19-Nov-12 20:42
askwjun19-Nov-12 20:42 
AnswerRe: How can i get the innertext from div which hasnt id Pin
Bernhard Hiller19-Nov-12 21:55
Bernhard Hiller19-Nov-12 21:55 
QuestionWhat is the best tool to create UML diagrams? Pin
Vijay Kanda19-Nov-12 8:29
Vijay Kanda19-Nov-12 8:29 
AnswerRe: What is the best tool to create UML diagrams? Pin
Pete O'Hanlon19-Nov-12 8:36
mvePete O'Hanlon19-Nov-12 8:36 
GeneralRe: What is the best tool to create UML diagrams? Pin
Vijay Kanda19-Nov-12 8:54
Vijay Kanda19-Nov-12 8:54 
AnswerRe: What is the best tool to create UML diagrams? Pin
Bernhard Hiller19-Nov-12 21:57
Bernhard Hiller19-Nov-12 21:57 
AnswerRe: What is the best tool to create UML diagrams? Pin
gilvani20-Nov-12 1:02
gilvani20-Nov-12 1:02 
QuestionC# PAINT for school procet Pin
mibetty19-Nov-12 7:07
mibetty19-Nov-12 7:07 
AnswerRe: C# PAINT for school procet Pin
Richard MacCutchan19-Nov-12 8:04
mveRichard MacCutchan19-Nov-12 8:04 
AnswerRe: C# PAINT for school procet Pin
Pete O'Hanlon19-Nov-12 8:14
mvePete O'Hanlon19-Nov-12 8:14 
GeneralRe: C# PAINT for school procet Pin
mibetty19-Nov-12 11:06
mibetty19-Nov-12 11:06 
AnswerRe: C# PAINT for school procet Pin
Pascal Ganaye19-Nov-12 8:36
Pascal Ganaye19-Nov-12 8:36 
GeneralRe: C# PAINT for school procet Pin
Pete O'Hanlon19-Nov-12 8:54
mvePete O'Hanlon19-Nov-12 8:54 
AnswerRe: C# PAINT for school procet Pin
AmitGajjar20-Nov-12 19:40
professionalAmitGajjar20-Nov-12 19:40 

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.