|
public Stream OpenWrite (
Uri address,
string method
)
Would it be something like:
OpenWrite("http://nbc.com/formpage.aspx", "Not sure how to put in the formid here, place this text where the form would normally be.")
The MSDN doesn't provide an example.
|
|
|
|
|
The default method for http is post, so you only have to do:
someStream = OpenWrite("http://nbc.com/formpage.aspx")
Then you write the form data in url encoded format (just like a query string looks like).
The id of the form is not part of the form data, it is never sent to the server.
Experience is the sum of all the mistakes you have done.
|
|
|
|
|
How do I change a picturebox's opacity? Or is there even a way?
If not, is there a way to just make it less visible with effects.
- "Achieving all knowledge does not mean achieving all wisdom."
- "Welcome to the end."
|
|
|
|
|
I would guess that you have to create a PictureBox component that has such a thing, or maybe some kind of Paint method trick.
---modified
I looked at other forums on the web, and the question has been asked there, too. Without any solution other than creating a custom control.
"Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon
|
|
|
|
|
I guess you could obtain transparency through alpha blending. Check out this How to implement Alpha blending[^] article, maybe it helps.
Cheers,
Mircea
"Pay people peanuts and you get monkeys" - David Ogilvy
|
|
|
|
|
That might just fit the bill for him.
"Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon
|
|
|
|
|
Thanks.
- "Achieving all knowledge does not mean achieving all wisdom."
- "Welcome to the end."
|
|
|
|
|
Hi,
I am devoloping an Application in windows form that will search for files in a folder with .cs extension
i wrote the code by giving the path to the folder .
My application displays the path in a listbox ....but what i realy want to do is it should read a .cs file with many lines when user
selects it using a file open dialog.
is it possible to do that and display it in a listbox.
if it is possible can anybody give me the idea how i can do it.
this is where i am standing now....ie using the below written code it diaplays the path in the list box and message box but as i explained earlier thats not exactly what i want to do....
private void button1_Click(object sender, EventArgs e)
{
OpenFileDialog objDialog = new OpenFileDialog();
objDialog.Title = "Open .cs File";
objDialog.Filter = "C Sharp Files (*.cs)|*.cs|Text Files (*.txt)|*.txt";
objDialog.InitialDirectory = @"D:\back up d \users\k\ConsoleApplication1";
if (objDialog.ShowDialog() == DialogResult.OK)
{
MessageBox.Show(objDialog.FileName.ToString());
}
listBox1.Items.Add(@"D:\back up d \users\k\ConsoleApplication1");
Any help is welcome.
Thanking You
k
|
|
|
|
|
new2pgrmg wrote: hat i realy want to do is it should read a .cs file with many lines when user
selects it using a file open dialog
Are you trying to display the number of lines from within the FileOpenDialog? Or after the user selects the file and clicks Open?
"Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon
|
|
|
|
|
hi,
After the user selects the file and double clicks on it to open it.
thanks in advance
j
|
|
|
|
|
That is pretty trivial then. Look at the syntax and semantics of C# and see what defines a line, and start counting them.
"Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon
|
|
|
|
|
Thanks will start form there
k
|
|
|
|
|
Not a problem. If you get stumped, drop a line in the forum
"Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon
|
|
|
|
|
sure,Thanks again
Hi Again,
another doubt regarding this issue....
if i need the listbox to show whatever is inside the .cs line ie the all the codes inside the .cs file.....do i need to use Streaming??
how can i do it....
thanks
k
|
|
|
|
|
Hi,
I have a windows application with Datagridview for Product details (productcode, ProductName, and Color). I have to make the color column as a combobox, that the user can select the color from the list. The problem I am facing is, I don't need all colors to the combobox, I need colors available for that particular product only. (ie combobox list should be dynamic as per the indivitual Item or individual row). Please Help mE, its Urgent.....
with regard s
Binu Varghese
Thanks in Advance..........
-- modified at 11:54 Saturday 3rd November, 2007
|
|
|
|
|
metbinu2003@yahoo.com wrote: its Urgent.....
That is considered impolite on these forums.
"Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon
|
|
|
|
|
I have developed a C# Windows Application that uses a backgroundworker thread to loop through a list of lengthly data calculations. Within this backgroundworker thread, I would like to periodically write data to a Listbox control. Since the main Winform application is running on a different thread, I get the famous cross-thread error message.
How does one access controls on the main Winform from within a separate thread?
Any help will be greatly appreciated.
|
|
|
|
|
|
hi all
i need to use the brwser dialoge and chosse by fillter the picture.jpg or file type .txt and then use the picture to set it in picture control .Net
thanks all hellp me
Thaer
|
|
|
|
|
Hi , hope this useful
<br />
OpenFileDialog OpenFile = new OpenFileDialog();<br />
OpenFile.Multiselect = false;<br />
OpenFile.Filter = "All Images Files|*.bmp;*.gif;*.jpg;*.jpeg;*.png;*.tiff"; <br />
DialogResult OpenF = OpenFile.ShowDialog ();<br />
if (OpenF == DialogResult.Cancel )<br />
return;<br />
<br />
try<br />
{<br />
Picture1.Image = Image.FromFile (OpenFile.FileName);<br />
}<br />
catch<br />
{<br />
MessageBox.Show ("Invaild Picture");<br />
}
I know nothing , I know nothing
|
|
|
|
|
HI,
I like to know if and How can i Add an Image on The DataGridViewButtonColumn
(Not With The DataGridView_cellPainting Event)
THANKS
Have Fun
Never forget it
|
|
|
|
|
Hello,
I have a statefull java web service and I need to access it from c# application, I created a client in c# but it doesn't maintain session, so that subsequent calls create new sessions, how to access this service and maintain session?
thanks
|
|
|
|
|
Hi there
I'm trying to create a timeserver and would like you to take a look at the listening method I have because I'm not sure it's as good as it could be.
Does this look ok to you?
<br />
public void StartToListen()<br />
{<br />
try<br />
{<br />
timeServer = new TcpListener(System.Net.IPAddress.Any, listenPort);<br />
timeServer.Start();<br />
<br />
while (true)<br />
{<br />
connection = timeServer.AcceptSocket();<br />
<br />
socketStream = new NetworkStream(connection);<br />
<br />
reader = new BinaryReader(socketStream);<br />
writer = new BinaryWriter(socketStream);<br />
<br />
switch (listenPort)<br />
{<br />
case 13:<br />
writer.Write(GetDayTimeProtocol());<br />
break;<br />
case 37:<br />
writer.Write(GetTimeProtocol());<br />
break;<br />
}<br />
<br />
writer.Close();<br />
reader.Close();<br />
socketStream.Close();<br />
connection.Close();<br />
<br />
RaiseConnectionEvent(13);<br />
}<br />
}<br />
catch (Exception error)<br />
{<br />
RaiseError(error);<br />
StartToListen();<br />
}<br />
<br />
timeServer.Stop();<br />
}<br />
<br />
|
|
|
|
|
This looks just fine to me. Have you tried it out?
You can test the server by running it on your own machine,
and then using Telnet to connect to the server:
Start -> Run... -> Type: telnet localhost [port number]
Virtual1ty "Any fool can learn from his own mistakes, but a wise man learns from mistakes of others"
|
|
|
|
|
Yes it works fine, I just wasn't sure about the closing and stopping parts of the method
|
|
|
|