|
Thanks again
Smile: A curve that can set a lot of things straight!
(\ /)
(O.o)
(><)
|
|
|
|
|
This's C# not Excel.. You have all the tools, do it yourself
My small attempt...
|
|
|
|
|
Smile: A curve that can set a lot of things straight!
(\ /)
(O.o)
(><)
|
|
|
|
|
I got resolution problems on computers that run my Windows C# Form application. For e.g. a Label are stretched in under its matching TextBox. The problem occurs on laptops with widescreen. What can be wrong?
_____________________________
...and justice for all
APe
|
|
|
|
|
You need to check the anchor property on your controls. If they are right, they will fit to any size screen.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
Yes I use Anchor. It works perfect on most computers...
_____________________________
...and justice for all
APe
|
|
|
|
|
Have you checked out the dpi settings in the display properties? These are sometimes set to a non-default value on wide screens.
Standards are great! Everybody should have one!
|
|
|
|
|
I concur.
Check your screen resolution (calculate the number of pixels in the diagonal),
and measure the diagonal (in inches). Divide resolution/diagsize and then adjust
the DPI setting (which is a percentage of 96 dpi !!) with Display Properties/Settings/
Advanced.
Example:
Dell Inspiron 17" with 1920*1200 pixels
diagonal = SQRT(1920*1920 + 1200*1200) = 2264 pixels
diagonal = 16.6 inch (measured!)
hence 2264 / 16.6 * 100/96 = 142%
When you set this value, everything on the desktop will probably shrink;
your labels with fit their intended position and size; your desktop labels might
be too small for easy reading (you may want to enlarge it through Display Properties/
Appearance/Font Size).
On the other hand most objects now get their intended size (in inches, not in pixels)
which is fine; some things will become too small, typically some web pages that
for some reason dont follow the preferred text size ("Normal", "Larger", whatever),
but instead use a fixes font size (say 8 pt).
To cope with that, I developed a simple tray tool to temporarily switch screen resolution to a 30% lower value.
Hope this helps.
|
|
|
|
|
we have a "Solver" method in Excel.
can i use that thru my C# application.
i want to do the same which the solver doing, from the code
My small attempt...
|
|
|
|
|
sujithkumarsl wrote: we have a "Solver" method in Excel.
This's C# not Excel.. You have all the tools, do it yourself
Smile: A curve that can set a lot of things straight!
(\ /)
(O.o)
(><)
|
|
|
|
|
if you dont know the answer,you are not suppose to reply
keep ur keep silence
My small attempt...
|
|
|
|
|
Smile: A curve that can set a lot of things straight!
(\ /)
(O.o)
(><)
|
|
|
|
|
It's possible to import Office UI into C# using the Microsoft Office Toolkit, or something. That would be the way to do this.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
i dont want to display that in the ui. i just want to call the solver with values as parameter and i am expecting the output.
can i use this as dll?
My small attempt...
|
|
|
|
|
How to create folder with c# for a active directory user in homedrive.
jayesh talsaniya
|
|
|
|
|
Environment.SpecialFolder.Personal;
Smile: A curve that can set a lot of things straight!
(\ /)
(O.o)
(><)
|
|
|
|
|
Thanx for reply.
Please, Can i have some more hint on how to create homedrive folder for a activedirectory user.
thank you.
jayesh
|
|
|
|
|
hi,
I've got this part of code
<br />
public delegate void DellagacjaVoid();<br />
<br />
public void pingowanie()<br />
{<br />
if (this.InvokeRequired)<br />
{<br />
DellagacjaVoid delegacja = new DellagacjaVoid(pingowanie);<br />
this.Invoke(delegacja);<br />
}<br />
<br />
string sciezka = "plik.txt";<br />
if (File.Exists(sciezka))<br />
{ <br />
FileStream fs = new FileStream(sciezka, FileMode.Open, FileAccess.Read);<br />
StreamReader reader = new StreamReader(fs);<br />
string linia = reader.ReadLine();<br />
linia = null;<br />
while ((linia=reader.ReadLine()) != null)<br />
{<br />
try<br />
{ <br />
richTextBox1.Text += linia + "\n";<br />
}<br />
catch (Exception ex)<br />
{<br />
MessageBox.Show(ex.Message);<br />
}<br />
}<br />
reader.Close();<br />
}<br />
}<br />
<br />
private void button1_Click(object sender, EventArgs e)<br />
{<br />
Thread watek = new Thread(pingowanie);<br />
watek.Start(); <br />
}<br />
the thing is that the content i read to the richtextbox alright, as many lines as there are in the txt file but also I get as many exeptions as number of lines with the text like this:
http://img444.imageshack.us/img444/6911/88524168zy6.png[^]
can someone help?
|
|
|
|
|
You cannot set the Text property of your rich textbox from another thread as the one it was created on. You should first create the content string (you're better of using the StringBuilder class by the way, it's faster) and then assign it to the rich text box's Text property from the thread it was created on.
Standards are great! Everybody should have one!
|
|
|
|
|
hi,
to access the object's properties created in one thread from another, you have to define a delegate for that function and invoke that method from the new thread. then only you will be able to change the properties.
example below:
private delegate void UpdateUIDelegate(string text);<br />
private void UpdateUI(string text)<br />
{<br />
if(InvokeRequired)<br />
{<br />
this.Invoke(new UpdateUIDelegate(UpdateUI),new object[] {text});<br />
return;<br />
}<br />
this.textbox1.Text= text;<br />
}
you can now call the "UpdateUI" function from the new thread
this is one of the methods of making your code thread safe.
hope this helps
regards
|
|
|
|
|
I have been looking for many article about writing text file but all of those they talking about window form but I'm looking for web application article and I don't find any.
I would like to get help from anybody who knows how to do this work.
And also I have a question.
-Can I use streamwriter or streamreader with web application?
Please help me give up with this problem.
Thank you for all reply,
Junior boy.
-- modified at 3:44 Monday 21st May, 2007
junior boy
|
|
|
|
|
It's irrelevant that it's a web app, assuming you want to write a text file on the server. On the client, all you can do is have someone download a text file, you can't just write one without the user asking for it.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
You mean I have to create a text file and keep it on the server first and then if user want that file just download from the server and I can't write the information directly to client,right?
And please give me some keyword for looking the ideal of this.
Thank you very much.
junior boy
|
|
|
|
|
You can do that, then you just need to provide a link. You can also set the mime type and stuff a file into a response, using the Response object.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
Hi!
I do have strange crashes on an application.
An App, consisting of an .Net1.1/C#-Exe and some .Net1.1-DLLs is doing some communication over RS232 and executing some Threads/UserWorkItems. It processes some Jobs, that are started by commands that arrive over RS232.
At some point, when the app is running maybe about 45mins to 1.5 hours it disapperard without any sign. I put in a lot of logging (Status of the system, exceptions and so on), so there should be nearly no line of code outside a try/catch. Every try/catch-block has it´s own logging.
I even put a try/catch around the "Application.Run(...)" inside my main-routine. Logging before and after this application start should show me, what happened. No result: the app doesn´t even write the logging at the very end of the main-routine where any exception should be caught.
But when the app crashes i do not get any more logging-entry or event this nice "MS-Send Information on crash"-Window. It´s just gone, just if anyone killed the process with the task-manager.
And what the stangest thing is: it works fine for hours and hours on an simulation-worksstation, but crashes on the machine it should finally run on.
Who can help me? Any ideas are welcome!
Thanx a lot!
J.
|
|
|
|