Click here to Skip to main content
15,910,130 members
Home / Discussions / C#
   

C#

 
AnswerRe: How to convert html to pdf using C# tried to do but got error Pin
Jack Li10-Mar-09 5:57
Jack Li10-Mar-09 5:57 
AnswerRe: How to convert html to pdf using C# tried to do but got error Pin
Curtis Schlak.10-Mar-09 6:10
Curtis Schlak.10-Mar-09 6:10 
QuestionvSystem.Net.Sockets.Socket.ReceiveFrom(Byte[] buffer,Int32 offset,Int32 size,SocketFlags socketflags,Endpoint& remoteEP) [modified] Pin
mrithula810-Mar-09 4:28
mrithula810-Mar-09 4:28 
AnswerRe: vSystem.Net.Sockets.Socket.ReceiveFrom(Byte[] buffer,Int32 offset,Int32 size,SocketFlags socketflags,Endpoint& remoteEP) Pin
Jimmanuel10-Mar-09 6:27
Jimmanuel10-Mar-09 6:27 
GeneralRe: vSystem.Net.Sockets.Socket.ReceiveFrom(Byte[] buffer,Int32 offset,Int32 size,SocketFlags socketflags,Endpoint& remoteEP) Pin
mrithula811-Mar-09 19:01
mrithula811-Mar-09 19:01 
GeneralRe: vSystem.Net.Sockets.Socket.ReceiveFrom(Byte[] buffer,Int32 offset,Int32 size,SocketFlags socketflags,Endpoint& remoteEP) Pin
Jimmanuel12-Mar-09 3:28
Jimmanuel12-Mar-09 3:28 
AnswerRe: vSystem.Net.Sockets.Socket.ReceiveFrom(Byte[] buffer,Int32 offset,Int32 size,SocketFlags socketflags,Endpoint& remoteEP) Pin
mcldev10-Mar-09 10:32
mcldev10-Mar-09 10:32 
QuestionCan't use base canvas as event dispatcher? Pin
emptythetill10-Mar-09 3:50
emptythetill10-Mar-09 3:50 
Hello.

I'm trying to get an object to go where a mouse click occurs, my XAML:

<pre>&lt;Window
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
x:Class="bricksMenu.Window1"
x:Name="Window"
Title="Window1"
Width="640" Height="480" Background="Black"&gt;

&lt;Canvas Name="baseCanvas" MouseDown="baseCanvas_MouseDown"&gt;
&lt;Canvas Name="whiteSquare" Width="50" Height="50" Background="White" Canvas.Left="25" Canvas.Top="25"/&gt;
&lt;Canvas Name="redSquare" Width="50" Height="50" Background="Red" Canvas.Left="50" Canvas.Top="50"/&gt;
&lt;/Canvas&gt;
&lt;/Window&gt;</pre>

and the C Sharp behind:

<pre>namespace bricksMenu
{
/// &lt;summary&gt;
/// Interaction logic for Window1.xaml
/// &lt;/summary&gt;
public partial class Window1 : Window
{

public Window1()
{
this.InitializeComponent();

// Insert code required on object creation below this point.
}

private void baseCanvas_MouseDown(object sender, MouseButtonEventArgs e)
{
double mouseX;
double mouseY;
Point position = e.GetPosition(this);
mouseX = position.X;
mouseY = position.Y;
DoubleAnimation followMouseX = new DoubleAnimation(mouseX, TimeSpan.FromMilliseconds(600));
DoubleAnimation followMouseY = new DoubleAnimation(mouseY, TimeSpan.FromMilliseconds(600));
redSquare.BeginAnimation(Canvas.LeftProperty, followMouseX);
redSquare.BeginAnimation(Canvas.TopProperty, followMouseY);
}
}
}</pre>

The idea is you click on the black background, the red square goes to that point. However, I need to click on the red sqaure to make anything happen, even though the event dispatcher is not on that canvas. Any ideas?

Regards, E.
AnswerRe: Can't use base canvas as event dispatcher? Pin
emptythetill10-Mar-09 5:28
emptythetill10-Mar-09 5:28 
QuestionAdvice on Next Step Pin
TheScientistIsDead10-Mar-09 3:47
TheScientistIsDead10-Mar-09 3:47 
AnswerRe: Advice on Next Step Pin
Xmen Real 10-Mar-09 3:54
professional Xmen Real 10-Mar-09 3:54 
GeneralRe: Advice on Next Step Pin
Curtis Schlak.10-Mar-09 5:43
Curtis Schlak.10-Mar-09 5:43 
GeneralRe: Advice on Next Step Pin
Xmen Real 10-Mar-09 6:29
professional Xmen Real 10-Mar-09 6:29 
Questionneed help on C# ITEXT - Convert html to pdf Pin
YiXiang_8910-Mar-09 3:42
YiXiang_8910-Mar-09 3:42 
AnswerRe: need help on C# ITEXT - Convert html to pdf Pin
Yusuf10-Mar-09 3:46
Yusuf10-Mar-09 3:46 
QuestionActiveFomr.Invoke Pin
thomaxz.tc10-Mar-09 3:35
thomaxz.tc10-Mar-09 3:35 
AnswerRe: ActiveFomr.Invoke Pin
thomaxz.tc10-Mar-09 3:37
thomaxz.tc10-Mar-09 3:37 
GeneralRe: ActiveFomr.Invoke Pin
Xmen Real 10-Mar-09 3:58
professional Xmen Real 10-Mar-09 3:58 
GeneralRe: ActiveFomr.Invoke Pin
thomaxz.tc10-Mar-09 4:15
thomaxz.tc10-Mar-09 4:15 
GeneralRe: ActiveFomr.Invoke Pin
Xmen Real 10-Mar-09 4:22
professional Xmen Real 10-Mar-09 4:22 
GeneralRe: ActiveFomr.Invoke [modified] Pin
thomaxz.tc10-Mar-09 4:27
thomaxz.tc10-Mar-09 4:27 
GeneralRe: ActiveFomr.Invoke Pin
thomaxz.tc10-Mar-09 5:00
thomaxz.tc10-Mar-09 5:00 
GeneralRe: ActiveFomr.Invoke Pin
Xmen Real 10-Mar-09 5:31
professional Xmen Real 10-Mar-09 5:31 
QuestionReversing letters in a word Pin
Johnny Jackson10-Mar-09 3:18
Johnny Jackson10-Mar-09 3:18 
AnswerRe: Reversing letters in a word Pin
dan!sh 10-Mar-09 3:20
professional dan!sh 10-Mar-09 3:20 

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.