|
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.
|
|
|
|
|
By fictional I did mean hypothetical (just in case someone might comment on the fact that I might leave a company exposed).
A Windows Service would self-install, and could listen on port 80, therefore eliminating the need for any configuration. That was my idea.
I suppose I will go with a web service seeing as it's a bit safer, as you said.
|
|
|
|
|
Cormac M Redmond wrote: A Windows Service would self-install, and could listen on port 80, therefore eliminating the need for any configuration. That was my idea.
Only if nothing else is. If IIS is already installed (or some other web software) who ever gets port 80 first wins - I've had software that took over port 80 before IIS got hold of it and it took hours to track down and fix. You don't want to irritate your customers like that, especially on a first impression.
|
|
|
|
|
Yeah, thanks a lot for the advice - very helpful.
|
|
|
|
|
If this is SQL Server 2005, it is possible to create something known as an HTTP Endpoint which basically allows SQL Server to create Web Services without having to have IIS installed on the server. There are a couple of little gotchas to be aware of with this on Win XP (but not Win 2003), but it does work and is kind of cool.
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.
|
|
|
|
|
Cool that sounds good.
Probably wont be Server 2005, however. Unless Express 2005 allows for that...
|
|
|
|
|
Hello everyone i'm asking "How could i Write\read mpg files in c#
...
|
|
|
|
|
You can read and write files using the APIs in System.IO namespace, but I suspect you mean you want to display videos and write new videos. The .NET framework has nothing built-in to do this, so you'll need to use something like DirectShow to do this. There are some .NET wrappers for DirectShow here on CodeProject, try searching the articles for DirectShow.NET.
|
|
|
|
|
|
hi
i used code from this link for my problem :
link
but my problem is in method :
if (Membership.ValidateUser(emailID, pass))
{
System.Web.Security.FormsAuthentication.RedirectFromLoginPage(emailID, true); //my problem
}
my problem is this method redirect user to default.aspx page automatically and i don't want this, i set destination url od loginControl to "manageComments.aspx" and i want to this method redirect to this page, but how to do ?
My another problem is when i first time checked "Remember me Next Time" of login control, when i visit this page again, it redirect me to default.aspx page and don't see loginPage, how to solve my problem ?
thanks
|
|
|
|
|
Heloo people i have 1 question for you!
I wanna make application for drawing alghoritms .That program can make from alghoritms real programs that will work .Like executable.
Thanks
nemanja
|
|
|
|
|
conemajstor wrote: I wanna make application for drawing alghoritms .That program can make from alghoritms real programs that will work .Like executable.
That makes no sense. If you implement an algorithm in in a program and compile it you have an executable that implements the algorithm.
|
|
|
|
|
i think you mean that you want to input flow chart diagrams and convert them to exe.
FlowChart[^] is a diagram to represent algorithms.
Try making what you mean to say more clear.
|
|
|
|
|
İ want to change thread state form waitsleepjoin to running state when it is on waitsleepjoin state. so , I mean , when the thread sleep time is not finish.
|
|
|
|
|
I cound find the different between
Thread and Thread Pooling.Anybody help
me to find the solution with example.
I have use some example but I could not
find the difference.but I know threding.
what is the use of thread pooling.
Continue...
|
|
|
|
|
Have a look at Wikipedia's article on thread pools[^].
MSDN also has an article[^] that talks about .NET's thread pool in particular.
|
|
|
|
|
Hello there, it's been awhile since i've used these forums, but i've come across a program i'd like to take a crack at writing and thought this was the place to get a bit of an idea of where to start.
Ok, so anybody familiar with sound, or for that matter frequencies in general may have seen or used an oscilloscope (yes, that piece of equipment that shows sine waves and the likes on a little screen that looks slightly like a heart rate monitor). Now, i figure, that in order to make something which simulates an oscilloscope i need to be able to retrieve the amplitude of a sound or piece of music at regular intervals, and then perhaps have a series of dots that draw out the amplitude over a given time period which then forms what appears to be a single continous line (a frequency).
Ok, so in a simple form, lets say i want to load an .mp3 file into a program, play the file and as it is playing continously retrieve a value for the amplitude of the signal and then graph it. So i suppose, at least to get started, what my question comes down to is what classes, properties, methods, events should i be looking at to a) load an mp3 or sound file into a program and b) get the amplitude of the sound at a given point in time? I'm not too sure whether anybody can help or whether i'll stay left in the dark a bit here, but if anybody has any ideas or tips just to get me started it'd be much appreciated. Cheers, Bryce.
|
|
|
|
|
I know an Event is a special kind of delegate, but its the best fitting title I could think of.
I've been trying to learn about delegates & events. I've read tutorials, a book, & followed examples but I still have a question.
For an event, in short, it seems like we:
1) Declare our Delegate Class: public delegate void MeltdownHandler(object reactor, MeltdownEventArgs myMEA);
2) Create an event: public event MeltdownHandler OnMeltdown;
3) Tell some new Delegate Object to call [some_method], when the event is raised: myReactor.OnMeltdown += new MeltdownHandler([some_method]);
4) Call the event: OnMeltdown([whatever]);
5) Which calls the Delegate Object.
6) Which calls [some_method]
Why not just create a Delegate Object and call the Delegate Object directly which will call [some_method] (instead of raising the event) ?
1) Define our Delegate Class: public delegate void MeltdownHandler(object reactor, MeltdownEventArgs myMEA);
2) Create an Delegate Object of that type: MeltdownHandler myMeltdownHandler = new MeltdownHandler([some_method]);
3) Call that Delegate Object: myMetldownHandler([whatever]);
4) Which calls [some_method]
So what am I missing? Whats the benefit of creating & raising an event. By creating & directly calling a Delegate Object it seems like it still has the same effect, with less code. It still notifies another object that something has occurred.
|
|
|
|
|
It's all about good design. For example why would we bother to declare fields as private and make public properties to expose them?
If you declare your delegate as public and expose it to the users, they would have to reinstantiate it and point it to their handler method which is a very bad design.
Another major difference between delegates and events is that events may have more than one handler -you can add/remove handler methods at runtime using +=/-= respectively-, while if you exposed a single delegate you can associate it with one single method.
Regards
|
|
|
|