|
I need to clip the cursor to a specific area in my application which I am able to do so. But the problem is when I ALT+TAB to some other window still the cursor is clipped restricting my movement. I would like to know how to clip the cursor only to my application thread without using API's
BK
|
|
|
|
|
You could probably, before you set the clip area store the existing one in a local variable. When you app/form loses focus it restores the original clip area then when it receives focus again it resets the clip area.
You know you're a Land Rover owner when the best route from point A to point B is through the mud.
Ed
|
|
|
|
|
i am working on my project which is related to transfer video clips i.e. video files from pc to mobile devies over session initiation protocol (sip)in the context of sms i.e. without using GPRS and needs help on it. if any one have any knowledge about this please guide me.
Thanks
Muhammad Kashif
|
|
|
|
|
I've tried asking this on microsoft.public.dotnet.languages.csharp, but I am getting no response. Maybe I'm getting lost in the traffic. So, let's try it here.
Dev env: VS 2005 C# Express, .Net Framework 2.0
I am trying to programmatically select an item in a listbox on a web page. The first thing I do is go through and de-select any selected items. The OuterHtml field of a selected element in the listbox looks something like this:
Default item
I want to simply remove the the term 'selected' this way:
elt.OuterHtml = elt.OuterHtml.Replace("selected","");
This results in OuterHtml being set to:
Notice: 1) the 'selected' term is untouched, 2) the visible text has been removed.
After the assignment I can see in the debugger that one of the members of the HtmlElement object (OffsetParent, I think) has a string indicating some kind of COM Interop services exception.
The MSDN documentation at
http://tinyurl.com/edbln
does contain this warning:
"If you assign a new value to OuterHtml, the current element reference will become invalid; it will not reflect the name, properties and child content of the HTML you have just assigned."
but I don't really understand what that means.
Is it possible to change the HTML in a web page? Am I going about it the wrong way? Is there some kind of initialization or setup call I am supposed to make? Is it just a bug in .NET 2.0?
|
|
|
|
|
Perhaps you should start by mentioning what you are doing? Are you changing the page in a browser from another program? Do you have a browser component in your program that shows the page you are trying to change? Are you writing a client side component that is changing the page it is running in?
---
b { font-weight: normal; }
|
|
|
|
|
Ok, fair enough, I am automating navigation through a set of web pages by putting the NET 2.0 Webbrowser control on a dialog. When I get to the third page in the sequence I need to change the default item in a listbox on the web page to the item that I know in advance I want selected. I've been successful in using InvokeMember("Click") to click a button on a web page but I have not been able to "click" on an item in a list in order to select it.
|
|
|
|
|
Hello everyone! My first post here
As you might have guessed from the message title: is it possible to read from a text file, while another application is always writing to it, without disturbing the writing process? And if it is, how do I do it?
I'd like to create an application that open such a file, and gets the data that has been added to the file since my last read (maybe you've got some good suggestions how to do that?).
Thanks in advance,
Paul
|
|
|
|
|
It might be possible to read from the file, but it's hard to guarantee that it would never disturb the writing process.
It sounds like you should use something that has much better functionality to handle multiple users, like a database.
---
b { font-weight: normal; }
|
|
|
|
|
That is true, but my question was more out of curiosity after observing programs like AviPreview or VLAN play avi or mpg files while they were still being downloaded. I hope someone knows a solution because this is driving me nuts
|
|
|
|
|
pistolenpaultje wrote: AviPreview or VLAN play avi or mpg files while they were still being downloaded
I don't know about these programs but it looks like LimeWire just pauses the download while it writes the downloaded bits so far to a temporary file which it then displays. Maybe these programs do the same and you havn't realised.
You know you're a Land Rover owner when the best route from point A to point B is through the mud.
Ed
|
|
|
|
|
Are you talking about something similar to the Unix tail command? If so, you might just want to look at something like this[^].
--
I've killed again, haven't I?
|
|
|
|
|
i looked at that, but it waits until the writing process is complete and then opens the file and reads the changes. i'd like to know how to read a file that is being written to while it happens. Or, probably the same, an application that is writing to the file sporadically but never closes the file handle while it is running.
thank you for your reply though, i'll get there!
maybe this is good material for an article: Advanced File I/O
|
|
|
|
|
I'm not sure how helpful this is, but I accidentally did something like that a while back. I wrote a program that was supposed to start capturing the screen into a WMV. I made the mistake of telling it to start capturing when it lost focus, as well as play the captured file when I manually stopped it. The result was this:
- captured WMV (wrote file)
- played WMV in MediaPlayer
- program lost focus
- program started writing to same WMV just before MP started playing it
- I saw the multiple smaller-and-smaller time-delayed MediaPlayer windows in the video.
Basically, MediaPlayer was reading a file that was being written just a little ahead of it, so I know it's POSSIBLE. It's just a matter of fooling Windows into doing it intentionally.
-Daniel
|
|
|
|
|
That's exactly what i mean! Funny though, because I never caught WMP doing anything like that (it refuses to play avi's or mpg's while the download is still in progress). Maybe it's because WMV's are designed with streaming in mind, so WMP opens it differently than avi's or mpg's..
Paul
|
|
|
|
|
I'm not very knowledgeable about streaming or deep file IO junk, but it would make sense for WMP to check to see if the file is not currently being written to.
In my scenario, I wouldn't be surprised if my program hadn't quite started writing to the file when WMP checked it (the WMV was a distinct file from a previous start-stop capture), kind of like how people used to play copied PS games (I never did, but I heard how to do it, with a real disk when the PS does its little preliminary validity check, then swapping).
-Daniel
|
|
|
|
|
you just have to keep tracks of the position of the writing process and limit yourself to not read beyond where the last write position was.
|
|
|
|
|
sounds like just what i need! however i already tried something like that but couldn't get it to work. do you have any suggestion (maybe an article link or code snippet) how i could accomplish that? many thanks for your reply, i now have an idea in what direction to search!
|
|
|
|
|
Does the C# Express Edition include the ability to deploy the application? I have seen that VS2005 has ClickOnce, but I cannot determine if it is available in Express Edition.
Also, are there any other options besides InstallShield to deploy VS2005 applications?
|
|
|
|
|
econner wrote: Does the C# Express Edition include the ability to deploy the application? I have seen that VS2005 has ClickOnce, but I cannot determine if it is available in Express Edition.
Does this answer your question.
econner wrote: Also, are there any other options besides InstallShield to deploy VS2005 applications?
NSIS, InnoSetup. I personally don't bother with InstallShield, MSI or ClickOnce. It's just this feeling of being in complete and utter control of NSIS that gives me a warm feeling
I suggest you take a look at the installer script for Sharpdevelop if you want a good example of installing .NET applications using NSIS. The #develop script performs checks for frameworks, registers file associations, custom bitmaps etc etc.
You've probably guessed this by now but I'd strongly recommend NSIS, the things you can do with it are endless. I even wrote scripts which would install mods into GTA III, Vice City and San Andreas with it .
You know you're a Land Rover owner when the best route from point A to point B is through the mud.
Ed
|
|
|
|
|
Thanks.
I will take a look at NSIS.
|
|
|
|
|
Good man
I might warn you that although you have complete control overall, sometimes you do want a quick drag & drop solution, there are multiple NSIS editors out there (look on the Wiki) and some even have wizards. But if you use it regularly then there's nothing stopping you (hopefully).
You know you're a Land Rover owner when the best route from point A to point B is through the mud.
Ed
|
|
|
|
|
I have taken a "quick" look already this evening. Looks very good. I believe I seen where it does also support the installation of the .NET framework if needed. I will take a closer look in the next day or so.
Thanks again.
|
|
|
|
|
Hi,i'm trying to make a round edjed form with gdi+, it works pretty good when you do it in a normal form, but has a midiparent(a form inside the mdicontainer) the colorthat is drawn is the one that is suposed to be the transparencykey.
in the code that criates the round edjed form i pus:
childform.allowtransparency = true;
does anyone have an idea of how to draw something tranparent?
thanks for everything :P
_________________________________________________________________________________
"There is no great genius without some touch of madness." - Seneca (5 BC - 65 AD)
|
|
|
|
|
i am developing a project on outgoing call. i want to play an audio file when the phone is connected. i have used the following code:
ITTerminalSupport ts = (TAPI3Lib.ITTerminalSupport)ia[0];
string str=TAPI3Lib.TapiConstants.CLSID_String_FilePlaybackTerminal;
//MessageBox.Show(str);
int k= TAPI3Lib.TapiConstants.TAPIMEDIATYPE_MULTITRACK;
//MessageBox.Show(k.ToString());
ITTerminal fpbt =
ts.CreateTerminal(str,k, TAPI3Lib.TERMINAL_DIRECTION.TD_CAPTURE);
ITMediaPlayback mp =(TAPI3Lib.ITMediaPlayback)fpbt;
object[] audiofile=new object[1];
audiofile[0]=@"C:\Documents and Settings\Ankita\Desktop\project\tapi3_dev\tapi3_dev\my 3rd file.wav";
mp.PlayList=audiofile;//because it requires objet array.
/*If you have already selected terminal by bcc.SelectTerminalOnCall(terminal)
then please unselect it by bcc.UnselectTerminalOnCall(terminal)*/
//bcc1.SelectTerminalOnCall(fpbt);
mc=(TAPI3Lib.ITMediaControl)fpbt;
try
{
mc.Start();//will start playing the audiofile.
}
catch(Exception exp)
{
MessageBox.Show(exp.Message.ToString());
}
the code runs successfully but without playing an audio file even though the file is in correct format.
can anyone help me. i am using a voice modem.
|
|
|
|
|
Hi ALL
I want to make my application receives events from the system that a specific process has been started or ended
how to do this
Thx all
|
|
|
|