|
Yes it it
"The early bird may get the worm, but the second mouse gets the cheese" - anonymous, found in Uncle John's Bathroom Reader
|
|
|
|
|
Hi, I have a Textbox that I've bound to a property in my business object (Person object, FirstName property).
firstName.databindings.add("text", Person, "FirstName");
Works fine. If I manipulate the Person object and change the FirstName property, I need the textbox to reflect the change.
Other than raising an event to set the textbox.text to the new property value, is there any other way to go about it?
Thanks!
|
|
|
|
|
Refresh?
Need a C# Consultant? I'm available.
Happiness in intelligent people is the rarest thing I know. -- Ernest Hemingway
|
|
|
|
|
Hi,
I have a list box of items and I want to change the style of the newest item in the list.
I tried some things, but no results...
|
|
|
|
|
gabi_coman wrote: I tried some things, but no results
Does that mean you tried typing some code? Did you try reading? You know reading documentation and articles about how the list box control works so you could "know" how to solve your problem?
|
|
|
|
|
I don't really know what's wrong with what I've wrote. If you put a question on a forum it means that you know the answer?
Thank you for your support, now it's all clear.
|
|
|
|
|
Hy
I have a WebBrowser. Enter to mail.yahoo.com, make the login, after that I change the page. How can I do if I want to re-enter to mail.yahoo.com to not login to my account. I don't want to do Sign Out. I try to create a new instance of the WebBrowser but doesn't work.
thx
|
|
|
|
|
Find the Yahoo cookie stored in temporary internet files and delete it.
There's a better way to do sign into yahoo mail without using a behind-the-scenes-web browser. Use the Yahoo Mail API[^].
|
|
|
|
|
Hello everyone,
I have created a simple WIndows Application which user can download, install, and use it on thier computer. I was wondering if it is possible to make the application functional on IE browser. Would it possible for the user simply get connected and have all the functionality online?
If this is possible, what are the steps that I need to take in order to convert my existing code into a browser base application?
Any information on this issue would be greatly appriciated. Thank you and have a great day.
Khoramdin
|
|
|
|
|
Khoramdin wrote: what are the steps that I need to take in order to convert my existing code into a browser base application?
Well, if your application is written in layers (presentation, business, data) then it should be fairly easy to swap out the presentation layer and create a new one based on a web application. If it isn't written properly then you'll have a fair bit of redesign to go to get it to work in a browser.
|
|
|
|
|
Hi there.
I've developed a media player like application.
This uses Windows forms and runs stand-alone locally.
Now, i want to embed that player application into a website.
[ Just like those flash players around ... ]
But how to achieve this ?
Especially, how to achieve this for either IE AND FF ?
Can I 'easily' use <object> and <embed /> tags to run the application IN
a website from the WWW, or has there some more 'magic' to be done ?
I want to run the application / player just like the flash player.
|
|
|
|
|
There is some magic to be done: first, your program must be compiled to a library, and the bits you want to show up on the web page must be a UserControl, not a form.
From there, you'll want to expose your control as an ActiveX control. A quick Google Search[^] reveals a good deal of articles on this.
|
|
|
|
|
|
Hello All,
Just a question I was hoping to get answered. I completed an application about a month ago which implemented a FileSystemWatcher object and most of of the time is works great; but, sometimes for some reason, it will miss some files, which I will have to manually cut and paste the files to get the file watcher to process. I have increased the InternalBufferSize but it still happens.
I was thinking of another approach which may be foolproof (in my little mind anyway.) I was thinking a employing a timer and when the elapsed time is met, I could check the directory and see if there are any files available. If so, I want to grab the name of just one of the files and then do the processing. Yeah I know, sounds an awful lot like the watcher but I think I would have more control by just processing one at a time and no matter how many files pile in there at once, I will systematically process them all.
My only problem is trying to figure out how to get just 1 of the names of the files at the timeElasped point. Say there are files named like A.txt all the way to Z.txt. I want to check the directory and just return A.txt. I don't want to put all 26 into an array.
Any thoughts would be appreciated and thanks in advance.
F
|
|
|
|
|
Have you looked at this article that goes into detail about the FileSystemWatcher[^]? From the article,
The sample application simply logs messages to the UI. In general however you will be doing far more work. Work that will take a reasonable amount of time (such as retry counting). The FSW communicates to the underlying file system through a shared buffer. This buffer is limited in size. If more events come from the file system than the FSW can handle the buffer will overflow. In this case two things will happen: you will miss events and the Error event will be raised.
|
|
|
|
|
I don't think there's a method that just returns 1 file. As far as I know your options are the static Directory Class and it's GetFiles() method and the same method with the DirectoryInfo Class. But you could just use the first file in the array and toss the rest if you only care about 1 file.
If you're not going to use the FSW and want to just run this app on a scheduled basis, then make it a generic console application and use the Windows scheduled tasks to run it once an hour or whatever time increment you think works best.
Your applciation could always store the last runtime in a config file so you know not to process files with a date before that last runtime.
|
|
|
|
|
Hi Chris,
Good old kernel32.dll offers the Win32 function "FindFirstFile" which returns a single file.
From that, one could find the next file using "FindNextFile", or somehow eliminate the
file found, and repeat "FindFirstFile". So a little P/Invoke might help here, although I am
not convinced it would offer a better solution that what you suggested with GetFiles()
assuming the number of files is reasonable.
Luc Pattyn [Forum Guidelines] [My Articles]
this months tips:
- use PRE tags to preserve formatting when showing multi-line code snippets
- before you ask a question here, search CodeProject, then Google
|
|
|
|
|
I've read the article about FSW a couple of times and I still think there is that margin of error that I don't want to deal with, seeing how I am experiencing it now. I am going to try the array route and let you guys know how things turned out.
As always, thanks for taking the time to respond to my simple questions.
F
|
|
|
|
|
Dear programmers,
I want to create a large/complicated application which has a user-interface that start a lot of operations in background via threading.
If these threads are running, then the user-interface has to be partially disabled (depending on the type of operation).
This can be complicated because of a lot of dependencies.
My question now is:
Is there any "kind of design-pattern" by which this problem can be solved?
Thanks for your support ! ! !
|
|
|
|
|
Have you looked into the BackgroundWorker[^] component? It's designed especially for this. *edit link fixed
|
|
|
|
|
Thanks !
Unfortunately your link does not work
|
|
|
|
|
Maybe it works in the background?
Try this one[^].
Luc Pattyn [Forum Guidelines] [My Articles]
this months tips:
- use PRE tags to preserve formatting when showing multi-line code snippets
- before you ask a question here, search CodeProject, then Google
|
|
|
|
|
Tomerland wrote: Is there any "kind of design-pattern" by which this problem can be solved?
No single design pattern will provide solutions for the various problems that situation entails. You will need to implement several patterns. As always start with MVC. For User Interface components that need to enable/disable based on application state and multiplicity in relationships ("This can be complicated because of a lot of dependencies.") you might look into extending the Command Pattern to include UI control state mechanisms ( enabled, visible, checked, etc.)
|
|
|
|
|
HI,
I am trying to display the contends in a .cs folder inside a listbox .
i wrote the code where in i can open the file but after that how to show the contents inside the list box i am stuck.i want tehe list box to show all the codes inside the file.
do i need to use StreamReader?
otherwise how can i do it?
private void button1_Click(object sender, EventArgs e)
{
OpenFileDialog objDialog = new OpenFileDialog();
objDialog.Title = "Open .cs File";
objDialog.Filter = "C Sharp Files (*.cs)|*.cs|Text Files (*.txt)|*.txt";
objDialog.InitialDirectory = @"D:\back up d \users\k\ConsoleApplication1";
if (objDialog.ShowDialog() == DialogResult.OK)
{
MessageBox.Show(objDialog.FileName.ToString());
}
listBox1.Items.Add(@"D:\back up d \users\k\ConsoleApplication1");
Any help is welcome.
Thanking You
p
|
|
|
|
|
You could use a filestream and a streamreader
fafafa, ringakta icke sådant som bringa ack så naggande högönsklig välmåga å baronens ära.
|
|
|
|