|
|
hi, i like to know how to add
fade in/fade out effects to my usercontrol
Opacity works only with high level Objects (Form)
tnk' s
kobkob
|
|
|
|
|
I’m POSTING to an ashx file from my aplication.
What I want to do is just post information about some variables of my aplication, and never wait for an answer.
What I need is to avoid waiting for an answer, because I don’t need it.
I’m accesing the file this way.
-----------------------------
string queryString = "http://website/PrivateHandler.ashx";
System.Net.HttpWebRequest myHttpWebRequest = (System.Net.HttpWebRequest)WebRequest.Create(queryString);
myHttpWebRequest.Method = "POST";
myHttpWebRequest.ContentType = "application/x-www-form-urlencoded";
string strRequest = "mode=1&bID=1&gID=1";
UTF8Encoding objUTF8Encoding = new UTF8Encoding();
byte[] arrRequest = objUTF8Encoding.GetBytes(strRequest);
myHttpWebRequest.ContentLength = arrRequest.Length;
Stream strmRequest = myHttpWebRequest.GetRequestStream();
strmRequest.Write(arrRequest, 0, arrRequest.Length);
strmRequest.Close();
//Wait for an answer (I don’t need an answer).
System.Net.WebResponse resp = myHttpWebRequest.GetResponse();
System.IO.StreamReader sr = new System.IO.StreamReader(resp.GetResponseStream());
sr.ReadToEnd();
---------------------------------
WebResponse and ReadToEnd are there because if I don’t read what return, I can only call the ashx file twice and then the system hangs.
What I need is to post multiple times and never wait for an answer and waste performance because of that.
Is there a way to achieve what I need?
Thank you very much.
Martín Suárez Viacava
|
|
|
|
|
It appears your are trying to use an HTTPHandler as a Web Service. Why not just create a Web Service?
only two letters away from being an asset
|
|
|
|
|
Thanks for your answer.
If I use a WebService, won´t I have a lot of extra overhead?
I´m trying to avoid overhead as much as possible.
Thanks again.
Martín Suárez Viacava
|
|
|
|
|
You will have a better performing solution. A HTTPHandler isn't meant to be used in the manner you are trying.
"All an HTTPHandler does really is take an HTTPContext object and work out what to do with it."
http://aspalliance.com/articleViewer.aspx?aId=441&pId=[^]
only two letters away from being an asset
|
|
|
|
|
What about use asynchronous delegate?
|
|
|
|
|
Thanks again for your help.
xibeifeijian, won't that create a new thread to hear for the async answer?
Thanks.
Martín
|
|
|
|
|
put the code in a thread....
|
|
|
|
|
I am writing a C# application that detects USB drives as they are plugged in.
I want to do different automated operations on the drive depending on which USB drive I plug in (ie if it is a new drive or one that has been previously plugged in).
The easiest way to achieve this would be to read the hareware ID off the USB drive. Unfortuneately I do not no how to do this in C#.
Does anyone have any ideas on how I could achieve this or if there is a C# class that returns this type of info?
Regards
SpaceMonkey
|
|
|
|
|
|
dear you,
In MFC we has class Csemaphore,I want to ask you,what class we have in C#?
thanks
help me
|
|
|
|
|
|
Hi,
I have a windows service installed in my machine and User can create multipe instance of the Same service dynamically. Now the Problem is how to get the Name of all the Instance of the Windows Service from my windows Application using WMI ?
people laugh at me because they say im different and I laugh at them because they are all the same.
|
|
|
|
|
Are you sure it is a windows service? You can only install unique named windows services so I am a little confused by your statement about User can create multiple instances of the same service. The service is always running and perhaps the service launches a windows app then or something?
Ben
|
|
|
|
|
Of Course it is a windows service...The name of the Service is Of Course Unique...but has one Executable.
people laugh at me because they say im different and I laugh at them because they are all the same.
|
|
|
|
|
Hello everyone,
I have a DataGridView which is populated by data from a remote DataBase server. The following code show this:
OdbcAd = new System.Data.Odbc.OdbcDataAdapter("SELECT * FROM company;", OdbcCon);<br />
<br />
OdbcAd.Fill(myds4, "company");<br />
<br />
dataGridView4.DataSource = myds4.Tables["company"];
I was wondering if it is possible to access the data in the DataSet rather than in DataGridView?
For example:
I am using the following line of code to get the "company_name" value and display it in an TextBox.
txtCompanyName.Text = dataGridView4.Rows[FilterCompany_id].Cells["company_name"].Value.ToString();
My question is, rather than tapping into DataGridView4; can I tap into "myds4" which is the DataSet holding the entire unfiltered data since I am applying filters to the data shown in the DataGridView?
Thank you very much and have a great day.
Khoramdin
|
|
|
|
|
yes you can. myds4.Tables["company"][rownumber][columnnumber] or myds4.Tables["company"][rownumber]["columnname"]
-- modified at 14:46 Friday 1st June, 2007
|
|
|
|
|
does anyone know a way to make an event trigger if a key combo is pressed ( lets say ctrl+alt+insert) that would trigger an event to go
the problem is that the app may not be in focus
|
|
|
|
|
You can do it, but I am not sure you really want to. If you hook into the windows message loop you can pick up on all windows messages includeing keyboard keypresses, but it is pretty intensive and would most likely affect the proformace of your application and perhaps the performance of others as well. I guess I would ask why do you want to do this? Is there a better way to do the same thing? It would be un likely that your users would know this key press short cut.
Now if you are trying to write a nice little hack that is looking for control - alt del and then you are trying to get the password typed it etc. that is another issue. You won't find much help here on this site for that type of stuff.
Ben
|
|
|
|
|
the problem is that they are working seamlessly
there is an application they use that is run on a remote server
and on occasion it locks up and the user does not have access to ctrl alt delete becuase it is running on a remote session and that would open taskmanager for there local comptuer
the only solution i can think of is to run another application with the remote application ( two applications) and when ever it locks up set it a key stroke command so that the second program (my program) kills the first which will respawn in a few seconds
since the second app will not have its windows displayed i dont know how else to trigger it other than to use a keyboard shortcut
also since they will be wokring in the other application, My app wont be the primary focus
|
|
|
|
|
In the remote session you can right click on the task bar at the bottom and select task manager. That way they can see the task manager on the remote PC. I think that would be the best option.
Ben
|
|
|
|
|
i think you missed the part about it running seamlessly
yes its a remote desktop but only the one application is displayed on the users computer
it gives the illusion that its running localy
so the taskbar and the start button all that stuff is you local compuer
just the app is displayed and run remotly.
|
|
|
|
|
Wow, that is different. I guess that isn't the design I would go with. I am assuming this is a windows application? Is there a reason it needs to run on the remote server? Do your users only have lame PC's so their pc's won't actually run the app? Or perhaps you don't want to load the .net framework on their pc?
You can launch a windows app from a network server and it will run locally on the user's PC as long as the trust has been set up. I have actually written an article on this:
http://www.codeproject.com/dotnet/Using_MSI_or_a_strong_nam.asp[^]
Anyway, I think I would look at some other options to get out of that situtation if possible.
Ben
|
|
|
|
|
it actually has to do with 3 things
the computers are decent they could easily run the app
1) licensing is one reason , you dont have to buy for example 3000 copys of winword, only 1000 becuase only 1000 people would be on the server at any given time
2) is when you have 3000 or so users you only have to update the software on the remote server ( in our case we have 8 servers)
3) helps with remote access. we deploy allot of users to really sh*tty areas and they might not have a good connection . so if they do work and suddenly lose conductivity there session is still running at HQ and some one can go in and save it.
or they can connect an pop back in where they left off.
|
|
|
|