|
Can any one help me with this
I have a Excel sheet,each cell has a textbox on it.i have to put data on to textboxes from C#
i am using this:
Microsoft.Interop.Office.Excel.TextBox txtbox= (Microsoft.Interop.Office.Excel.TextBox)workbook.Texboxes("textbox1");
here textbox1 is the name of the textbox on excel cell[1,1] but i have lot of textboxes on excel i cannot give names by myself,so my question is
How to find out the name of the textbox on a Excel cell from C# using
Microsoft.interop.office.excel libraries.
Thank You
KU
|
|
|
|
|
Hi,
I have used some Jsharp Dlls for zipping and Unzipping files but my problem is i couldn't get those Dlls from the free version of .net FW avaibale in the net,Thts why i coudn't able to zip and unzip wen i am running my application on other systems.Even i have added vjslib to my application bt still getting the following error message
"The type initializer for 'java.lang.system'threw an exception"
can anybody help me how to avoid this exception.
Any help will be appreciated.
|
|
|
|
|
There is something people seem to ignore as much as they can: Visual Studio
does support Java (but calls it J#). There is a VS2005 for it too, as well as
a free Express Edition, so you can download it.
IIRC it does not come with the vjslib.dll file that you need; the file that came
with VS2003 (.NET 1.1) works under VS2005 (.NET 2.0) tho. (I doubt you would be
able to use it in a signed application!)
Google may help you locating such a file;
its destination is C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\vjslib.dll
The alternative is using one of many other ZIP packages, both on CodeProject and
elsewhere.
|
|
|
|
|
Thank you Luc Pattyn
But the problem is even after adding this vjslib.dll file to my application start up folder i am still getting this error mssg
"The type initializer for 'java.lang.system'threw an exception"
could you please tell wat would be the cause for this one?
|
|
|
|
|
I can't tell you more; I don't know what your situation is, I don't know
your app, haven't seen any of its code. Did you install VS J# ? Do you
have any J# code running at all ?
The exception must tell a lot more; did you show it with ToString() ?
it would show a traceback, that points to the offending line,
and some technical details (one or several lines).
If any nested ("inner") exceptions are involved, it would show them too.
|
|
|
|
|
when I read file I use StreamReader and use Readline() to read every line,but I also read key "Enter",I want to skip the key "Enter",what method or class should I use ?
thanks
|
|
|
|
|
Mbe u can use the keyascii method by checking foor keyascii 13
Regards
Bino
|
|
|
|
|
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
< >
|
|
|
|