|
What control is it that shows the actual message in Outlook Express and how do you get the panel at the top that shows who the message is from and the subject etc. etc.
|
|
|
|
|
Silverdelange wrote:
What control is it that shows the actual message in Outlook Express and how do you get the panel at the top that shows who the message is from and the subject etc. etc.
Whenever I ask myself that question, I load up something like Spy++ (in the Tools submenu below your Visual Studio menu in the start-menu).
It allows you hover a pointer over all window types and view exactly what "window class" is being used. Often Microsoft roll their own custom ones that we developers are unable to use.
Regards,
Ray
|
|
|
|
|
Ray Hayes wrote:
Often Microsoft roll their own custom ones that we developers are unable to use.
But eventually a version appears on CP.
"If you just say porn then you get all manner of chaff and low grade stuff." - Paul Watson, Lounge 25 Mar 03 "If a man is standing in the middle of the forest speaking and there is no woman around to hear him, is he still wrong?" - Anon
Jonathan 'nonny' Newman
Homepage [www.nonny.com] [^]
|
|
|
|
|
Type "WinCV" in your command prompt.
It's a Class Viewer hidden in the .NET stuff.
The beauty of this tool is it runs outside of Visual Stuio. For the Object Browser, you need to run within the Studio.
I hope this is not a repost.
Don't and drive.
|
|
|
|
|
Kant wrote:
I hope this is not a repost.
It is, but it's cool stuff.
The only thing that I find troublesome is that only public properties/methods/events are listed.
|
|
|
|
|
I've used that before. It's good but has some limitations.
"Do unto others as you would have them do unto you." - Jesus
"An eye for an eye only makes the whole world blind." - Mahatma Gandhi
|
|
|
|
|
Does anyone have a simple example of a Windows form opening a seconday, modal Windows form? I have the two forms created and have tried the following, which does not work. A button (button1) on the first form is clicked to show the next form (frmSearchPatient).
private void button1_Click(object sender, System.EventArgs e)
{
Form frmSearchPatient = new Form();
frmSearchPatient.ShowDialog();
frmSearchPatient.Dispose();
}
I am just starting out in Visual Studio .NET, coming from doing extensive programming in Delphi. I am having alot of trouble figuring out how to do basic things such as this and have found Help to be of not much help at all.
|
|
|
|
|
This code works. Here are a few suggestions :
- assume we have two forms f1 (of type Form1) and f2 (of type Form2). In the f1 button click event handler, you can do this :
Form2 f2 = new Form2();
f2.ShowDialog();
Please note the use of Form2 (instead of Form).
- Also, don't use Dispose(). In most cases, it won't destroy/recycle the object.
|
|
|
|
|
Well I wouldnt call the dispose method as soon as you load the form, the vs doc states that the dispose method "Overloaded. Releases the resources used by the Component." So throw out the dispose method and im sure youll get it to work fine.
|
|
|
|
|
The code is wrong.
Try this
frmSearchPatient frm = new frmSearchPatient();
frm.ShowDialog();
and you can go ahead and dispose of it if you want because it is modal.
The Dispose method want be called util the dialog is closed.
|
|
|
|
|
Hi!
I'm trying to handle WebBrowser control events.
I wrote program exactly as described in this document http://support.microsoft.com/?id=312777[^] but it work only partly .
I recieve event but WebBrowser is behaving strange. When I use mouse wheel to scroll in the page it does nothing, or when I click on button it doesn't change it's state to pushed (but i recieve event).
When I remove this event handler it works ok.
Thank you!
i'm only pointer to myself
|
|
|
|
|
Tomáš Petříček wrote:
When I use mouse wheel to scroll in the page it does nothing,
Try iEvent.onmousewheel instead of iEvent.onmouseover
Tomáš Petříček wrote:
when I click on button it doesn't change it's state to pushed (but i recieve event).
When I remove this event handler it works ok.
If you receive the event, it's like preventing the web control from doing the standard handling. That's probably why the OnClick event handler is rarely used.
That said, I believe that if you set IHTMLEventObj.cancelBubble = false, you can allow the event to be routed, and give it a chance to be normally processed.
|
|
|
|
|
I found another solution here[^].
It works fine .
i'm only pointer to myself
|
|
|
|
|
Hi,
Can anyone point me to a free DataGrid better than the one which comes with VS.Net, and that support binding to a DataView/DataTable?
Thanks,
Andrei Matei
andreimatei@home.ro
|
|
|
|
|
Where should be the resource files should exist?
Is it in the application directory or bin/debug (release) directory??
If I keep the resource (.ico) in Project directory, it complains at runtime. Could not find file "C:\Project\bin\Debug\Icon1.ico".
I added this resource to the project and using it like this:
private System.Drawing.Icon myTrayIcon = new Icon("Icon1.ico");
It works properly with the app icon. (App.ico)
Why don't they have the "res" folder option (like Visual C++) in C#?
Don't and drive.
|
|
|
|
|
Resources require a special handling. It's not enough to right-click on the resource from the project hierarchy and select "embed resource" from the options.
I am talking with VC#.NET 2K2 in front of me, and I don't know yet if anything has changed in 2K3.
To add arbitrary resource files (not only icons) to a target assembly, you have to add the /win32res:<filename> to the csc.exe command line.
|
|
|
|
|
Because in .NET you can add an entire set of files, easily to any assembly.
1. Click on the file you want to add as a resource to your application and on the Build Action select "Embedded Resource"
2. Your code will need to be a little more complicated. You'll need to do something like this (I'm not in the IDE ATM, but you'll get the idea):
private System.Drawing.Icon myTrayIcon;
Assembly asm = Assembly.GetExecutingAssembly();
using (Stream st = asm.GetManifestResourceStream(asm.GetName().Name + "." + "Icon1.ico")))
{
myTrayIcon = new Icon(st);
}
See? The embedded resources are available as streams. You you think twice, this is very powerful, as anything that can take a Stream as a parameter can use a resource, without any need for special treatment for resources, like in MFC. You can easily create encrypted or compressed resources with it, too.
And, contrary to what S.Rod. has said, you can add any file as a resource. The only drawback is that it won't be a Win32 resource, but as long as you keep with managed code, you won't have any trouble.
My latest article: GBVB - Converting VB.NET code to C#
|
|
|
|
|
Daniel Turini wrote:
And, contrary to what S.Rod. has said, you can add any file as a resource. The only drawback is that it won't be a Win32 resource, but as long as you keep with managed code, you won't have any trouble.
Agreed.
|
|
|
|
|
|
Wow...so to just to add a new icon resource the above mentioned stuff needs to done!!!
So all this logic is included for App.ico? (the default icon for a form)
Thx for ur hlp.
Don't and drive.
|
|
|
|
|
I am working with IE Browser Control. When a new window event occurs I get that breakpoint no problem by implementing an axWebBrowser1_NewWindow2 method in my form.
However, I seem unable to get a handle to the new browser for that new window.
I am trying to set the ppDisp of the event like this:
e.ppDisp = axWebBrowser2.Application;
This allows the new window to show up, but I'm not sure that my axWebBrowser2 object is actually being used ?
I am unable to tie into its DocumentComplete event ? That is my question.
I tried setting a delegate to it like this:
axWebBrowser2 = new AxSHDocVw.AxWebBrowser();
this.axWebBrowser2.Application.DocumentComplete += new AxSHDocVw.DWebBrowserEvents2_DocumentCompleteEventHandler(this.testHandler);
The "testHandler(sender,event)" method is not being called when the new window shows and its document is loaded ?
Thanks in advance for any help on this - mike.
Zeno Rocks
|
|
|
|
|
This code works for me (OnDocumentComplete is triggered from the right Form instance) :
private void OnNewWindow2(object sender, AxSHDocVw.DWebBrowserEvents2_NewWindow2Event e)
{
Form1 newwindow = new Form1();
newwindow.Text = "(new browser window)";
e.ppDisp = newwindow.axWebBrowser1.Application;
newwindow.Show();
}
|
|
|
|
|
Thanks to .S.Rod for the suggestion. I was missing the form. Yeah this seems to now work - great !!
Zeno Rocks
|
|
|
|
|
Is there any way to append RTF text from one RichTextBox control to another
RichTextBox control.
Sonork ID 100:25668
|
|
|
|
|
I've not had a need to work with the C# RichTextBox, but with the ActiveX one, you could do
rtf1.SelRTF=rtf1.SelRTF + rtf2.SelRTF;
"Do unto others as you would have them do unto you." - Jesus
"An eye for an eye only makes the whole world blind." - Mahatma Gandhi
|
|
|
|