|
I have noticed that I can use the Microsoft.Office.core; namespace to interact with outlook.
I also saw some examples in msdn2 that I should use Microsoft.Office.Interop.Outlook; but it's like it doesn't exist. I can't get the Microsoft.Office.Interop.Outlook.Application class to create a new outlook application.
|
|
|
|
|
Hi,
I use textboxes to log application messages sometimes, and want them to stay scrolled to the bottom (most recent message). How can this be achieved?
I've tried both textbox.text += "my message", and textbox.appendtext("my message") - they don't perform the behavior I'm after.
Thanks for any ideas,
cdj
|
|
|
|
|
try using this:
textbox.text= "my message" + textbox.text
hopes it helps,
Wachill
Signature has been encrypted
|
|
|
|
|
It would, were I willing to accept reverse chronological order.
Thanks though!
|
|
|
|
|
Try calling ScrollToCaret after appending the new text.
"Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning." - Rick Cook www.troschuetz.de
|
|
|
|
|
Stefan is right. ScrollToCaret is what you're looking for. The only pitfall to using it, though, is that the TextBox has to have the input focus in order for it to work. Call the Focus method on the TextBox before you call ScrollToCaret .
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
Ah! I've tried scrolltocaret before, and noticed that it did absolutely nothing. It must be the focus-thing that bit me. I'll try scrolltocaret in combination with giving the textbox the focus.
Hm. It occurs to me: if the textbox MUST have focus in order for scrolltocaret to be effective, doesn't that mean it would be difficult to specialize the textbox class into a textbox + AutoScrollToBottom property class - no?
Thanks a bunch everyone!
|
|
|
|
|
It's possible to make a Textbox that autoscrolls, but you'd have to send the textbox window handle the appropriate window messages to get it to scroll.
The reason why the ScrollToCaret function needs the TextBox to have the focus is because it depends on the existance of the caret. The caret doesn't exist in the TextBox until the TextBox has the focus.
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
Hm - Looking into the prospects for an autoscroll textbox property, and I came across the dotnet scrollablecontrol class, which apparently textbox doesn't n-inherit from.
http://msdn2.microsoft.com/en-us/library/system.windows.forms.scrollablecontrol.aspx
Cute little learning project: determine exactly what's involved with deriving from textbox to include an autoscroll property.
Thanks!
|
|
|
|
|
ScrollableControl doesn't do what you think it does. It doesn't automatically scroll to the bottom or anything like that. It supplies scrollbars that automatically appear if the content of the child controls exceeds its boundries.
There are currenly two controls and two components that are direct inheritors of this class: Panel and ToolStrip, and ContainerControl, and Design.ComponentTray.
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
Oh. Boy is the name "autoscroll" misleading for a property then.
Thanks!
|
|
|
|
|
Hey guyz, any idea about how to get pix from camera??
Thanx a bunch
Smile: A curve that can set a lot of things straight!
(\ /)
(O.o)
(><)
|
|
|
|
|
If it's a Canon, read my article on the Canon SDK. Otherwise, WIA is your best bet.
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 )
|
|
|
|
|
It's Sony, WIA hmmmmm
Smile: A curve that can set a lot of things straight!
(\ /)
(O.o)
(><)
|
|
|
|
|
I had write this code to do drag and drop at window form panel. How can i do the reorder panel because this code only to do drag and drop?
using System;
using System.Drawing;
using System.Collections;
using System.ComponentModel;
using System.Windows.Forms;
namespace CMSMS
{
public class mypanel:System.Windows.Forms.Panel
{
private bool isDragging=false;
public int x,y;
protected override void OnMouseDown(MouseEventArgs e)
{
base.OnMouseDown (e);
isDragging = true;
x = e.X;
y = e.Y;
}
protected override void OnMouseUp(MouseEventArgs e)
{
base.OnMouseUp (e);
isDragging = false;
}
protected override void OnMouseMove(MouseEventArgs e)
{
if (isDragging == true)
{
this.Left= e.X + this.Left - x;
this.Top = e.Y + this.Top - y;
}
}
}
}
|
|
|
|
|
Hello everyone,
I am trying to save some data of type (Int & String) into a CSV file. I am able to save one set of data. But I need to open the priviously created CSV file which already contains some data and save some more data into it.
Can someone be kind enough to tell me how I can achieve this please?
The following is the code that I am using for this:
FileStream sb = new FileStream("MyFile.txt", FileMode.OpenOrCreate);
sw.Write(userName);
sw.Write(",");
sw.Write(userSureName);
sw.Write(sw.NewLine);
sw.Close();
Thank you very much and have a great day.
Khoramdin
|
|
|
|
|
For god's sake people, stop asking this CSV question! I see it almost everyday
Why don't you try to search in the posts instead, I bet you will find millions of it
Smile: A curve that can set a lot of things straight!
(\ /)
(O.o)
(><)
|
|
|
|
|
Hello Muammar,
You need to cut down on Coca Cola, mate! Those stuff seems to get you far too hyper.
If I am not mistaken this is a Message Board and people are Free to ask question as long as they don't get too sexual or emotional. Lucky for people like me who are learning and not afraid of asking; there are knowledgeable and kind people, unlike you, whom are happy to take a moment and teach.
I guess that explains why some of my teachers sucked and some others were exceptional and made a long lasting impression.
Any ways, just stay way from Coca Cola and I am sure everything is going to work out just fine, mate.
Have a great weekend.
Khoramdin
Ps. There is a movie called "Pay it forward". I suggest you to rent and watch it.
|
|
|
|
|
.. I hope you found what you're looking for though!
Smile: A curve that can set a lot of things straight!
(\ /)
(O.o)
(><)
|
|
|
|
|
Hello Muammar©,
I am sure I will, mate. Just don't let little things gets into you.
By the way, can you be more specific with your question about Camera pix. I think I have the answer to your question. Just would like to be sure I can give you what it is you are looking for, mate.
Have a great weekend.
Khoramdin
|
|
|
|
|
Khoramdin wrote: I am sure I will
Good!
Khoramdin wrote: about Camera pix
oh, thanks, but don't worry, I think I found something.
Have a nice weekend too.
Smile: A curve that can set a lot of things straight!
(\ /)
(O.o)
(><)
|
|
|
|
|
Use FileMode.Append .
"Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning." - Rick Cook www.troschuetz.de
|
|
|
|
|
Hello Stefan,
Thanx for the help. you are correct. That was the problem and I am very greatful for your help.
have a great weekend.
Khoramdin
|
|
|
|
|
Have you thought about using StreamWriter instead of FileStream ?
Although similar results can be achieved with both, It is specifically designed for writing text into streams.
See this: http://msdn2.microsoft.com/en-us/library/system.io.streamwriter.aspx
Following your example, the code would be something like:
StreamWriter sw = File.AppendText( FileName );
sw.WriteLine( "{0},{1}", userName, userSureName );
sw.Close();
The above code would append or create the file if it didn't already exist.
Does this help?
Regards
Wayne Phipps
____________
Time is the greatest teacher... unfortunately, it kills all of its students
View my Blog
|
|
|
|
|
Hello Wayne,
Thanx so taking the time and help, mate. I tried your suggestion and it work.
I am very greatful for the help.
Have a great weekend.
Khoramdin
|
|
|
|