|
Hi,
I have a TIMER and a WebBrowser component.
When the program goes to the System Tray and Timer Refreshs the WebBrowser Component ( i cant see the program form, normal), i loose the focus of my active window
How can i fix this?
|
|
|
|
|
The WebBrowser control - an ActiveX control that is hosted through an RCW, or Runtime-Callable Wrapper - is subject to its own focus handling. Either the AxHost (the base class for the AxWebBrowser class) has the focus or it doesn't, but how the WebBrowser control itself maintains focus is completely independent of .NET. IT could, for example, have the focus while the AxHost doesn't even realize it has the focus. This is a common problem (not just with the WebBrowser control, but with all ActiveX controls hosted in .NET).
Once way of solving the problem is to get the handle of the currently active window before you refresh the WebBrowser and then restore it. For this, you'll need to P/Invoke the native GetForegroundWindow and SetForegroundWindow APIs. If you need help declaring the P/Invoke signatures, see http://pinvoke.net[^].
To solve the problem with the WebBrowser control itself, you either need to correctly identify the container (this gets deep into COM interfaces, so experience in this area is helpful; there are some articles on this site that may help if you search for "WebBrowser", for example) or to make sure that the WebBrowser control never takes the focus to begin with. One way - and this is untested but should work - is to set the WebBrowser.Visible property (not the inheritted AxHost.Visible property!) to false . IF correctly implemented, the control should not try to steal the focus if it is not even visible.
This posting is provided "AS IS" with no warranties, and confers no rights.
Software Design Engineer
Developer Division Sustained Engineering
Microsoft
[My Articles] [My Blog]
|
|
|
|
|
hi,i am a new bee in this group.
i need the c# code for backpropogation using neural networks in artificial intelligence.sorry for the confusion.if any of u got it then pleasw send mail me.
thanx a lot
kasi malla
|
|
|
|
|
You might define what you mean by "backpropogation" first. I've never seen such a word used in any context.
This posting is provided "AS IS" with no warranties, and confers no rights.
Software Design Engineer
Developer Division Sustained Engineering
Microsoft
[My Articles] [My Blog]
|
|
|
|
|
Heath Stewart wrote:
backpropogation
I'm guessing the OP means undo (and possibly redo) functionality. If so start your search with "GOF Command Pattern".
|
|
|
|
|
are you talking about neural net's?
IM PROUD TO BE A GMAIL;
|
|
|
|
|
I'm trying to achieve something similar to a VS.Net 2003 IDE where there is an option when you hover your mouse over, it slides out (If you set auto-hide enabled). Did anyone here have a sample code of how to achieve that ? Or guide me in the right direction ?
Stanley
|
|
|
|
|
Hi,Sir and Madam
Please give ma an idea about "word cutting" (not English).
Some language (such as Thai) a sentence has contigugous words and sentences separated by space while English a word separated by space and sentences separated by (,) and (.)
Example:
ยินดีต้อนรับทุกคน = Every one is welcome.
Sorry for bad English.
Thank You.
|
|
|
|
|
Try a search on word stemming[^].
This posting is provided "AS IS" with no warranties, and confers no rights.
Software Design Engineer
Developer Division Sustained Engineering
Microsoft
[My Articles] [My Blog]
|
|
|
|
|
depending solely on web MSDN is not enough for me....
anywhere I can download?
thanks, all
dennis
|
|
|
|
|
The place to start would be on the web site you apparently so often visit: http://msdn.microsoft.com[^]. You should see Subscriptions[^] right there at the top. A little digging should turn up the MSDN Library Subscription[^]. It is definitely worth it and integrates fully with VS.NET (installing both into the VS Combined Collection as well as a stand-alone collection that VS.NET can reference directly; I prefer the Combined Collection in order to incorporate any third-party libraries).
This posting is provided "AS IS" with no warranties, and confers no rights.
Software Design Engineer
Developer Division Sustained Engineering
Microsoft
[My Articles] [My Blog]
|
|
|
|
|
im using .net and how would you reverse the contents of a file so if
1
2
3
4
would be a file how would i write
4
3
2
1
???
thanks
IM PROUD TO BE A GMAIL;
|
|
|
|
|
StreamReader sr = new StreamReader(filename);
string t1, t2;
while ((t1=sr.ReadLine()) != null) {
t2+= t1+"\x1D";
}
string[] tsa = t2.Split('\x1D');
sr.Close();
StreamWriter sw = new StreamWriter(filename);
for (int i = tsa.Length-1; i >=0; i --) {
sw.WriteLine(tsa[i]);
}
Hope it'll help...
Robin Panther
|
|
|
|
|
thanks by the way whats \x1D?
IM PROUD TO BE A GMAIL;
|
|
|
|
|
I'm currently using an async web service in a client I'm writing. I started using synchronous calls but that turned out to be too time-consuming, blocked the UI and it was impossible to display any kind of progressbar/waiting message. Anyway, using async calls works great, but if the web service in question throws an exception, I'm out of luck since I don't know how to handle the exception.
Any suggestions/hints?
Best regards,
Daniel
Wenn ist das Nunstück git und Slotermeyer? Ja! Beierhund das oder die Flipperwaldt gersput!
|
|
|
|
|
The "easy way out" is to handle the AppDomain.UnhandledException event using AppDomain.CurrentDomain . This allows you to - as the event is aptly named - handle exceptions that were not explicitly handled.
The correct way is to do a little debugging. That's just part of development. Off hand, I'd say that your callback method - if you declared one - would catch such an exception. A SoapException is, after all, just another response that is formatted differently. The exception would also most likely be thrown from the thread and in the method where you called BeginMethod .
This posting is provided "AS IS" with no warranties, and confers no rights.
Software Design Engineer
Developer Division Sustained Engineering
Microsoft
[My Articles] [My Blog]
|
|
|
|
|
Thanks, I wasn't aware of the AppDomain.UnhandledException event, and although I won't use it for this particular problem (I'll go for Daniel Turini's solution, see below) I'll definitely make use of this newfound knowledge in the near future
Wenn ist das Nunstück git und Slotermeyer? Ja! Beierhund das oder die Flipperwaldt gersput!
|
|
|
|
|
I did mention to debug your code and try it out. Were you not calling the EndMethod event before? Using either callbacks or the EndMethod - if you care about any returns values, exceptions, etc. - is necessary. Otherwise you're just aysnchronously invoking a method and won't get a return back. For methods like logging methods, this may not matter but for methods like Add(int, int) you would certainly want the return value back.
This posting is provided "AS IS" with no warranties, and confers no rights.
Software Design Engineer
Developer Division Sustained Engineering
Microsoft
[My Articles] [My Blog]
|
|
|
|
|
dabs wrote:
ut if the web service in question throws an exception, I'm out of luck since I don't know how to handle the exception.
If the web service throws an exception, the End* methods will throw it, and you can handle it there.
Yes, even I am blogging now!
|
|
|
|
|
Thanks, wasn't aware of this fact. Sounds like the correct place to catch those exceptions so that is what I'm gonna do.
Wenn ist das Nunstück git und Slotermeyer? Ja! Beierhund das oder die Flipperwaldt gersput!
|
|
|
|
|
i already did the columns for the controls but i don't know how to add different items under the same row like how would you do
something | something | something
----------+-----------+----------
123 |123 |123
i would appreciate the help thanks;)
IM PROUD TO BE A GMAIL;
|
|
|
|
|
try using SubItems.Add()
tmpListView.Items[0].SubItems.Add("something");
Robin Panther
|
|
|
|
|
Heyas all,
I'm kinda of stuck here and was hoping for some feedback and opinions. I'm attempting to design a simple CD cataloging programming in C#, the easiest part of designing the form is done. I'm trying to determine how to store the information such as "program name" "publisher" "cd number" "date added". I have MSDE installed and running however I've been reading and it seems that MSDE is used to program the connectivity to the database that will eventually be run on a computer with SQL server installed. I don't think this is what I want. I'm looking for something that is built into the program, you could import an existing database, export etc. I don't want the users to have to rely on having a 3rd party application installed (i.e. SQL server) Can anyone point me in the correct direction maybe someone knows of some links to beginners type Data stuff pertinent to what I want to do? Maybe this post should even be in the ADO forums, if so I appologize. Any information would be great.
Thanks All!
"There are 10 types of people in this world; Those that know binary and those that do not."
|
|
|
|
|
I think MSDE is actually a good solution for what you are trying to do. While there are "compiled-in" database libraries available, I have not seen any for .Net or that are written in managed code. MSDE is free and relatively easy to install and configure and is compatible with SQL Server. In fact the database engine IS Sql Server with limitations imposed on the number of concurrent connections and the maximum database size (4 Gig I think). The should be more than sufficient for a CD catalog program.
Just my 2 cents... Have fun.
|
|
|
|
|
In the same situation, I've used in-memory DataTable class of .NET, and saved information on disk in raw text format. (text files with tab as column delimiter).
It was enough for me - my application is not always running and do not need very fast search, sort etc. features. Try this out, may be it'll be enough for you too...
And, one more thing, when my databases becomes too big - I've added zip engine. So, database is saved, then zipped on disk. And, when loading, unzipping and loading.
Hope it'll help...
Robin Panther
|
|
|
|