|
What is it that you are doing, really? There are no keys in a file. Are you reading a file, or are you reading keypresses?
---
single minded; short sighted; long gone;
|
|
|
|
|
I think your problem is to press Enter key until the reading file is over , right ?
If is that your problem , here is an solution , something like following code :
while (stream.Read())
{
// TO DO : Reading file
}
DMASTER
|
|
|
|
|
I don't have the problem. You should reply to the original poster, not to one of the replies. Otherwise the original poster won't get a notification that you have replied, only I will.
However, I don't understand your analysis of the problem, and not what your solution would do either. The StreamReader.Read method does not return a boolean, so your code doesn't really make sense.
---
single minded; short sighted; long gone;
|
|
|
|
|
Not really understand your question. But from my guess, you write something like "\n\t" in your SteamReader? If yes, then just replace "\n\t" with "".
Eliz.K
www.oin1.com
|
|
|
|
|
|
Well this is a ridiculous question - the answer is obviously bright blue.
Seriously think about what you are asking here. My suggestions is - work out and write a specification of what your database needs to store and what functionality it needs to expose.
Then look at implementing your database (I assume you will be using SQL) reading tutorials and learning from your mistakes on the way:
http://www.w3schools.com/sql/default.asp
That link provides some good starter information on databases.
You have a lot to learn before you can even begin to considering building a large scale commercial database. I imagine there is a few months work there (only a small amount of building and the rest learning)
Good luck
Dan
|
|
|
|
|
A forum is not going to be the place to ask this kind of question. It is a very broad question, with many different ways it could go. How about asking the people who want the database for some specifications? Have you ever heard of that?
"Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon
|
|
|
|
|
Complete client reqs:
[Rent-a-coder listing]EHS database, $500, completed in 2 weeks[/Rent-a-coder listing]
--
You have to explain to them [VB coders] what you mean by "typed". their first response is likely to be something like, "Of course my code is typed. Do you think i magically project it onto the screen with the power of my mind?" --- John Simmons / outlaw programmer
|
|
|
|
|
Yep, oh, and gotta have some sense of urgency to it :->
"Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon
|
|
|
|
|
Nidesh - don't follow Dan's advice - bright blue is *NOT* the way to go. Everyone knows that. He was just having a bit of fun.
Environmental Health databases must be designed so the printout of the schema looks like a small dog of an undetermined breed.
"More functions should disregard input values and just return 12. It would make life easier." - comment posted on WTF
|
|
|
|
|
I can insert an image into my richtexbox. But I resize it, the image becomes very bad. Please help me fix this problem. Thank you very much
|
|
|
|
|
If I understand your problem correctly, you have a Windows Form with a RichTextBox control on it. You put an image (jpeg, bitmap, or something) in the RichTextBox and it displays it well. Then you resize the Form and the image no longer looks good. Is that basically correct?
I think the problem is that, although the RichTextBox can display an image, that's not what it is meant to do. Why are you using a RichTextBox instead of PictureBox or other more appropriate control?
BDF
|
|
|
|
|
Thank you very much for your answer. But, I write an application that is similar to MS Word, so I want to insert an image when my application is running. I can insert image, but when I use mouse to resize the image to a smaller or larger size, the image doesn't display correctly.
|
|
|
|
|
I see. I've used RichTextBox controls before, but never for images. Can you tell me how you insert the image? Do you drag and drop an image file into the running application, or use an OpenFileDialog, or ...? Also, are you trying to resize just the image inside of the RichTextBox or is the problem when you resize the application window?
|
|
|
|
|
I read an article at Codeproject http://www.codeproject.com/cs/miscctrl/csexrichtextbox.asp, and follow these instructions to insert image, but I have problem when I resize the image that I insert in my richtextbox.
Thank you for your help
|
|
|
|
|
Hello again,
Sorry to take so long to get back to you. I read the article you mention, and I think it's a good one. I'm assuming you started your application with something based on the RtfInsert project. This application will accept an image into the ExRichTextBox control, but it does not handle resizing those images. That, of course, is the problem.
To solve the problem, you will need to add code to your application to handle resizing the images. There are many ways to do this, that's the fun of programming! I'll suggest one possible way to go about it.
When an image gets inserted, you'll need to keep track of where it is located in the ExRichTextBox. That will allow you to determine if the user is clicking the mouse on the edge of the image to resize it. Also keep track of the path containing the image.
You'll need to handle the MouseDown and MouseUp events, some suggestions for those handlers appear next:
private void rtBox_Main_MouseDown(object sender, MouseEventArgs e)
{
Point mouse = new Point ( e.X , e.Y ) ;
_pointMouseDown = mouse ;
_resizingImage = true ;
}
private void rtBox_Main_MouseUp(object sender, MouseEventArgs e)
{
if ( _resizingImange )
{
Point mouse = new Point ( e.X , e.Y ) ;
}
}
Once you have the new dimensions, you can reload the image specifying the new dimensions. To do this, you'll need to modify the ExRichTextBox class. See the comments before the GetImagePrefix() function. You'll need to add a way to do most of this same stuff except using the dimensions you calculated earlier in place of the local variables "picwgoal" and "pichgoal."
Sounds like a lot of work? Yes, it will be. Should be a little bit of fun, too.
Happy programming!
BDF
|
|
|
|
|
Your reply helps me a lot. Thank you very much.
|
|
|
|
|
Hi,
I am developing a user app, which has to email me the errors if occur (hopefully not to many ). I do this with the system.net.mail namespace and works execellent within my office.
When delivering to beta-testers erros are not being mailt because the smtp server is not valid. Okay i get the security issues and spam issues to prevent this. But i would not have my users to add a smtp server by hand. So i thought i use my own domain mailserver and let users log in there and sent the mail to me. Compiled the smtp server, username, password in code. But the ISP does not allow any other smtp server on his network to send mails except its own. So this does not work either.
Is there a way to retrieve the current valid smtp server of the computer or read out of outlook and use that one.
The last solution is create a mail and popup outlook, but i rather do not.
Kind regards,
Marcel Vreuls
http://www.marcelvreuls.com
< >
|
|
|
|
|
Marcel Vreuls wrote: Is there a way to retrieve the current valid smtp server of the computer or read out of outlook and use that one.
What does the Outlook Object Model Primary Interop Assembly documentation say about that?
|
|
|
|
|
have not take a look at it. just wanted to focus on the first solution. Planning on doing that tonight and will post what i have found. Probably have to worry about different outlook versions or outlook express
Kind regards,
Marcel Vreuls
http://www.marcelvreuls.com
< >
|
|
|
|
|
What about a setup application where you ask the user to specify the smtp server?
Or you could use the yahoo smtp and send mail to a yahoo account. I think it allows that.
|
|
|
|
|
Or, skip the entire SMTP method and expose a WebService to the Internet that your application calls to report it's errors. No email involved.
|
|
|
|
|
There is no easy or certain way to find such a setting. There might be a default mail program, and there might not. The default mail program might have a user account that uses smtp, and it might not. The mail program might expose the user settings, and it might not. Probably not.
I was thinking the same as Dave, when I read your question. A web service seems like a good solution.
---
single minded; short sighted; long gone;
|
|
|
|
|
Indeed that i did not think of that . A webservice is the solution. just have to check if there is a internet connection present and go with it. Can store it in a database.
Exellent tip
Thank you
Kind regards,
Marcel Vreuls
http://www.marcelvreuls.com
< >
|
|
|
|
|
Is there a way to override the F1 event on the helpProvider?
|
|
|
|