|
i've got it Thank you soooooooo much. All we needed was one more "\"" in the beginning of the code it should look like this:
startInfo.Arguments = "/C" + "\"" + "\"" + @Convert.ToString(TempPath) + "\\fop.bat\" -xml \"" + @Convert.ToString(TempPath) + "\\ClientRecordCard.xml\" -xsl \"" + @Convert.ToString(TempPath) + "\\" + @Convert.ToString(TempName) + ".xsl\" -pdf \"" + @Convert.ToString(Salon.Library.GlobalVariables.Reports_Path) + "\\ClientRecordCard.pdf\"";
The Bold part is the extra i was talking about.
THANK YOU! i've been strugling with this since last week Monday. Now i can sleep soundly.
He who laughs last...
|
|
|
|
|
When trying to construct a long string like this, it's much easier to troubleshoot if you start with a single substring and add mroe one at a time after checking the last one works as intented, by printing ot the console.
|
|
|
|
|
thanks for taking the time to try and help me. i've found the problem.
He who laughs last...
|
|
|
|
|
Hey
So I have a XML with DataSet in it, in the DataSet I have 2 DataTables, in each DataTable I have a Unique ID, and I did to this row, auto-inc, and don't allow DBNull, and it's readonly.
So when I try to do NewRow(), and add it without setting the ID column, it throws an Exception DataColumn 'ID' can't allow DBNull.
So how can I do it as UNIQUE ID? do I need to allow DBNull?
Thanks in advanced...
NaNg.
|
|
|
|
|
Hi,
I have hundrets of applications in excel from which I get data from c# - it works.. but some people changed the original pattern of the excel file (for example they merged some cells).. What to do? Is there eny posobility to compary only cells addresses?
Please give me some code maybe - the case is extremally urgent and I didn't know that people would change these documents for their needs....
|
|
|
|
|
No ideas ?
|
|
|
|
|
if the problem is with the user changing the excel file, any remediation will have to be in excel. You probably need to reissue the SSes so that a password is needed to make that sort of change.
|
|
|
|
|
Eventually the only thing I can do is :
someRange.MergeCells.ToString() - it returns true if cells are merged...
I would have to check all cells in rows which have critical values and are merged in charasteristic way...
I can't reissue them... Client want to have an info that this and this dcument hasn't passed the structural qualification...
|
|
|
|
|
I have a windows form with a single textbox. I have a few event handlers for some form events. When the focus is set to the textbox, and the user hits the Esc key, focus should be set to the form. But this is not happening.
private void textBox1_KeyPress(object sender, KeyPressEventArgs e)
{
if ((int)e.KeyChar == 27)
{
this.Focus();
}
}
No matter what I did, the focus did not move out of the textbox. How to set the focus back to the form again.?
Please help.
|
|
|
|
|
I'm pretty sure that if there is a control on a form that can receive the focus, the form itself cannot receive the focus. For instance, if the only control on the form is a label box, the FORM gets the focus since the label box cannot get the focus, but if there are any controls on the form that CAN get the focus, the form does not.
HTH
|
|
|
|
|
I have created a graphic object on a tabpage as follows:
Graphics g = null;
g = tabPage1.CreateGraphics();
g.DrawString(str_1, fnt, brsh, x, y);
g.Dispose();
str_1 has been displayed successfully. But how do I clear the existing text and display another text on the tabpage (tabpage.Controls.Clear() didn't work)?
At the moment, the problem is that the new text is displayed on top of the existing ones.
|
|
|
|
|
You must draw the existing string using background color to clear it.
|
|
|
|
|
Well I was searching some information on RPC over HTTP programming in C#. I found many website that describe how to configure outlook 2003 for RPC over HTTP.
Well what is my requirement is I want to receive a mail of specific mailbox using RPC over HTTP from Exchange server programmatically in c#.
i.e. GetMail (username, password, server name);
I have credential of mailbox. By using this how can I make a request to check mail (mail related operation) (don’t know which format) to Exchange server (RPC proxy server)?
For example if I want to use POP3 protocol I will do following steps
Create tcp/ip socket and connect to server on port 110.
Using socket. send() method I will pass command following command
USER <usename>
PASS <password>
LIST –list all msg no
RETR <msgno> -display message
QUIT –logout
Here I know
• How to connect and which port is for POP protocol.
• How to send command
• Functionality of each command
• Response and the format of response
In same manner I am trying to understand about RPC-HTTP protocol. I think there should be some web service on exchange server that provide interface to login and to do mail related operation. I am not sure .
• How to send request (consume any webserviece or create httpwebrequest object o)
• Where to send request (which port 80 ,143 or 6001…)
• Under which format needs to send request
• What will be the response
• Format of the response (that enable how to parse the response)
• List of request command
How to go about this? I am stuck here.
Any help on this would be great to me.
UHS
-- modified at 10:32 Tuesday 30th May, 2006
|
|
|
|
|
Hi,
May be this is an easy thing for you, I am struggling with this as I am a beginner.I am trying to pass "'" to the javascript.
Example: "Nina's doll"
I must pass this sentence to javascript. I tried like this from C#
test=test.Replace("'","\'");
and also like this
test=System.Text.RegularExpressions.Regex.Replace(test,"'","\'");
If I give something else in the replace function insteadof "\'" it is working.
Please help me.
Thanks in advance
-- modified at 7:18 Tuesday 30th May, 2006
|
|
|
|
|
test=test.Replace("'","\\'");
So close
|
|
|
|
|
Hi,
I (newbie) have come upon the following problem:
I use a multiline text box, and want the scrollbars to show only when they are needed.
If TextBox was inherited from ScrollableControl, this would be easy since the DisplayRectangle Dimensions would be different from the ClientSize - whenever there are changes to the text box, I could check if the DisplayRectangle is bigger than the ClientSize, and then add the scroll bars.
But since TextBox is not inherited from ScrollableControl, the DisplayRectangle is always the same like the ClientSize.
Is there another way to find out the size of the virtual client size (besides calculating it from the number of lines and the height of the font)?
Thanks and best regards,
Christian
|
|
|
|
|
Christian Pothmann wrote: besides calculating it from the number of lines and the height of the font
You have a problem with that?
|
|
|
|
|
Sorry to say this, but - Well yes.
It seems unnecessary complicated. I mean, if I set the ScrollBars property to "vertical" for instance, and put a lot of text into the box, Windows or .NET or whomever will calculate the length of the scrolling "button" automatically, so it knows the size of the virtual window already. Just I don't know how to get it from Windows.
That is, I did not know.
I found a method "GetPreferredSize" which returns the size of the virtual window. Hooray. Took me all morning and I don't know whether it was worth the effort, but at least this detour took me around a lot of .NET.
Best regards
Christian
|
|
|
|
|
hi!
I search about this:
Is there any component or dll. that we can use in our application as tools to help user use this tools to type his/her c# code in c# environment and compile or pars it?if the answer is yes, where can i find it?
plz answer it as soon as possible!
thanks
|
|
|
|
|
Hello!
I got a few problems. Let´s start:
I made a program that runs another (automaticly)...
for example:
< Process p = new Process();
ProcessStartInfo startInfo = new ProcessStartInfo();
startInfo.FileName = @"C:\Corel\CorelDraw.exe";
p.StartInfo = startInfo;
p.Start();>
As you can see there isnt a computer that can load instantly, so...
I would like to know if there is any function that can tells me when "CorelDraw" is loaded?
I made a "infinite" loop with Thread.Sleep where it checks a lot of time if p.MainWindowTitle is equal to "Corel Draw" (it checks if my program is loaded) or if part of the Title contains "Corel Draw" but I got some bugs... 1 of them is if I start Sleep function just after p.Start() just to wait until my program is loaded, it seems Corel will not load at all and my loop is going to literaly to infinite, the other problem is that I must check the comparison when the program is fully loaded =/
I got a few more questions ...
Does anyone know how to send an automatic command... for example: "Ctrl+A" (select all)
or if I can interact with the Corel... like automaticly select "File -> Import" after that Import a file another folder. ??
Thanks!! (sorry for bad english)
|
|
|
|
|
i use follow functions for loadind my html pages,there are some pictures in my source code of html page , that have relative src ,
when the browser navigate , the pictures didn't show!!!
what can i do??
private void Form2_Load(object sender, System.EventArgs e)<br />
{<br />
<br />
object empty = System.Reflection.Missing.Value;<br />
axWebBrowser1.Navigate("about:blank", ref empty, ref empty, ref empty, ref empty);<br />
}<br />
<br />
<br />
public void html_load(string context,string title)<br />
{<br />
string SourceCode="";<br />
SourceCode="<html><head><title>" + title + "</title></head><body>" + context+ "</body></html>";<br />
mshtml.IHTMLDocument2 doc = axWebBrowser1.Document as mshtml.IHTMLDocument2;<br />
<br />
doc.clear();<br />
doc.writeln(SourceCode); <br />
doc.close();<br />
}
|
|
|
|
|
I'm not sure but this might help:
object path = [[your relative paht]] + "test.htm";
object missing = System.Reflection.Missing.Value;
this.axWebBrowser1.Navigate2(ref path, ref missing, ref missing, ref missing, ref missing);
instead of opening the HTML document as a text file, "navigate2" it.
yours,
pAyAm AssAdi
|
|
|
|
|
hi all,
is it possible to restrict access to some of tabpages of a tabcontrol ?
tabcontrols have attributes like Visible or Enable, whereas tabpages dont have such properties ;(
there is one property IsAccessible. i set this to false but its only not accessible when form loads. if a click on a different tabpage then click back to the previous one i can again see its content.
all i want is to hide or restrict a tabpage not just for a moment but during form is open.
thanks in advance,
bye.
|
|
|
|
|
Use the event "Click" from TabControl.
private void tabControl1_SelectedIndexChanged(object sender, System.EventArgs e)
{
tabControl1.SelectedIndex = 0;
}
This code will select only tabPage0.
|
|
|
|
|
Mehmet Fatih Akbulut wrote: all i want is to hide
TabPage has a Hide method
|
|
|
|