|
|
Hi,
i wanted to ask if there is a way to catch the line-out signal in c# so that i am able to stream the signals, without using a hardware solution like a adapter.
For example:
I am playing music using winamp (output on the soundcard, line-out) and at the same time i am streaming the sound in a network, but the audio source has to be the line-out output.
thanks, greetings
|
|
|
|
|
Hi,
I need some help with an installer component. In the Install method I open a configuration form that I created which returns OK or Cancel as dialog results. I found on some site that if I want to cancel the installation, I have to throw an InstallException. At first, the setup wizard displayed a message box saying about an error with the code 2869. I don't really think there is any difference in the source code, but now I get the same message box, followed by another message box with no message. Do I need to install some service pack that supports cancelling the installation? Or does anyone know another way? A site with a tutorial for installer components would also be helpful (google didn't help much, or I didn't use the right keywords)
I also tried using a NoImpersonate.js script file with a post build event. Didn't work. I tried running a .bat file containing "msiexec /i pathtofile.msi" with admin privileges. Still 2869. I read that this only happens on Vista ... I managed to get the same error on XP too )
And yes I am running the setup.exe file, not the msi.
Thank you
|
|
|
|
|
Hello
This error generally occurs when custom action fails to perform its action with "Elevated Privileges" on Vista (which is a normal case). The solution is NoImpersonate.js but you are saying that it couldn't solve the problem. So can you tell me when exactly this message box appeared? I mean as soon as you ran exe or after completion of the "install" event i.e after welcome message window?
One more thing. Have you used installer class to override custom action?
Also are you passing the "Property" (i.e. value) consisting of Ok or Cancel to custom action? "Savedstate" and "idictionary" is used to do it.
|
|
|
|
|
The message box appears when I click the Cancel button on my form.
This is the code inside the overridden Install method:
Config config = new Config();
if (config.ShowDialog() == DialogResult.Cancel)
throw new InstallException("Installation aborted"); //I think this is why the error message is displayed.
base.Install(stateSaver);
where Config is the configuration form that I created.
Can you tell me how to use SavedState and IDictionary to pass OK or Cancel to the custom action?
|
|
|
|
|
Hi,
I have a problem. I have a form in c#, with buttons, controlls, textBoxes and others, which I need to rotate 90 degrees. Is this posible in c#?
Can the form be rotated and with it, it's all content, or maybe just the content to be rotated? Buttons, textboxes, checkboxes, labels, can be rotated?
Or maybe this is posible in WPF?
Any ideas?
Thanks!
|
|
|
|
|
I assume you've got a monitor that's mounted at 90 degrees?
A far easier solution would be to use the graphics drivers - most modern nVidia drivers have an option to rotate the desktop so you can mount a monitor in "portrait" orientation
|
|
|
|
|
If you must rotate the form and not the display, i would suggest creating your own controls and handling the paint function yourself. that way you can draw them however you please. in regards to the form, you could remove the form border. and again draw your own window handle where you choose
|
|
|
|
|
Hi Guys,
I am writing an application that logs to a website and read its contents. Log in page of a web i am trying to connect is as follow:
<br />
<html><br />
<head><br />
<script type="text/javascript"><br />
document.cookie="ttAuthInfo=; expires=Sat, 03-Jan-70 00:00:01 GMT";<br />
document.cookie="ttloggedoff=t";<br />
function doSubmit()<br />
{<br />
document.cookie='ttloggedoff=f';<br />
try<br />
{<br />
if (window.parent&&window.parent.opener&&window.parent.opener.document&&window.parent.opener.document.LoginForm&&window.parent.opener.document.LoginForm.ttAuthUID)<br />
{<br />
window.parent.opener.document.LoginForm.ttAuthUID.value = document.LoginForm.ttAuthUID.value;<br />
window.parent.opener.document.LoginForm.ttAuthPWD.value = document.LoginForm.ttAuthPWD.value;<br />
document.LoginForm.RequestURL.value="StdPage&Template=loginformcln";<br />
}<br />
}<br />
catch( er )<br />
{<br />
}<br />
return true;<br />
}<br />
</script><br />
</head><br />
<body><br />
<form name="LoginForm" method="post" action="tmtrack.dll?LoginPage" onsubmit="return doSubmit()"><br />
<input type="hidden" name="RequestURL" value=""><br />
User<input class="frmTxt" type="text" name="ttAuthUID" size="35"><br><br />
Password<input class="frmTxt" type="password" name="ttAuthPWD" size="35"><br><br />
<input type="submit" name="Submit" value="Login"><br />
</input></br></input></br></input></input></form></body><br />
</html><br />
I know that by writing code like following would make it for me:
HttpWebRequest request;
HttpWebResponse response;
CookieContainer cookies;
string url = string.Format("http://site.com/login?.login={0}&passwd={1}", cboUserName.Text, txtPassWord.Text);
request = (HttpWebRequest)WebRequest.Create(url);
request.AllowAutoRedirect = false;
request.CookieContainer = new CookieContainer();
response = (HttpWebResponse)request.GetResponse();
if (response.StatusCode != HttpStatusCode.Found)
{
response.Close();
request.KeepAlive = false;
return;
}
cookies = request.CookieContainer;
response.Close();
request = (HttpWebRequest)WebRequest.Create(http:
request.AllowAutoRedirect = false;
request.CookieContainer = cookies;
response = (HttpWebResponse)request.GetResponse(); using (Stream s = response.GetResponseStream())
{
StreamReader sr = new StreamReader(s);
string line;
while (!sr.EndOfStream)
{
}
Can anyone please tell me in my case what would be url ?
I am new to this; Any help would be appreciated.
Thanks,
AksharRoop
|
|
|
|
|
The URL will be completely dependant upon how the site works. In the example above you are using 2 QueryString parameters of 'login' and 'password'. So, if the site has been created to expect and to handle those parameters then it should work as is. If not, then this approach won't work at all. Another way of doing it would be to programmatically fill in the HttpRequest's Form elements (usually a username textbox and a password textbox) and hand-craft the Request data to be in a manner that the site expects. Doing something like that takes a very in-depth knowledge of Web technologies, specifically the HttpRequest and HttpResponse objects and the HttpRequest's Form values. You're basically doing programmatically what the browser normally does. I've had to do it this way before and it is not an easy undertaking. In my case, I had to use a free Java product called WebScarab while browsing the site normally (in my browser) to capture the Request/Response traffic. Then, I was able to use that information to construct the Request data in exactly the same manner as my browser, but filling in a different username and password. The HttpRequest only takes the request data in binary, so you'll have to take the Request text that you construct (after filling in the username and password) and convert it to a byte[] and that will be the Request data. You also have to take into consideration that you'll be sending the Request to some sort of Login page and that the site will probably redirect to another page if the login is successful. One other small note, when working with the Request data be sure you add the CookieContainer to the Request before you do anything with the Request stream, as I found out the hard way that adding the CookieContainer after closing the Request stream does not produce any kind of error, but the Cookies are not included in the Request and since ASP.NET mostly uses Cookies for SessionID you'll probably get some very unexpected results.
Keep It Simple Stupid! (KISS)
|
|
|
|
|
is there any code that shows transaction history of an sql ldf file.(log file of sql) For example
10.01.2009 12:00:43 transaction=update , old value= george, new value=jack
10.01.2009 12:00:56 transaction=update , old value= marry, new value=hillary
I need also date, do you advice any software i am writing this here because you coders know softwares very well. I used apex sql but it gave some errors. I was adviced luminent log explorer but i couldnt find it. My system is sql server 2005. You can also give me some codes to be used in sql query analyzer.
|
|
|
|
|
|
yes i tried red gate but that was only compatible with sql server 2000 and i am using 2005.in spite of adjusting my database's compatibility level to sql server 2000, it still said "this program only works with sql server 2000 databases" So i need a new one.or an sql code to run on sql analyzer.
|
|
|
|
|
Don't you have any answer?
|
|
|
|
|
hi
I am using windows xp and I am running an application on c#.net.
i want to know the location where temporary files are created for this application?
like if we copy files from one drive to another first temporary files are stored and then they are written in destination drive.
|
|
|
|
|
System.IO.Path.GetTempPath() will give you the current user's TEMP location.
Cheers,
Vıkram.
I don't suffer from insanity, I enjoy every moment of it.
|
|
|
|
|
Thanks its working.
Can we also fine the path of a dump file which is created when error is generated in application?
|
|
|
|
|
Hi,
my report is running fine but when i try to view last page of report through the facility provided by crystalreport viewer it gives an error :-
"Server Error in '/WebSite3' Application.
--------------------------------------------------------------------------------
Error in File C:\DOCUME~1\cna-pbm\LOCALS~1\Temp\report1 {C1AAF9EA-5EEB-4955-A04A-39C97C9B5FDA}.rpt:
Unable to connect: incorrect log on parameters.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.Runtime.InteropServices.COMException: Error in File C:\DOCUME~1\cna-pbm\LOCALS~1\Temp\report1 {C1AAF9EA-5EEB-4955-A04A-39C97C9B5FDA}.rpt:
Unable to connect: incorrect log on parameters."
It works if i try to view last page by moving one by one page.
Please reply , if any of you have seen this issue and know the solution.
|
|
|
|
|
|
Hi,
I want to build a mechanism for Scheduling some tasks, and found that Timer class would be a right option, but if my interval is large that is let's say 2 day still Interval need to be in m.seconds?
AddHandler aTimer.Elapsed, AddressOf OnTimedEvent
aTimer.Interval =
aTimer.Enabled = True
Thanks in advance...
|
|
|
|
|
Yes, the interval for a timer has to be milliseconds.
If you want some code to execute every two days then you should perhaps use the windows scheduler instead.
Despite everything, the person most likely to be fooling you next is yourself.
|
|
|
|
|
No i cant go for Windows Scheduler since i use some API mechanisms.
So it will not a be a problem right though i use interval as 2 days in Timer Interval?
Thanks ...
|
|
|
|
|
satsumatable wrote: No i cant go for Windows Scheduler since i use some API mechanisms.
What does that mean? You can create a application which uses all required APIs and schedule the application executable using windows scheduler.
|
|
|
|
|
|
you could still use timer just store the number of minutes (or hours (or days)) elapsed by incrementing it every time the timer ticks.
i.e. if your timer interval is 60000 (60 seconds) you could increment the minute value with each tick and then process that value.
another option is you could store the scheduled time and then when the timer tick event fires every second, for example, you can check to see if the current time matches the scheduled time (or greater than). if so then do your notification code or whatever it is you plan to do.
|
|
|
|