|
hi, I want sorce code of Image Encryption (with chaos signals) in C#, please help me.
|
|
|
|
|
Danial C wrote: I want sorce code of Image Encryption
It does not work like this here.
Here is what is expected of enquirers:
1. TRY first what you want to do! You may not find it too difficult.
2. Formulate what was done by you that looks like an issue/not working.
So, try them and tell if you face issues.
|
|
|
|
|
Hi I am new in C# I try an application like this
"
Title="Window1" Height="300" Width="300">
<grid>
<path name="myPath" stroke="Black"
="" strokethickness="1">
"
and
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;
namespace DynamicPoint002
{
///
/// Interaction logic for Window1.xaml
///
public partial class Window1 : Window
{
public Window1()
{
InitializeComponent();
PathFigure myPathFigure = new PathFigure();
myPathFigure.StartPoint = new Point(10, 50);
LineSegment myLineSegment = new LineSegment();
myLineSegment.Point = new Point(200, 70);
PathSegmentCollection myPathSegmentCollection = new PathSegmentCollection();
myPathSegmentCollection.Add(myLineSegment);
myPathFigure.Segments = myPathSegmentCollection;
PathFigureCollection myPathFigureCollection = new PathFigureCollection();
myPathFigureCollection.Add(myPathFigure);
PathGeometry myPathGeometry = new PathGeometry();
myPathGeometry.Figures = myPathFigureCollection;
Path myPath = new Path();
myPath.Stroke = Brushes.Black;
myPath.StrokeThickness = 1;
myPath.Data = myPathGeometry;
}
}
}
but I do not understand why did not show my the line defined already?
Thanks a lot!!!
H.
|
|
|
|
|
|
Hi friends,
Is possible to choose a instalation directory for my c# aplications ? (I´m using VCS2008)
all my apps istalls on a default user directory
thanks in advance
marcelo campos
|
|
|
|
|
Yes, of course. Most installers default to Program Files | Company | Product Name , but you can override this.
/ravi
|
|
|
|
|
No, it´s installing on a user sub path not to Program Files | Company | Product Name,
I´m using default C# 2008 installer
thanks
|
|
|
|
|
I use the free version of Advanced Installer[^] to install my app[^]. Although the default installation dir is Program Files | Company | Product Name , the app can be installed to any folder.
/ravi
|
|
|
|
|
I created a simple software program in C#, and would like to add a Calendar to it. Something that could have a monthly view (with a line or two written on particular days), and a daily view (or simply a popup that displays the events for that day, when clicked in monthly view). I'd like to be able to add events to specific dates, and then save the calendar to load up later.
I've searched high and low for any kind of tutorial, sample, or source code on how to do this, but haven't found much of anything that works. The closest was this component: http://www.accelerated-ideas.com/NET/aiFreeNETComponents_AICalendar.aspx, which would actually work perfect if it didn't freeze up.
I haven't done much in the saving area with c#, except writing/reading from an xml file, I'm assuming this probably won't work though with saving a calendar. Any ideas, tips, thoughts, links to resources, etc. on which direction to take is greatly appreciated! Thanks in advance.
|
|
|
|
|
There's no reason why you can't save calendar data to an XML file. However, you may want to consider a database for robustness and scalability.
Regarding UIs to display a calendar view, see these excellent CP controls:
And of course this classic: A Professional Calendar/Agenda View That You Will Use[^]
/ravi
|
|
|
|
|
hello everyone. I have created panels modeled as sheets of paper on which I draw text. My current implementation creates a lot of sheets (panels) sufficient to draw all the text. It happens that sometimes I create about 100 panels to draw all the text. I have realised this is not a good idea as much of memory is used.
I would like to know any idea I can implement viewing of the text by creating smaller count of sheets, something like streaming the text so that I draw only those once that become visible as the user scrolls the page. I'm finding it difficult to implement this.
Any sample code or idea on how I can implement this? I want it to work like that of Microsoft Word or Adobe Reader which is even capable of opening documents of 500 or 1000 pages. Thanks in advance.
|
|
|
|
|
You only need a small amount of painted panels, as many as you can possibly see at any one time.
So you need to figure which pages are visible and generate those, not the invisible ones.
And you can destroy the ones that become invisible (due to scrolling in the document); or you could keep a small cache of say 10 panels, so scrolling back and forth goes a bit faster.
|
|
|
|
|
Hi,
I have a gridview and a panel. the data in the gridview are the links of the names. When i click any link of the row of that gridview, based on the program, it should show or hide the panel. But the problem is when i first click the link, panel is showing or hiding based on which link i clicked but when i click another link from the gridview, it is not executing its function. Any idea why is that?
suchita
|
|
|
|
|
Probably a bug. Can you post the relevant code?
Bastard Programmer from Hell
|
|
|
|
|
Hi this is chandra.
I have one question. I have some predefined Chat controls. I want to create a chat control as a user control in c# by assigning some properties like chat name, chat width, chat height.How can i create this. can any one please suggest me on this.
Thanks
Chandrasekar
|
|
|
|
|
See this[^] tutorial on user controls at MSDN.
/ravi
|
|
|
|
|
+5, as it is the correct answer. As it reads, the user wants to put something in a UserControl.
Bastard Programmer from Hell
|
|
|
|
|
You create usercontrols in the same way that you created the chat-controls.
ChandrakanthGaddam wrote: I want to create a chat control as a user control in c# by assigning some
properties like chat name, chat width, chat height.How can i create this.
class MyChattyControl: UserControl
{
public string ChatName { get; set; }
}
Location, height and width are already part of the UserControl , so you needn't implement them.
Bastard Programmer from Hell
|
|
|
|
|
Hello,
i have the following code, which redirects the
output from a unmanged dll into a file:
[DllImport("Kernel32.dll", SetLastError = true) ]
public static extern int SetStdHandle(int device, IntPtr handle);
FileStream filestream;
StreamWriter streamwriter;
void Redirect()
{
int status;
IntPtr handle;
filestream = new FileStream("logfile.txt", FileMode.Create);
streamwriter = new StreamWriter(filestream);
streamwriter.AutoFlush = true;
Console.SetOut(streamwriter);
Console.SetError(streamwriter);
handle = filestream.Handle;
status = SetStdHandle(-11, handle); // set stdout
// Check status as needed
status = SetStdHandle(-12, handle); // set stderr
// Check status as needed
}
But I want to write the output to a winform-control
(textbox).
How can I do that?
Regards
Andreas
|
|
|
|
|
Form1.textbox.text = object_containing_textstring;
Binding 100,000 items to a list box can be just silly regardless of what pattern you are following. Jeremy Likness
|
|
|
|
|
If the DLL's running in process, its console output should go to your stdout/stderr already. That means that you shouldn't need to explicitly redirect it with SetStdHandle; try removing that and see where its console output goes. (It should still go to the file through the redirected Console.SetXxx in your app.)
Then you need to create a wrapper for TextWriter that will give you write events; inheriting from StringWriter and overriding Write(char) should do it, but you might need to override Write(string) as well.
Pass an instance of this subclass to Console.SetOut/SetErr and hook up the event to write into your control.
|
|
|
|
|
Hello,
thanks for your anwer.
The dll is not running in process, the dll runs
in a another process.
The code works for me, but redirects only into a
file.
I tried out also "alternatives" to the filestream,
like memorymappedviewstream (MemoryMappedFile), get
the handle, but nothing works.
Regards
Andreas
|
|
|
|
|
How do According to xml export excel?
|
|
|
|
|
You need to explain your problem more clearly.
Binding 100,000 items to a list box can be just silly regardless of what pattern you are following. Jeremy Likness
|
|
|
|
|
thank you,this problem have resolved:
1、writexml of Datatable Save a file.
2、I use excel 2003 or later Open.
3、OK.
|
|
|
|