|
Hello.
I want to create a mini slideshow which can present document like powerpoint by C# winform.
Please help me!!!
Thx!!!
|
|
|
|
|
You already told us all that two days ago, so I must assume you're nearly finished.
Did you have any specific question, so somebody could get a chance and help you?
|
|
|
|
|
Oh, yes.
I want to ask about:
Control can use to create slide and how to present it like powerpoint when I press F5 key.
|
|
|
|
|
That is still very vague. What is the input? are they single images? what format? or is it a single document? maybe a .PPS file?
If it is an official PowerPoint format, and you can see it with Internet Explorer, then have a look at WebBrowser. Using Navigate() it might be willing to show the same; not sure how to navigate within the document, a little Google action should tell you.
If it is individual images, you could paint them one by one to any surface, e.g. a Panel (or a PictureBox).
What have you done so far?
|
|
|
|
|
Oh, that control is a container can contain other controls as textbox, button, picturebox... which are designed by me.
I want to create many slides and present them like powerpoint slideshow!!
|
|
|
|
|
so show one page at a time on a surface of your choice: a Form, a Panel, a TabPage, it depends on the functionality you want. As you are not providing anything tangible, I can't help you further.
|
|
|
|
|
Hello everybody
Can somebody help me?
I need a idea in wich direction i have to search the solution??
My code:
Class Program
{
static void Main(string[] args)
{
string filePath = "C:\\test.txt";
StreamReader streamReader = new StreamReader(filePath);
string text = streamReader.ReadToEnd();
streamReader.Close();
int pos = 0;
int pos1= 0;
string output = "";
pos = text.IndexOf("MERKMAL $");
output = text.Substring(pos+7,6);
Console.WriteLine(output.ToString());
In this txt file there are some vaues look like this:
MERKMAL $001$
MERKMAL $002$
MERKMAL $003$
MERKMAL $111$
MERKMAL $222$
MERKMAL $333$
I have to parse the $...$ values include the $001$, so my problem how can i search in the next line
normaly i want to use like in AutoIt @crlf but how can i do this i c#, i want to do this later with a loop!
Thanks a lot
sorry for my bad english i wok on it .
|
|
|
|
|
Hi,
there are basically two ways to do this:
1.
use a string.IndexOf() overload that takes a start parameter, so you can start each new search 6 characters behind the current match. Put it all in a loop.
2.
use a regular expression, and a foreach on the result of Regex.Match.
|
|
|
|
|
Here is a regex solution:
string text=File.ReadAllText(path);
foreach (Match m in Regex.Matches(text, @"MERKMAL \$([0-9]*)\$")) {
log("found: "+m.Groups[1]);
}
|
|
|
|
|
hi, I'm able to close all running applications by using; Process.Kill() or CloseMainWindow() But then it closes everything. Also, ProcessName property doesn't help because I don't know the names of applications. What I'm trying to do is to close only the applications like; browser, messenger, games, file browser etc. Because before a new user starts using the pc, there should be no running application, so that the user makes a fresh start. Any clue about it is welcomed, thanks.
|
|
|
|
|
log off
|
|
|
|
|
thanks Luc, as far as I know, network connections goes after logging off. this is an internet cafe software so I need the network connection to be able to open a new account for the new user. Any other way?
|
|
|
|
|
How about this: take a list of process IDs before the user starts; kill every process not in the list when the user is done.
|
|
|
|
|
yes you're right! Thank you very much!
|
|
|
|
|
you're welcome.
|
|
|
|
|
hi Luc, I didn't wanna post a new question as this is the same issue.Could you please see below code and say where I'm doing wrong? Briefly, I just want to get the processes that are run after my form loaded. Thanks.
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
Process[] processesBefore;
Process[] processesAfter;
private void Form1_Load(object sender, EventArgs e)
{
processesBefore = Process.GetProcesses();
}
private void button1_Click(object sender, EventArgs e)
{
processesAfter = Process.GetProcesses();
CompareProcesses compare = new CompareProcesses();
IEnumerable<Process> theDifference = processesAfter.Except(processesBefore, compare);
foreach (Process p in theDifference)
{
listboxDifference.Items.Add(p.ProcessName);
}
}
}
public class CompareProcesses : IEqualityComparer<Process>
{
public bool Equals(Process x, Process y)
{
return (x == y);
}
public int GetHashCode(Process obj)
{
return obj.GetHashCode() ^ obj.GetHashCode();
}
}
|
|
|
|
|
Hi,
a Process is an object that describes a process (note the leading capital). When two Processes are the same, so are the processes; when two Processes are different, they can still point to one and the same process. So you have discovered GetProcesses creates an array of all new Process instances...
I did suggest you compare process IDs, as those are unique; your code doesn't do that.
|
|
|
|
|
|
you're welcome!
|
|
|
|
|
hi Luc, can I ask one more minor question? I don't see the open file browser windows among the processes and so I can't close them. Are they not process? How can I close them?
|
|
|
|
|
|
ok, here goes, i have been stuck on this for hours and getting no further so i thought i would ask you lot ....
ok basically all this program is doing is when something is entered into txtfind (on form frmfindandreplace [form 2] ) it will be then pasted into a richtextbox ... this is named InsertText. This is on form 1 of course ... so i am transferring the string from frmfindandreplace to form 1...
here is my code...(i have edited it to make it smaller so that you can see my problem more clearer)
frmFindReplace
public string findme
{
get { return txtfind.Text; }
set { txtfind.Text = value; }
}
private void bnFind_Click(object sender, EventArgs e)
{
if (Clicked != null)
Clicked(true);
}
Form 1
public frmFindReplace frmFindReplace{get;set;}
public window()
{
void find_Clicked(bool Yes)
{
InsertText(frmFindReplace.findme);
}
}
thanks for all your help ... i keep getting the error message about it being a null value .... why ?
|
|
|
|
|
did you set frmFindReplace property ?
if yes, you should show InsertText code
TVMU^P[[IGIOQHG^JSH`A#@`RFJ\c^JPL>;"[,*/|+&WLEZGc`AFXc!L
%^]*IRXD#@GKCQ`R\^SF_WcHbORY87֦ʻ6ϣN8ȤBcRAV\Z^&SU~%CSWQ@#2
W_AD`EPABIKRDFVS)EVLQK)JKQUFK[M`UKs*$GwU#QDXBER@CBN%
R0~53%eYrd8mt^7Z6]iTF+(EWfJ9zaK-iTV.C\y<pjxsg-b$f4ia>
-----------------------------------------------
128 bit encrypted signature, crack if you can
|
|
|
|
|
That is because the property frmFindReplace is null. Are you setting that property somewhere?
How are you opening the FindReplace form? You will need to keep that instance of the form in the Form1 to access the correct value of the property findme in the form1.
|
|
|
|
|
how do i store the property ?
and i am opening the form as follows :
private void findAndReplaceToolStripMenuItem_Click(object sender, EventArgs e)
{
frmFindReplace find = new frmFindReplace();
find.Clicked += new ButtonClick(find_Clicked);
find.ShowDialog();
}
|
|
|
|