EventInfo.AddEventHandler requires a delegate as its second parameter. The
syntax you require is therefore:
ei.AddEventHandler(Ctrl, new EventHandler(StatusBarEventHandler));
--
Ian Griffiths
DevelopMentor
- Original Message -
From: "Keith Balaam" <[EMAIL PROTE
be built into the
CLR. But today if you want disconnected operation but with the option to
download updates, you will need a shim application to manage this updating
for you. Have a look at
http://www.gotdotnet.com/team/windowsforms/appupdater.aspx
for some ideas
--
Ian Griffiths
DevelopM
;t forget this) 1MB per thread. Thanks for
> blowing 300 Mb for nothing so far :-)
Nope. As someone else point out, all it reserves is address space. The
memory isn't allocated until the stack grows to fill it.
--
Ian Griffiths
DevelopMentor
You can read messages from the Advanced DOTNET archive, unsubscribe from Advanced
DOTNET, or
subscribe to other DevelopMentor lists at http://discuss.develop.com.
e problem is Assembly.LoadFrom only specifies a codebase, not a full name.
So it has to hit the web server to find out whether it needs to download a
new copy.
--
Ian Griffiths
DevelopMentor
- Original Message -
From: "Joe Duffy" <[EMAIL PROTECTED]>
> I am unabl
"Kevin E. Kenny" <[EMAIL PROTECTED]> wrote:
> Where there is a Close() it will invariably call Dispose().
For SqlConnection that's not quite true. Close() doesn't call Dispose().
But Dispose() does call Close(). Dispose() also clears the connection
string.
-
TSERV puts in
had been stripped out.
--
Ian Griffiths
DevelopMentor
- Original Message -
From: "Larry McCoy" <[EMAIL PROTECTED]>
Ian,
Thanks for the explanation. It seems to me, after reading the various
replies I've seen is that it is a combination of several th
had to involve more than one thread.)
--
Ian Griffiths
DevelopMentor
- Original Message -
From: "franklin gray" <[EMAIL PROTECTED]>
With the discussions of late about Asynchronous calls, I have to ask. What
is the difference between it and executing a method in another
biguously permitted to do so by the
RFC822 spec. The fact that it causes problems is a symptom of bugs in email
clients. (But I still wish LSOFT would stop LISTSERV from sticking in these
spaces, since it's such a widespread bug.)
--
Ian Griffiths
DevelopMentor
You can read messages from the DOTNET archive, unsubscribe from DOTNET, or
subscribe to other DevelopMentor lists at http://discuss.develop.com.
ole Application. (There's nothing magic about the
/t:winexe switch - it just disables the behaviour your describe. Console
applications are definitely allowed to open windows.)
--
Ian Griffiths
DevelopMentor
- Original Message -
From: "Rune Christensen 8397" <[EMAIL PROT
Set, "TableName"];
As an alternative you can also use BindingContext[whatever].Current to
return the current row. For a DataTable I think this will be an object of
class DataRowView. So you can do something like this:
object columnValue = BindingContext[myTable].Current["So
othing happen at all?
--
Ian Griffiths
DevelopMentor
- Original Message -
From: "Paul Stevens" <[EMAIL PROTECTED]>
> I have run into e few strange problems when using different methods to
> handle "unhandled" exceptions
>
> I have tried catching all u
custom
control you mention fit into all of this? (Don't send a screenshot to the
list - I'm fairly sure that the LISTSERV will reject the attachment, and
even if it doesn't sending bitmaps to mailing lists never tends to be
popular.)
--
Ian Griffiths
DevelopMentor
- Origi
else that CancelButton does for you?
--
Ian Griffiths
DevelopMentor
- Original Message -
From: "Chris Sells" <[EMAIL PROTECTED]>
> If I set the AcceptButton to a button whose DialogResult is set to None,
> pressing that button does not automatically close the form.
>
&
pushes those updates back to the database.
--
Ian Griffiths
DevelopMentor
- Original Message -
From: "franklin gray" <[EMAIL PROTECTED]>
Don't think there is anyway to prohit another programmer from changing the
data in a datatable.
-Original Message-
Fro
elp a LOT.
But using asynchronous socket calls on a single thread will help at least as
much on a single CPU system. You can queue up just as much outbound network
traffic, and you won't be paying the overhead of getting the OS scheduler to
do the work for you.
--
Ian Griffiths
DevelopMentor
You
ng these threads is really bad
for performance.)
--
Ian Griffiths
DevelopMentor
- Original Message -
From: "Jesse Sanders" <[EMAIL PROTECTED]>
> Ian,
>
> Thanks for the reply. Here is the code for the SOAP class. I didn't
write
> the actual soap calls
with any of the controls on your form?
--
Ian Griffiths
DevelopMentor
- Original Message -
From: "Jesse Sanders" <[EMAIL PROTECTED]>
> Ben,
>
> Thanks for the tip on the priority. I had just set it back to below
normal
> to try to test this morning. I jus
es within a component
that is in the GAC)
Have you found problems with this technique?
--
Ian Griffiths
DevelopMentor
- Original Message -
From: "Craig McMurtry" <[EMAIL PROTECTED]>
> You are confronted with a limitation of custom Web controls.
>
>
> Khoi Pham
is possible to
fix it after you've done this. But it's usually simpler to get it right in
the first place.)
--
Ian Griffiths
DevelopMentor
- Original Message -
From: "george antony" <[EMAIL PROTECTED]>
> Did u try this ...I am not able to put a splitter
>
(Obviously this puts the treeview on the left and the listview on the right,
but I'm guessing that's what you meant to say - that's the way round they
are in every version of Windows Explorer I've ever used.)
--
Ian Griffiths
DevelopMentor
- Original Message -
From:
not be necessary in RTM
HTMLDocument htmlDoc = (HTMLDocument)
Marshal.CreateWrapperOfType(document,typeof(HTMLDocument));
So, given that the RTM shipped a while back, is there anything that should
be changed in here? (Beyond removing that comment...)
--
Ian Griffiths
DevelopMentor
Yo
Does it return an object whose
type is System.Type? Or does it return some object that implements IBar?
If the latter, then as has already been pointed out, you don't need to do
any conversion. Just cast to IBar (which will do a non-converting cast.)
--
Ian Griffiths
DevelopMentor
- Origi
implement ICollection but not IDictionary?)
--
Ian Griffiths
DevelopMentor
- Original Message -
From: "Christoph" <[EMAIL PROTECTED]>
> The XmlSerializer will not touch anything that implements IDictionary, it
> only serializes collections implementing ICollection or I
OK, so I guess the question is: if fonts are installed but unavailable, does
the author of the original question care? Or are only those fonts that can
be used interesting?
(Would the original question asker please stand up?)
--
Ian Griffiths
DevelopMentor
- Original Message -
From
#x27;t care...) The
interesting question is going to be "What fonts are available for me to
use?" The contents of the font folder are an irrelevant implementation
detail, surely?
--
Ian Griffiths
DevelopMentor
- Original Message -
From: "Dustin Wish" <[EMAIL PROTECTED
> Ian Griffiths <[EMAIL PROTECTED]> wrote:
>
> >By default a strongly-named assembly can only be called by
> > full-trusted callers. I think this is intended as a 'secure by
> > default' setting, because it should reduce the chances of
> > someone b
COREE.DLL. If
the latter, you might see something different.
But it certainly doesn't ever execute the unmanaged entry point on XP if you
have the framework installed.
--
Ian Griffiths
DevelopMentor
- Original Message -
From: "John Lam" <[EMAIL PROTECTED]>
I'm f
Why would that be easier than searching through the list of FontFamily
objects returned by the mechanisms I mentioned?
--
Ian Griffiths
DevelopMentor
- Original Message -
From: "Dustin Wish with NCA Communications" <[EMAIL PROTECTED]>
> Try doing a search through t
you have explicitly declared that you think your
component will be robust in the face of malicious code calling into it, such
code will not even be given the chance to try.
--
Ian Griffiths
DevelopMentor
- Original Message -
From: "Wayne Kelly" <[EMAIL PROTECTED]>
> It ap
your client application is using private copies of
fonts.)
I'm not aware of a way of looking the name to see if it is installed though.
As far as I'm aware you just have to search the list.
--
Ian Griffiths
DevelopMentor
- Original Message -
From: "Jeff Roberts" &l
about (as
> implied by Petzold).
Well you can always do this:
Size localCopyOfSize = someControl.Size;
localCopyOfSize.Width *= 2;
This makes it slightly more obvious what will get modified. And if that's
not what the developer meant, then in that case, no you fundamentally can't
do it. (I've not read the part of Petzold in question yet, so I can't
comment. Although I have the book - if you give me a page number I can be
more specific...)
--
Ian Griffiths
DevelopMentor
You can read messages from the DOTNET archive, unsubscribe from DOTNET, or
subscribe to other DevelopMentor lists at http://discuss.develop.com.
Of course what hadn't occurred to me was that you might be doing web forms.
Being a Windows Forms guy, I tend to think of a Windows Forms form when
someone says Form.
If it's ASP.NET, then no, as a couple of people have pointed out you don't
get the same instance every time.
-
is empty? (Is the dstMaster itself
null? Or is it non-null but referring to something that appears to have no
data in it?)
--
Ian Griffiths
DevelopMentor
- Original Message -
From: "Karen Healey" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, May 2
it a
value type in the first place) then there's nothing useful that the
Size.Width set accessor can do anyway.
--
Ian Griffiths
DevelopMentor
You can read messages from the DOTNET archive, unsubscribe from DOTNET, or
subscribe to other DevelopMentor lists at http://discuss.develop.com.
?
--
Ian Griffiths
DevelopMentor
- Original Message -
From: "Karen Healey" <[EMAIL PROTECTED]>
> I've created a class in C# with a DataSet data member declared like this:
>
> private DataSet dstMaster;
>
> I have a method that builds it by concaten
r not checking that entry conditions have been met.
--
Ian Griffiths
DevelopMentor
-Original Message-
From: Jeff Roberts [mailto:[EMAIL PROTECTED]]
It sure would have saved me a lot of time if an exception had been thrown !
You can read messages from the DOTNET archive, unsubscribe fr
or some reason this is not
present in the PropertyManager. I don't understand why this wasn't made a
method of BindingManagerBase since it would be useful in both binding
scenarios.
--
Ian Griffiths
DevelopMentor
- Original Message -
From: "Sean Greer (SBI-Chico)" <[
tool box onto the form. But not everyone starts from
that angle of course...
--
Ian Griffiths
DevelopMentor
- Original Message -
From: "Jeff Roberts" <[EMAIL PROTECTED]>
Chris,
Until today, I did not even know that System.Windows.Forms.Timer existed. I
needed a
calls you
never realised could block for seconds at a time... (Or against 3rd party
controls.)
--
Ian Griffiths
DevelopMentor
- Original Message -
From: "Matthew Adams" <[EMAIL PROTECTED]>
> Thinking about it, I guess one possible application would be a
> multiple-
n will be the same: don't do UI stuff on a worker
thread - you don't own the worker thread. Which means either don't use the
System.Timers.Timer class, or if you must, use Control.Invoke to get the
real work done on the right thread.)
--
Ian Griffiths
DevelopMentor
- Origina
ead in the first place...) This
means that you are free to do UI things when it calls you back, and there is
no need to use Control.Invoke first.
So try changing your code to use the Windows Forms timer and see if that
helps.
--
Ian Griffiths
DevelopMentor
- Original Message -
From: &qu
Which kind of timer are you using? (There are several different Timer
classes in .NET.)
--
Ian Griffiths
DevelopMentor
- Original Message -
From: "Jeff Roberts" <[EMAIL PROTECTED]>
I have a modeless form that works perfect when shown from a menu click
event, but if
ange notification", but it's not entirely clear
how you are supposed to do that. (Or at least it's not clear how to do it
if your data source isn't list-like.)
--
Ian Griffiths
DevelopMentor
You can read messages from the DOTNET archive, unsubscribe from DOTNET, or
subscribe to other DevelopMentor lists at http://discuss.develop.com.
u
are seeing.
--
Ian Griffiths
DevelopMentor
- Original Message -
From: "Pierre Greborio" <[EMAIL PROTECTED]>
> It happens something strange. In the manifest there is the assembly name
> added MyAssembly.MyNamespace.MyControl.bmp whereas the filename is
> MyNames
I saw this problem once on a machine with a bad hard disk. Perhaps your
hard drive is flakey?
--
Ian Griffiths
DevelopMentor
- Original Message -
From: "Rathna Raj" <[EMAIL PROTECTED]>
> I haven't done a comprehensive virus scan on this machine, because thi
e embedded resources are
listed in the MANIFEST. You'll see what they are really called there.
Also, remember these things are case sensitive - check the case is correct.
--
Ian Griffiths
DevelopMentor
- Original Message -
From: "Pierre Greborio" <[EMAIL PROTECTED]>
is? (Other than nant, or nmake...)
--
Ian Griffiths
DevelopMentor
- Original Message -
From: "Luis Abreu" <[EMAIL PROTECTED]>
> well I want to include a bitmap in a c# windows app. I've just checked
> the book programming windows wicth c# and the writer s
the forms into MDI mode, since it only
appears to do things you don't actually want? Why not just make the child
windows...normal child windows?
--
Ian Griffiths
DevelopMentor
- Original Message -
From: "Matt Horne" <[EMAIL PROTECTED]>
> I need to exactly place w
transparent region, but that's different. To get a drop shadow
you want to have different transparency in different places.)
--
Ian Griffiths
DevelopMentor
- Original Message -
From: "Joao Santa Barbara" <[EMAIL PROTECTED]>
Hi people... o saw all the explanations .
ll be more efficient.
> gr.FillRectangle( SystemBrushes.Control, rect );
So how come you used SystemBrushes here? It's the right thing to do, I just
assumed you didn't know about it, since you hadn't used it anywhere else...
:-)
--
Ian Griffiths
DevelopMentor
You can read messages from the DOTNET archive, unsubscribe from DOTNET, or
subscribe to other DevelopMentor lists at http://discuss.develop.com.
You could do what the TrackBar appears to do - silently adjust values to
enforce the constraint. If you set the Maximum to be less than the Minimum
it adjusts the Minimum, and vice versa.
--
Ian Griffiths
DevelopMentor
- Original Message -
From: "Chris Sells" <[EM
o just to keep aligned.) I'm not sure why this
is, as I would have expected the Windows Forms timer to derive ultimately
from the same time base as DateTime.
--
Ian Griffiths
DevelopMentor
- Original Message -
From: "Peter Foreman" <[EMAIL PROTECTED]>
> --- Davi
ContextBoundObject would hook into the .NET
interception layer.
But right now there is no documented way of getting attributes of your
devising automatically instantiated.
--
Ian Griffiths
DevelopMentor
You can read messages from the DOTNET archive, unsubscribe from DOTNET, or
subscribe to other DevelopMentor lists at http://discuss.develop.com.
ven any guarantee
that it will be there in future versions of the framework. So writing code
with a dependency on it is probably not a good idea. What exactly are you
trying to achieve? (Why do you need to know the exact client area size?)
--
Ian Griffiths
DevelopMentor
- Original Messag
upport for
ResourceManager-based resource files in the Cursor class).
--
Ian Griffiths
DevelopMentor
- Original Message -
From: "Matt Horne" <[EMAIL PROTECTED]>
> Can a .CUR file be stored in a resource file? I can do it with bitmaps,
> strings, and icons but not with mouse curs
eed because there isn't
a direct mapping between the names - for example, although you're trying to
import System.Drawing.Imaging, the assembly that the classes live in is
actually System.Drawing. And some of the mappings are more whacky - a lot
of the System classes live in mscorli
> Also any reason you bound to the Dataset rather than the table ?
Habit. :-)
--
Ian Griffiths
DevelopMentor
- Original Message -
From: "Ben Kloosterman" <[EMAIL PROTECTED]>
> I was sort of hoping to do it without using the changed events - I
avoid
&g
ingly hard...
--
Ian Griffiths
DevelopMentor
- Original Message -
From: "franklin gray" <[EMAIL PROTECTED]>
Well, the spawning of a new thread isn't that hard, just dealing with all
the little things such as showing the right cursor, dealing with the case
that if a user close
rting
point is to create a new Custom Control class and then in the source code it
produces, change the base class to be whatever you wish to derive from.
--
Ian Griffiths
DevelopMentor
- Original Message -
From: "Reggie Burnett" <[EMAIL PROTECTED]>
> Can object
}
I think this is simpler than Rama Krishna's version - his will work (and you
should avoid the flickering on resize if you catch all of the messages he
suggests). But this seems to do everything in one go for me.
--
Ian Griffiths
DevelopMentor
- Original Message -
From: "Joh
on of your
window. (Your window never actually gets redrawn when it is dragged, its
contents are merely moved.)
--
Ian Griffiths
DevelopMentor
- Original Message -
From: "Alois Reisinger" <[EMAIL PROTECTED]>
Hi everyone,
I have a form that is programmatically atta
d be a
bad idea. In particularly you absolutely would not want to lock it for the
whole time it takes to serve a page up. (Well duh... But that would be a
no-brainer solution to thread safety for accessing the Application object.
I've seen worse...)
--
Ian Griffiths
DevelopMentor
- Or
ry
(5). A million an hour is definitely (6), but how many of those are there?
Not even Microsoft get a million page views an hour on average.
[1] http://www.microsoft.com/backstage/inside.htm
--
Ian Griffiths
DevelopMentor
- Original Message -
From: "Thomas Tomiczek" <[EMAIL
e robust,
it's a good thing that I have no option). I dislike anything that attempts
to press on regardless in the fact of manifestly bad input.
For these methods to behave as I believe you are suggesting rather smacks of
On Error Resume Next... :-)
--
Ian Griffiths
DevelopMentor
You can read messages from the DOTNET archive, unsubscribe from DOTNET, or
subscribe to other DevelopMentor lists at http://discuss.develop.com.
like OLE drag and drop wouldn't work with Windows Forms applications.
--
Ian Griffiths
DevelopMentor
- Original Message -
From: "David B. Bitton" <[EMAIL PROTECTED]>
> I'm guessing that [STAThread] is marking to componenet as
> Single Threaded Architectur
indicating
progress, with the percentage in the middle. I wrote this in order to put
my money where my mouth was - people were claiming that the lack of XOR
support in GDI+ presented some kind of barrier to doing this sort of thing.
This control doesn't use XOR...
--
Ian Griffiths
DevelopMentor
Yo
clip rectangle to the first section and draw
it, and set it again to the second section, and draw it with reversed
colours.
Who needs XOR anyway?
--
Ian Griffiths
DevelopMentor
- Original Message -
From: "Bryan Batchelder" [EMAIL PROTECTED]
I recall reading that GDI+ lacks XOR
*goes back and actually reads the documentation for HashAlgorithm.HashSize*
"Gets the size of the computer hash code in *bits*." (my emphasis)
D'Oh!
--
Ian Griffiths
DevelopMentor
- Original Message -
From: "Joel Mueller" <[EMAIL PROTECTED]>
> An
the strings... Or is there some
reason you can't store the strings?
--
Ian Griffiths
DevelopMentor
- Original Message -
From: "Erick Thompson" <[EMAIL PROTECTED]>
> Upon further reflection, I think that using GetHashCode isn't a good idea
to
> check if I
hread.MemoryBarrier(); by reading from and writing to a
volatile variable.)
--
Ian Griffiths
DevelopMentor
You can read messages from the DOTNET archive, unsubscribe from DOTNET, or
subscribe to other DevelopMentor lists at http://discuss.develop.com.
ion as you enumerate through
it, because you won't be modifying your copy.
Why would you actually want to make the copy by some means other than
enumeration?
(I originally assumed Graeme's post was a joke...)
--
Ian Griffiths
DevelopMentor
- Original Message -
From: "Duncan
It does this *after* it has
called OnPaint. I've no idea why it bothers calling OnPaint in this case,
since it always draws straight over whatever has been drawn...
So you can't draw anything in an MDI parent, but your code works as is in an
MDI child when I try it.
--
Ian Grif
mock queue for testing.
--
Ian Griffiths
DevelopMentor
- Original Message -
From: "Justin Rudd" <[EMAIL PROTECTED]>
> Hi Drew,
>
> > Lots of people do this, it's a well-known testing
> > pattern referred to as Mock Objects[1].
&
lf
when it closes, unless you've done something unusual specifically to prevent
that.
--
Ian Griffiths
DevelopMentor
You can read messages from the DOTNET archive, unsubscribe from DOTNET, or
subscribe to other DevelopMentor lists at http://discuss.develop.com.
ose on the form. (That
doesn't happen automatically when the form is closed - you are allowed to
reopen a form after closing it, so disposal only happens if something calls
Dispose explicitly.)
--
Ian Griffiths
DevelopMentor
- Original Message -
From: "Axel Heitland"
75 matches
Mail list logo