|
Please tell me.
How many tables does dataset contains?
Thanks in advance.
|
|
|
|
|
|
My application is hanging, in the release version only, in a specific circumstance. This does not happen while running hosted by Visual Studio.
The culprit appears to be the DataGridView.
To whit:
My application listens to events from a COM source. When it receives an event, it adds a row to a table. That table is the DataSource for a DataGridView, so the DGV also grows by a row. As soon as the DGV has enough rows for it to sprout a vertical scrollbar, my application doesn't return from the COM message.
Note that my application is not in the foreground - the COM server application is. So my app is getting a message while it's not foreground, and it's causing the DGV to grow by a row. The DGV gets invalidated and repaints itself. When the DGV has enough rows to exceed the client area, it tries to paint a vertical scrollbar, and hangs.
This does not occur when running under the VS service host (ie, while debugging). I suspect this is because the order and occurrence of events is different. For instance, when running under VS, my application does not get invalidated while not in the foreground, so it doesn't try and repaint the DGV, and it doesn't try and sprout a vertical scrollbar.
If I turn off the scrollbar property of the DGV, the hang does not occur. So, I'm pretty sure that the problem is that the DGV is trying to pop the scrollbar and getting caught somewhere.
Oddly enough, my app is not eating CPU at this point - it's just sitting there, not returning from the COM call.
Any thoughts, or known bugs here?
-- modified at 23:38 Monday 1st January, 2007
|
|
|
|
|
I've worked around the problem. On my form_Deactivate, I set the Scroll property of my DataGridView to "none". On form_Activated, I set it back to "both".
It's a hack, all right. The fact that many of the DGV events don't fire when you are running hosted under VS (ie, F5) when the app is not foreground is disturbing. For instance, to see the rows that have been added while your app was background running hosted, you have to actually invalidate the whole window - and I mean, inside your app, like switching tab controls or something.
Moreover, aside from invalidating and painting, some events just never get fired. RowsAdded, for instance, will never be fired while you are background, and don't even get queued and fired later when your window is activated. They simply never get fired. Whereas, when you are not running hosted and are a background app, they fire just fine.
If anybody is aware of a place where I can read about known bugs/issues with .NET components, I'd appreciate the pointer. And if there's a place to report such issues, that would be a bonus, too.
Thanks!
|
|
|
|
|
JoeRip wrote: If anybody is aware of a place where I can read about known bugs/issues with .NET components, I'd appreciate the pointer. And if there's a place to report such issues, that would be a bonus, too.
MS Connect[^] is a central repository for feedback and known issues with Microsoft products. The MSDN Wiki[^] also allows users to post community content directly to the MSDN library, and sometimes these contain information about subtleties that may arise when using certain classes.
|
|
|
|
|
I have the following code snippet:
WebRequest request = WebRequest.Create(URL);
request.Method = "GET";
request.ContentType = "text/xml";
WebResponse response = request.GetResponse();
System.IO.Stream stream = response.GetResponseStream();
System.IO.StreamReader streamReader = new System.IO.StreamReader(stream);
String document = streamReader.ReadToEnd();
this.webBrowser1.DocumentText = document;
I have got the HTML content and javascript successful but it lack of the javascript inside the tags.
How can I solve this problem?
Thanks for your help!
Hung
|
|
|
|
|
Hi all
I want helping in NokiaCLMessaging Component
e.g how to use it ,how to use its classes and methods
of course in C# just
I want guide in this tobic
|
|
|
|
|
jawahi wrote: I want helping in NokiaCLMessaging Component
Welcome to Code Project!
Firstly, did you check Nokia's website[^]? There's an extensive API document at the provided URL.
If you need help with COM, on the other hand, I'd suggest reading some articles here on Code Project[^]. They can definitely get you started.
For more information on how to properly utilize these forums, check out the introduction[^]. Feel free to post again if you need assistance with something in particular!
|
|
|
|
|
Hi Vega02
Can you giude me to more than that about these Component and its classes.
thank you so mutch
|
|
|
|
|
Is it possible to transfer a value from a javascript variable to a aspx form variable .
When i tried to display the value of aspxVariable in my form it's empty
var a =myFunction();
aspxVariable=a;
|
|
|
|
|
yes it is possible,
you can write your javascript code this line
window.open("myweb.aspx?myvalue="+a);
//or
window.location.href="myweb.aspx?myvalue="+a;
//and then on your myweb.aspx page
you can use ConfigurationSettings.AppSettings.Get("a");
|
|
|
|
|
thanks, i gonna try this.
|
|
|
|
|
hi
How can i create a thread?
so thanks
|
|
|
|
|
Have a look at the System.Threading.Thread class.
|
|
|
|
|
and read some article on threads here on CodeProject !
Luc Pattyn
|
|
|
|
|
so thanks
|
|
|
|
|
hi,
how can i get the current resolution of monitor?
so thanks
|
|
|
|
|
This article might help http://www.codeproject.com/csharp/CSDynamicScrRes.asp[^].
the last thing I want to see is some pasty-faced geek with skin so pale that it's almost translucent trying to bump parts with a partner - John Simmons / outlaw programmer
Deja View - the feeling that you've seen this post before.
|
|
|
|
|
Wrote an app on W2K and it works fine but when I try to run it on XP it doesn't work. i.e. list item won't expand but data written as if expanded?
ex) Collapsed
line 1
line 2
line 3
line 4
ex) Item 1 Extended
Written Overwriten
line 1
line 2 line 1.subline 2
line 3 line 1.subline 3
line 4 line 1.subline 4
Thanks
|
|
|
|
|
To soound less like an idiot let me rephrase the above question.
How do I force a ListBox to update its items....
I am currently doing the following;
OnSelectedIndexChanged
.
.
this.RefreshItem(index);
.
.
.
This works happily on my W2K machine but doesn't cause OnMeasureItem to be called
on my XP?
What gives??
|
|
|
|
|
After some creative googling I found an article;
http://www.dotnet247.com/247reference/msgs/50/253797.aspx
Seems you have to remove and reinert object to get it to work.
Woulda thunk!?
|
|
|
|
|
Hi,
I am developing a Windows app that needs to talk to a server, to retrieve some information.
The server will run SQL Server, which I need to query, presumably through a stored procedure.
How do you recommend I talk to the server, directly from the client application?
It is slightly difficult, because its a client application, and not a web application that would have a backend on the server.
All I need to do is say "Hello server, give me the number at x in table y."
I'm presuming a 'web service', but is there possibly an easier way through IIS, somehow? Or maybe a Windows Service?
Regards,
Cormac Redmond
|
|
|
|
|
Cormac M Redmond wrote: How do you recommend I talk to the server, directly from the client application?
That depends where the client application is. If the client application is on the same LAN then you can have it connect directly to the SQL Server. If the client application is accessing the database via the web then a web service will be needed to act as an intermediate - filtering and validating requests and authenticating that they are being made from valid sources.
|
|
|
|
|
Cormac,
Sorry, yeah I should have been clearer.
The client can be anywhere, so cannot connect to the SQL Server directly.
Whether a Windows Service, or a Web Service, there'll be authentication.
I am aiming for installation simplicity, etc, so maybe a Windows Service would be easier?
It would mean the admin, or whoever, wouldn't need to setup an IIS/ASP.NET server.
I've never had to write one, but I'm guessing it'd be relatively straight forward.
Can you think of any advantages of a web service?
Note: All the client needs is a string...Nothing more.
It's an application aimed at non-tech type (fictional!) companies.
Regards,
Cormac
|
|
|
|
|
Cormac M Redmond wrote: The client can be anywhere, so cannot connect to the SQL Server directly.
Whether a Windows Service, or a Web Service, there'll be authentication.
I am aiming for installation simplicity, etc, so maybe a Windows Service would be easier?
If the client can be anywhere that rules out a windows service. Also, "anywhere" implies firewalls and most admins won't want to add holes to their firewalls, but they will permit port 80 (http). That then narrows your choice to a web application. e.g. a web service.
Cormac M Redmond wrote: Can you think of any advantages of a web service?
Getting through a firewall because the ports for http and https are usually already open.
Cormac M Redmond wrote: It's an application aimed at non-tech type (fictional!) companies.
I don't understand what you mean by "fictional" (unless you mean that this is just a hypothetical situation).
Non-technical companies will still have some form of IT department (unless it is a very small company) which should be able to configure IIS. Windows Server 2003 has some nice wizards to make this easier for part-time admins.
Any which way you want to look at it, the server will have to have some configuration to allow the information to pass. It is normally better to put it in the sandbox of an ASP.NET application running in IIS because it has restricted privileges and so it shouldn't be able to do much damage if the process runs amok.
|
|
|
|