|
hi,
thanks for your reply. i didn't post the code since it's very long. basically i only used BeginSend()(tcp socket) method to send the message and i get to this part of the other application :
//------WebService file--------
public string EndSendMessage(System.IAsyncResult asyncResult) {
object[] results = this.EndInvoke(asyncResult);
return ((string)(results[0]));
}
//---Form.cs file---------
MyWebService ws = new MyWebService();
//other code here...
string str = ws.EndSendMessage(); //<---- string is null
I've been looking around for a code that works like this but i can't find one. Is it really possible to send a message from a TCP socket to a Webservice?
Thanks.
|
|
|
|
|
Hi
I have two form, a main form with a button, its text is Show. When click this button, it shows me the second form and the main form is hidden. The second form with a button, text is Show Main. When click it, the main form is shown. But I cannot do this.
Please help me!
Thanks!
|
|
|
|
|
How are you showing the second form? If you're using ShowDialog , then the second form is modal, so you can't show the first form when it is visible. You might want to use Show instead.
Regards
Senthil
_____________________________
My Blog | My Articles | My Flickr | WinMacro
|
|
|
|
|
Using Vs2005, I cant get my custom paint to work during designtime.
Heres the example:
Start a new windows app.
Add a user control
Paste the following into the usercontrol code:
protected override void OnPaintBackground(PaintEventArgs e)<br />
{<br />
base.OnPaintBackground(e);<br />
<br />
Graphics gx = e.Graphics;<br />
Pen pen = new Pen(Color.Red);<br />
Rectangle rect = e.ClipRectangle;<br />
rect.X += 10;<br />
rect.Y += 10;<br />
rect.Width -= 20;<br />
rect.Height -= 20;<br />
<br />
gx.DrawRectangle(pen, rect);<br />
}
Build the project.
Ok, basically, I only see my custom paint if I drag my control into a form.
If I just want to look at the customcontrol designer screen, I dont see my custom paint.
Am I missing something? Am i supposed to set a flag somewhere, like Ownerdrawn?
Any ideas why?
Andy
|
|
|
|
|
That's normal. In design mode of a user control only the InitializeComponent function is executed - nothing else.
|
|
|
|
|
Hi
I am a beginner level programmer. I want to running and closing another program (Excel,Word,winamp etc) by command. How can i accomplish this? Can you help me,pls..
|
|
|
|
|
|
I have retrieved the data and it appears in my list box, but I do not know how to have the data listed in columns instead of horizontally. Can you advise me on this.
Thanks.
TippyMoe
|
|
|
|
|
Do you mean List View? Because as far as I know the List Box control doesn't support columns.
Sean ![Smile | :)](https://www.codeproject.com/script/Forums/Images/smiley_smile.gif)
|
|
|
|
|
Thanks,
I am definitely looking for list boxes. I found what I needed. Thanks for your help.
Tippy
|
|
|
|
|
Had a look on ListBox.MultiColumn property?
|
|
|
|
|
Thanks, I will check that out.
|
|
|
|
|
I am having an issue with a loop. Basically what i'm wanting to do is copy the first path in listView1 then automatically move on to the next item on the listView1. I did some testing without the file.copy function in the loop and i am seeing it isn't moving to the next item. also it tries the same item again .
private void syncbut_Click(object sender, EventArgs e)
{
int filePathList = listView1.Items[0].Index;
int lv2name = listView2.Items[0].Index;
string fileName = listView2.Items[lv2name].Text;
string path = listView1.Items[filePathList].Text;
string path2 = textBox4.Text + fileName;
if (filePathList <= maxFilePath)
{
listView1.Items[filePathList].SubItems[2].Text = "Processing";
File.Copy(path, path2);
filePathList++;
lv2name++;
}
this.syncstat.Text = "Status: All Files Have Copied Successfully";
}
any help would be appreciated!
Don't be overcome by evil, but overcome evil with good
|
|
|
|
|
Where is the loop?
The code you posted has no while,foreach or for loop...it will copy exatly one file (the first) each time it is called.
We need to graduate from the ridiculous notion that greed is some kind of elixir for capitalism - it's the downfall of capitalism. Self-interest, maybe, but self-interest run amok does not serve anyone. The core value of conscious capitalism is enlightened self-interest.
Patricia Aburdene
Bulls make money, bears make money, pigs get slaughtered.
Jim Cramer
|
|
|
|
|
whoops i thought i would be able to use an if statement to process the loop. I have modified it a bit now but now i am getting an error:
An unhandled exception of type 'System.ArgumentOutOfRangeException' occurred in System.Windows.Forms.dll
Additional information: InvalidArgument=Value of '1' is not valid for 'index'.
private void syncbut_Click(object sender, EventArgs e)
{
int filePathList = listView1.Items[0].Index;
int lv2name = listView2.Items[0].Index;
string fileName = listView2.Items[lv2name].Text;
string path = listView1.Items[filePathList].Text;
string path2 = textBox4.Text + fileName;
do
{
listView1.Items[filePathList].SubItems[2].Text = "Processing";
File.Copy(path, path2);
filePathList++;
lv2name++;
}
while (filePathList <= maxFilePath);
this.syncstat.Text = "Status: All Files Have Copied Successfully";
}
i'm trying to get it to start with the first item of the listview [0] then move to [1] and so on till the last one (maxFilePath)
Don't be overcome by evil, but overcome evil with good
|
|
|
|
|
sorry i forgot to add that the error points to:
listView1.Items[filePathList].SubItems[2].Text = "Processing";
Don't be overcome by evil, but overcome evil with good
|
|
|
|
|
Do listView1 and ListView2 contain the same number of Items?
(listview1.Items.Count == Listview2.Items.Count) ?
You are incrementing both...
We need to graduate from the ridiculous notion that greed is some kind of elixir for capitalism - it's the downfall of capitalism. Self-interest, maybe, but self-interest run amok does not serve anyone. The core value of conscious capitalism is enlightened self-interest.
Patricia Aburdene
Bulls make money, bears make money, pigs get slaughtered.
Jim Cramer
|
|
|
|
|
listView1.Items.Count is where my full path is (example: C:\file.exe) while listview2 is just file.exe
the way i wanted it original is for listView1.items.count to just show file.exe but actually have the value of C:\file.exe (or where the file is located). but i couldn't figure out how to mask on listView. so what i did in an openfile dialog was add the filepath (c:\file.exe) to one listview1 and add just the filename to listview2.
Its kind of hard to understand just by me typing it. I will just keep researching the issue.
Don't be overcome by evil, but overcome evil with good
|
|
|
|
|
Hi
is it possible to extend a webservice with plugins so that it provides new methods. These methods should be consumed by a client where also a plugin is needed.
Anyone got some tipps how to implement something like this?
|
|
|
|
|
|
I can't to see "make route table" in this site^^//
^^;;
and I did googling. but I can't^^;;
Do you know that make route table^^ or information site about route table with C#.
^^
help plz^^
have a good time^^
Nothing!! But gonzo!!
-- modified at 17:50 Saturday 29th April, 2006
|
|
|
|
|
I did search "routing protocol".
but I can't information about routing protocol with C#.
help me plz^^
Nothing!! But gonzo!!
|
|
|
|
|
Problem
1. I have an image datatype column in the database. It contains only text.
2. I am using strongly typed dataset as datasource for the crystal report. I have set the the column in which the image data is loaded to base64binary.
3. Just dragging the image field displays a bunch of hex data.
How can I convert this bunch of hex data to normal string or is there a way to display this image in crystal reports?
-
बुरा जो देखण मै चला, बुरा न िमलया कोय,
जो मन खोजा आपणा तो मुझसे बुरा न कोय।
Translation
|
|
|
|
|
Don't bother. Found a workaround.
-
बुरा जो देखण मै चला, बुरा न िमलया कोय,
जो मन खोजा आपणा तो मुझसे बुरा न कोय।
Translation
|
|
|
|
|
VB.NET 2.0 has the 'my.settings', is there a way to accomplish the same in C#?
|
|
|
|