Simon Robinson spake:
>
> Hi guys
>
> I have a class with two integer properties - call them A and B.
> There is a condition that the value of B should always be greater than A,
> otherwise the class won't function correctly. I'd like the error to be
> detected and an exception thrown when client
Try adding the attribute:
[ToolboxItem(true)]
to the class.
--
Peter
David A. spake:
>
> Hi everybody,
>
> Can anybody explain to me, why the following class cant be placed on
> the Toolbox?
>
> using System;
>
> namespace ExWebbrowserControlLibrary
> {
> ///
> /// Zusammendfas
You will have to be careful with the ppPropVariant pointer pointer.
The documentation is a little contradictory. First the docs claim that
ppPropVariant is a pointer to an output variable that receives a pointer to
the PROPVARIANT. But then the docs go on to say in Notes to Callers:
Allocate the
> Erick Thompson spake:
>
> Peter,
>
> Thanks for your great suggestions. I eventually ended up using the last
> method, the one that explicitly created the char array using AllocHGlobal.
> Is this method going to impact performance at all, or is using
> AllocHGlobal
> actually going to speed thin
>[PreserveSig]
>int GetText(
> [MarshalAs(UnmanagedType.U4)]
> out UInt32 pcwcBuffer,
> [MarshalAs(UnmanagedType.LPWStr)]
> out string awcBuffer
>);
Just looking at the docs
ut together code to let me use IFilter
> via LoadIFilter. Do I need to write RCW method signatures for all the
> methods of an interface, or only the ones I am interested
> in/going to call?
>
> Thanks,
> Erick
>
> - Original Message -
> From: "Peter Stephens&qu
Thanks for the nice sample.
Did you know that the BeforeNavigate2 event does not fire? This is due to a
COM interop bug (see kb article: Q311298). You can overcome this by also
implementing the DWebBrowserEvents (in addition to the DWebBrowserEvents2)
sink on the activex web browser control.
See
> Erick Thompson spake:
>
> How would I go about using the IFilter[1] interface from C#? From what I
> gather, it's not an automation interface (== not a COM object?),
> so I'm not
> sure where to start.
>
> Thanks,
> Erick
>
> [1]
> http://msdn.microsoft.com/library/default.asp?url=/library/en-us
Hi Ted,
Thank you for the book suggestion. I might read your book in the future, but
currently do not have the time to read a whole book on the subject.
For your information, instead of trying to disable the refresh function in
MSHTML, I am writing my own private process Pluggable Protocol (URLM
Hi Netters,
I am doing a bit of work with COM interface references and am slowly but
surely learning the ins and outs of interop.
One thing that bothers me about COM interop is that most COM servers expect
deterministic finalization. COM objects that are only expected to be used
for a short peri
Hi Netters,
I am hosting Internet Explorer using the WebBrowser ActiveX control. I made
my own custom AxHost subclass and have setup by hand the IWebBrowser,
IHTMLDocument2, DWebBrowserEvents2, and IHTMLElement interfaces. This all
works and I can display web pages in my control with no problem.
WAS:
> From C# to VB.NET
>
>
> Yes but it doesn't protect the case when an exception is thrown in
> cmd.Dispose(). In that case cn.Close() will not be called as Kirk said.
>
> Jim
>
> > -Original Message-
> > From: Peter Stephens [mailto:[EMAIL PROTEC
your first dispose call (as
> if there is an exception, you'd still want to call cn.Close)
>
> Kirk
>
> -----Original Message-
> From: Peter Stephens [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, 2 May 2002 8:03 p.m.
> To: [EMAIL PROTECTED]
> Subject: Re: [DOTNET]
Thank you Mattias,
I had never considered that multiple using statements before the code block
were valid. I certainly haven't seen it used like this before. Your second
technique is also interesting except that it requires the overhead of the
cast.
My typical pattern is:
SqlConnection cn = nul
I will often use the try ... finally pattern in C# if there is more than one
type of resource to clean up. The using statement only supports one type at
a time.
--
Peter
You can read messages from the DOTNET archive, unsubscribe from DOTNET, or
subscribe to other DevelopMentor lists at http://di
> franklin gray spake:
>
> Has anybody gotten this to work right? I get an empty dataset.
> The rows have been deleted, not removed.
>
> TempDS = Me.DS.GetChanges(DataRowState.Deleted)
Are you serializing your DataSet (ie Remoting) before calling GetChanges()?
There seemed to be a serialization
Hi Netters,
I am interested in using the IE browser control in my WinForms application.
I have never hosted the browser (even in other languages) and am not sure
what the capabilities and caveats are.
So far I have determined that I need to use the COM interop tools like so:
aximp c:\windows\sy
> Ian Griffiths spake:
> MD5 is believed to
> be a good hash algorithm, and it has a length of 128 bytes (i.e.
> 1024 bits)
Actually MD5 is 128 *bits*, that is 16 bytes...
--
Peter
You can read messages from the DOTNET archive, unsubscribe from DOTNET, or
subscribe to other DevelopMentor list
I have never tried to make an extended control using the user control first.
I have made one by just creating a simple code file and setting up my own
class. This code works fine:
>
[ToolboxItem(true)]
public class VrTextBox : TextBox
{
private Boolean _selectOnEntry = true;
> Ingo Rammer spake:
>
> This mail is also a call for action!
> If you already implemented channels or sinks or have some great
> ideas about
> doing so, please don't hesitate to contact me
This is great! I am currently out of the remoting phase of my app and am
under fairly tight deadline for co
Reflection works well for creating a modular program. I would recommend
using strong types more liberally. I assume VB allows you to call methods on
an Obj that do not exist and that it will use reflection to call those
methods. It would be better to cast your object into a Form. Here is the C#
sy
Why don't you just bind the controls on the panel to the dataset? You should
be able to use the same currency manager so that when the current record is
changed in the grid, the panel's controls will automatically refresh. When
the user makes changes via the controls, the data will automatically b
> Shawn Wildermuth spake:
>
> That may be true, but it doesn't make any sense. We're talking about
> disconnected data. Why would you only want inherit a transaction from
> the select?
But the built in command builder (via the associated data adapter) requires
a select statement to determine
> Shawn Wildermuth spake:
>
> I just want to confirm this. CommandBuilders and transactions are
> incompatible, right? Since the CommandBuilder generates and destroys
> Command objects on the fly as needed, I assume there is no way to attach
> a transaction to the commands. I want to update a d
Is it my imagination or is the ComboBox seriously broken? Maybe it is just
my "luck" that I am trying to use it in a way no one else is using it...
Problem #1:
When in DropDown mode (not DropDownList) even you can select and manipulate
text with the keyboard (Shift+End to select, etc) the mouse i
There is no performance difference. The main advantage is that you do not
dirty the public interfaces of your class. Also, if you have two interfaces
that have the same method signature and you want two different
implementations then you will have to use explicit implementation.
Also note that yo
There might be an issue with "\". You must escape a backslash.
Try
"\\"
or
@"\"
--
Peter
>
You can read messages from the DOTNET archive, unsubscribe from DOTNET, or
subscribe to other DevelopMentor lists at http://discuss.develop.com.
gt;
> Peter --
>
> See http://discuss.develop.com/archives/wa.exe?
> A2=ind0110c&L=dotnet&F=&S=&P=8043
>
> This will work in an MDI WinForm.
>
> Bill
>
> On Thu, 11 Apr 2002 13:21:05 -0700, Peter Stephens [EMAIL PROTECTED]> wrote:
>
> >Unlike F
Unlike FoxPro or MFC there doesn't seem to be any automagic support for the
standard edit commands in a main menu. The textbox does have a context menu,
but there doesn't seem to be a way to associate that with a main menu or a
merge menu (in MDI).
I have an idea for a method that might work:
--
29 matches
Mail list logo