|
Your function resembled a lot some of the win32 user32.dll
Look at www.pinvoke.net to get some ideas based on the functions of windows
|
|
|
|
|
I've looked there, but unfortunately, have only seen the delegate definition without any examples on implementing it. The only reference I've found that comes close is a newsgroup post with someone having the same trouble. Of course, his question went unanswered as well. Luck of the Irish at it's best. lol
|
|
|
|
|
I made a new thread cause i managed to solve my problem and thereby create a new one: I have a treeview with process names, there aren't any child nodes, the nodes' names are the process ID and i add them like so:
for (int i = 0; i < a.Length; i++)
{
treeView1.Nodes.Add(a[i].Id.ToString(), a[i].ProcessName);
}
Now, i have a timer that adds \ removes processes so i need to check the list if the process exists, and i managed to get the search thing working but i can't seem to remove them, here's the code:
a = Process.GetProcesses();
for (int i = 0; i < a.Length; i++)
{
bool found = false;
if (treeView1.Nodes.Find(a[i].Id.ToString(), true).Length == 0)
treeView1.Nodes.Add(a[i].Id.ToString(), a[i].ProcessName);
for (int m = 0; m < treeView1.Nodes.Count;m++ )
{
if (a[i].Id.ToString() == treeView1.Nodes[m].Name)
found = true;
}
if (found == false)
treeView1.Nodes.Remove(treeView1.Nodes[a[i].Id.ToString()]);
}
How can i fix it, or is it a more efficient way of doing it?
|
|
|
|
|
a = Process.GetProcesses();
treeView1.Nodes.Clear();
foreach (Process p in a)
treeView1.Nodes.Add(p.Id.ToString(), p.ProcessName); /ravi
|
|
|
|
|
Does anyone know how to add the raw HTML help project to a C# project so that they are compiled together.
I would like to be able to compile the help each time I build rather than use a pre-compiled one.
Many thanks
Ant.
I'm hard, yet soft. I'm coloured, yet clear. I'm fruity and sweet. I'm jelly, what am I? Muse on it further, I shall return! - David Walliams (Little Britain)
|
|
|
|
|
Confused
Do you want a Web application project with Windows application project both work in hand ? or some thing different ?
<l>Thanks and Regards
Sandeep
|
|
|
|
|
What I want is to be able to take my HTML Help project and ensure that that is built when I compile my C# project that requires that help.
I was just wondering how people have done this as I did not have a solution when I posted the message. In the mean time I have created a .bat file that is called on pre-build for the C# project and creates the help file that way.
It may not be perfect but it is functional and fit for purpose.
Thanks for your interest.
Ant.
I'm hard, yet soft. I'm coloured, yet clear. I'm fruity and sweet. I'm jelly, what am I? Muse on it further, I shall return! - David Walliams (Little Britain)
|
|
|
|
|
i have a string, i want to add "\u" for each 4 charachters of the string,
when i write a for loop, it refuses adding \u, i have to add @\u
for example: i have the strng 541236589632 i want to transfer it to \u5412\u3658\u9632
how can i do this on c# application
Thanks alot
Hamody
|
|
|
|
|
I assuming you are having problems with the escape character I would define the string that you are adding as follows:
private const string mystring = @"\u";
This tells the compiler to take the string litterally and not use the slash as an escape character.
Ant.
I'm hard, yet soft. I'm coloured, yet clear. I'm fruity and sweet. I'm jelly, what am I? Muse on it further, I shall return! - David Walliams (Little Britain)
|
|
|
|
|
hello there, it doesnt solve the problem, i still have duble of "\\" string ....
it didnt solve the problem
how d u see???
Thanks alot
Hamody
|
|
|
|
|
If you post your code and I will take a look at it then. Please also show input and output for your code and the desired output.
I am not 100% sure what you are having a problem with otherwise.
Ant.
I'm hard, yet soft. I'm coloured, yet clear. I'm fruity and sweet. I'm jelly, what am I? Muse on it further, I shall return! - David Walliams (Little Britain)
|
|
|
|
|
string ResultMessage="";
string varMessage;
varMessage = MMOUTBOUND_DGV.Rows[0].Cells[2].Value.ToString();
for (int k = 0; k <= varMessage.Length - 1; k++)
{
ResultMessage = ResultMessage + "\u" + varMessage.Substring(k, 4);
k = k + 3;
}
MessageBox.Show("ResultMessage ");
Thanks alot
Hamody
|
|
|
|
|
First may i sugest in the for loop
for (int k = 0; k <= varMessage.Length - 1; k=k+4)
and eliminate the k=k=3;
As suggested before your code must be
ResultMessage = ResultMessage + @"\u" + varMessage.Substring(k, 4);
|
|
|
|
|
helloz,
am not using an escape characters, i want to change from the ASCII code, so for example:
when i write in code:
messagebox.show("\u0064");
it will show me the character 'd' on the message that appear, so i can't use '\\u' instead of using '\u'
now what can i so to solve this problem
Thanks alot
Hamody
|
|
|
|
|
OK, you have a choice when escape characters are wanted as literal in strings:
you need to change
+ "\u" +
to
+ @"\u" +
or
+ "\\u" +
Ant.
I'm hard, yet soft. I'm coloured, yet clear. I'm fruity and sweet. I'm jelly, what am I? Muse on it further, I shall return! - David Walliams (Little Britain)
|
|
|
|
|
helloz,
am not using an escape characters, i want to change from the ASCII code, so for example:
when i write in code:
messagebox.show("\u0064");
it will show me the character 'd' on the message that appear, so i can't use '\\u' instead of using '\u'
now what can i so to solve this problem
Thanks alot
Hamody
|
|
|
|
|
helloz,
am not using an escape characters, i want to change from the ASCII code, so for example:
when i write in code:
messagebox.show("\u0064");
it will show me the character 'd' on the message that appear, so i can't use '\\u' instead of using '\u'
now what can i so to solve this problem
Thanks alot
Hamody
|
|
|
|
|
Hey guys, i got the solution which is:
private string HexAsciiConvert(string hex)
{
StringBuilder sb = new StringBuilder();
for (int i = 0; i <= hex.Length - 4; i += 4)
{
sb.Append(Convert.ToString(Convert.ToChar(Int32.Parse(hex.Substring(i, 4), System.Globalization.NumberStyles.HexNumber))));
}
return sb.ToString();
}
enjoy and thanks to all of u
Thanks alot
Hamody
|
|
|
|
|
Aloha,
We are creating a windows app. that will read some information from a website.
Our problem is that the target website doesn't like our requests, it complains that our app. is an undefined HTTP_USER_AGENT.
We can access the website with IE and Firefox, so now we are looking for a way to make our windows app. look like one of these browsers when it requests a webpage.
Any idea how we can do that?
Thanks,
|
|
|
|
|
Try looking up the WebBrowser Control which comes with .Net2
|
|
|
|
|
We have tried that, it still complains about the user agent
|
|
|
|
|
Can you try this
public void functionToNavigate()
{
object oMissing = null;
HTMLDocumentClass objects=new HTMLDocumentClass();
axWebBrowser1.Navigate(URL,ref oMissing,ref oMissing,ref oMissing,ref oMissing);
while(axWebBrowser1.Busy)
{
Application.DoEvents();
}
objects=(HTMLDocumentClass)axWebBrowser1.Document;
}
private void axWebBrowser1_Enter(object sender, System.EventArgs e)
{
}
Why you are getting this error any idea ?
<l>Thanks and Regards
Sandeep
|
|
|
|
|
Hi
i have develop one application in which i need to read data from Web page which is written by javascript function i alter my solution by different logic but i got the parameters which are passed to the javascript funciton
read whole by reaading whole respnonse in the stream reader
HttpWebRequest myHttpWebRequest = (HttpWebRequest)WebRequest.Create(webPageObject.Url);<br />
WebProxy myProxy = new WebProxy("10.4.10.66", 80);<br />
<br />
myHttpWebRequest.Proxy = myProxy;<br />
Uri siteUri = new Uri(webPageObject.Url);<br />
c = new Cookie("chasezip",_wholeZipCode, "/", ".chase.com");<br />
c2 = new Cookie("marketlist",webPageObject.MarketList, "/", ".chase.com");<br />
<br />
myHttpWebRequest.CookieContainer = new CookieContainer();<br />
<br />
CookieCollection cookiesBefore= myHttpWebRequest.CookieContainer.GetCookies(siteUri);<br />
<br />
myHttpWebRequest.CookieContainer.Add(siteUri, c);<br />
myHttpWebRequest.CookieContainer.Add(siteUri, c2);<br />
<br />
CookieCollection cookiesAfter= myHttpWebRequest.CookieContainer.GetCookies(siteUri);<br />
<br />
<br />
<br />
<br />
response = (HttpWebResponse)myHttpWebRequest.GetResponse();<br />
resStream = response.GetResponseStream();<br />
<br />
<br />
_streamReader = new StreamReader(resStream);<br />
Hope i am on right track to understand you
<l>Thanks and Regards
Sandeep
|
|
|
|
|
I have this message of error when I run my app with a server and a client and I have serializable objects.
An unhandled exception of type
'System.Runtime.Serialization.SerializationException' occured
Additional information :
Because of security of restriction, the type
System.Runtime.Remoting>ObjRef cannot be accessed.
|
|
|
|
|
This is a restriction with remoting and serialization I'm assuming.
It is caused because you need to alter the typeFilterLevel settings from their default to "Full"
Below is an example of the App.Config section. You can do this in code too, just search for typefilterlevel.
<serverProviders>
<formatter ref="binary" typeFilterLevel="Full" />
</serverProviders>
Hope that helps
Ant.
I'm hard, yet soft. I'm coloured, yet clear. I'm fruity and sweet. I'm jelly, what am I? Muse on it further, I shall return! - David Walliams (Little Britain)
|
|
|
|