|
Try searching the DOTNET mailing list archives; here is one post that might help a little bit, though I could have sworn I've seen more similar to what you're trying to find.
Sorry I can't be of more help,
James
Sonork ID: 100.11138 - Hasaki
"Not be to confused with 'The VD Project'. Which would be a very bad pr0n flick. " - Michael P Butler Jan. 18, 2002
|
|
|
|
|
I need implement a singleton in C#. I have tried making a static class but I seem to be getting members that go out of scope. What is the best was to do this? Thanks.
Steve
|
|
|
|
|
|
Here is a really good article on the Singleton Design Pattern.
Is show it in C++ and then the code convert as is to C# and then a better way of doing it in C# that takes advantage of the language. The C# way is easier. Take a look at the URL
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dndotnet/html/singletondespatt.asp
Odis Wooten
odis@msn.com
|
|
|
|
|
Can anyone tell me how i get the controls on my C# form to display in an XP style, when the form is running on XP?
Any ideas welcome!
kenbloke
|
|
|
|
|
When you run your application on XP it display in XP style,even it is C#,VC or VB programs.Maybe you change your Appearence to classic style in control panel
Mazy
You can find a solution (even a foolish one) for all problems (even big ones)
|
|
|
|
|
To clarify. XP style in terms of displaying the controls in the updated XP style as defined by XP's Common Control library and XP's current theme setting.
I'm new to C# and does not appear to be obvious how to achieve this. Or have i missed something?
Kenbloke
|
|
|
|
|
I don't get what you really want(sorry for my poor english ),but according to my knowledge it is something refer to your windows not your programming language
Mazy
You can find a solution (even a foolish one) for all problems (even big ones)
|
|
|
|
|
In order to enable the XP Style controls you need to include a manifest either as a resource or as a separate file.
The manifest is nothing more than an xml document
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<assembly
xmlns="urn:schemas-microsoft-com:asm.v1"
manifestVersion="1.0">
<assemblyIdentity
processorArchitecture="x86"
version="5.1.0.0"
type="win32"
name="myapp.exe"/>
<description>your application description</description>
<dependency>
<dependentAssembly>
<assemblyIdentity
type="win32"
name="Microsoft.Windows.Common-Controls"
version="6.0.0.0"
publicKeyToken="6595b64144ccf1df"
language="*"
processorArchitecture="x86"/>
</dependentAssembly>
</dependency>
</assembly>
(manifest taken from Colin's VMTU since I can't find mine here)
If the manifest is included as a separate file (the easiest way to do it), it should be named myapp.exe.manifest
I can't remember the steps off hand for putting the manifest in the resource, i think resgenx was the command that was used to generate the resource, then you include the resource with the compiler.
HTH,
James
Sonork ID: 100.11138 - Hasaki
<small>"Not be to confused with 'The VD Project'. Which would be a very bad pr0n flick. " - Michael P Butler Jan. 18, 2002</small>
|
|
|
|
|
And as Mazdak said, set the Appearance property to standard
James
Sonork ID: 100.11138 - Hasaki
"Not be to confused with 'The VD Project'. Which would be a very bad pr0n flick. " - Michael P Butler Jan. 18, 2002
|
|
|
|
|
Thanks for that info James and Mazdak!!! pointed me in the right direction.
Anyway for anyone who is still having problems displaying XP style controls. i found the following site on msdn useful.
http://msdn.microsoft.com/library/?url=/library/en-us/dv_vbvcstechart/html/vbtchUsingWindowsXPVisualStylesWithControlsOnWindowsForms.asp?frame=true
Kenbloke
|
|
|
|
|
hi,
I'm new to C#,I have this problem and would apriciate if someone would give me an idea .
I have a object initilazed in a Windows form and i wold like to use the same oject in some components and the way I was thinking was to get the address of this object. But since it's a managed object the compiler doesn't alow me to take it's address.
Please give me any ideas to overcome this,
thanks a lot for your time
Endri
|
|
|
|
|
Like this:
SomeObject obj = new SomeObject();
Component1.Prop1 = obj;
Component2.Prop2 = obj;
All objects are refered to through "object references". You can freely pass this object reference to any part of your system.
--
Peter Stephens
|
|
|
|
|
Ok, quick question here -- I have VS.NET Beta 2 .. I've decided to start to get into C# and don't know much about it yet. Should I be using VS.NET Beta 2 or should I uninstall Beta 2 and install the latest release of the .NET Framwork SDK with the V1 of C# (since the C# language namespaces and the like have been re-arranged, I'm thinking that I should avoid learning the already outdated version).
On another note -- does anybody have the V1 C# compiling in their Visual Studio 6 IDE? If so are there some step-by-step instructions for implementing this?
Thanks in advance to all who reply,
Travis D. Mathison ---
--- After three days without programming, life becomes meaningless ...
|
|
|
|
|
I've started c# recently,and I use latest version of it,but the book I use for it is for Beta2 time.Up to now there were no problem and there is no difference.
I know that lots of namespace and ... changed from Beta1,not from Beta2
Mazy
You can find a solution (even a foolish one) for all problems (even big ones)
|
|
|
|
|
Ok, thanks .. I wasn't sure how much change there was between the Beta2 and V1 conversion, but apparently not as much as I thought.
Travis D. Mathison ---
--- After three days without programming, life becomes meaningless ...
|
|
|
|
|
Yes,I think for begining,it is not necessary to upgrade
Travis D. Mathison wrote:
--- After three days without programming, life becomes meaningless ...
nice
Mazy
You can find a solution (even a foolish one) for all problems (even big ones)
|
|
|
|
|
Hi all,
I've a problem with Interoperability with Win32 unmanaged code; my C# program call an unmanaged function in a Win32 DLL and pass a pointer to delegate. This DLL every 20 milliseconds call my C# delegate but the win32 thread finish immediatally after createted. In the win32 function there is one FOR cycle that print a string in output debugger window.
Can you have some suggestion for solve my problem ?
Thanks
|
|
|
|
|
In PrintDialog I changed the "AllowSomePages" to "true".
How can I determine the maximum page number?
Mazy
You can find a solution (even a foolish one) for all problems (even big ones)
|
|
|
|
|
I have a form when I resize the form the size of two text box in it change ,but I don't want it(the others do not change)
thanks
Mazy
You can find a solution (even a foolish one) for all problems (even big ones)
|
|
|
|
|
Look at the Anchor property on the two textboxes. When a form is resized it will resize so that those edges (specified by the Anchor property) are always the same distance from the edge of the container.
HTH,
James
Sonork ID: 100.11138 - Hasaki
"Not be to confused with 'The VD Project'. Which would be a very bad pr0n flick. " - Michael P Butler Jan. 18, 2002
|
|
|
|
|
I examine different Anchors for these "Multiline TextBoxes" but each time they move or resize wrong and hide other controls in the form.
Mazy
You can find a solution (even a foolish one) for all problems (even big ones)
|
|
|
|
|
To keep a control from moving, the Anchor property should be set to (AnchorStyles.Top | AnchorStyles.Left)
This will ensure that the control remains the same distance from the left and from the top.
HTH,
James
Sonork ID: 100.11138 - Hasaki
"Not be to confused with 'The VD Project'. Which would be a very bad pr0n flick. " - Michael P Butler Jan. 18, 2002
|
|
|
|
|
Thanks James,I found it
Mazy
You can find a solution (even a foolish one) for all problems (even big ones)
|
|
|
|
|
One thing that always have confused me is why is the syntax "public class MyCLass" in C#?
What does it mean that "public" in the beginning of a class?
------------------------------
©0d3 ©®4©k3® - That's me!
------------------------------
|
|
|
|