|
sealed class Class1
{
public int g=0;
}
class pan
{
Class1 d = new Class1();
}
i know i can't inherit the sealed class , but after instantiating the selaed class in another class , i am not getting the class name object.
eg after instantinating the class class1
Class1 d = new Class1();
in next line of code when i type the character d , the intellisence does not show the object d.
why this is happening ?
Sonia Gupta
Soniagupta1@yahoo.co.in
Yahoo messengerId-soniagupta1
Love is Friendship and Friendship is Love....
|
|
|
|
|
definitely it should work. For clarification try with some default sealed class in the .Net framework.
Check if you are trying to access the class from any methods or not.
|
|
|
|
|
class object are not appearing while i try to access the member functions of that sealed class
Sonia Gupta
Soniagupta1@yahoo.co.in
Yahoo messengerId-soniagupta1
Love is Friendship and Friendship is Love....
|
|
|
|
|
check this,
<br />
sealed class A()<br />
{<br />
public string Add()<br />
{<br />
}<br />
public int id;<br />
}<br />
<br />
class B<br />
{<br />
A obj=new A()<br />
<br />
<br />
public void method()<br />
{<br />
obj.Add();<br />
}<br />
}
|
|
|
|
|
ok solved
Sonia Gupta
Soniagupta1@yahoo.co.in
Yahoo messengerId-soniagupta1
Love is Friendship and Friendship is Love....
|
|
|
|
|
Hi,
In my application, i want to allow the user change their local time by a form. But I don't know how
Can you help me ?
Thank for support 
|
|
|
|
|
Hello,
The kernel32.dll provides a method called SetLocalTime:
[System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)]
public struct SystemTime
{
public short sYear;
public short sMonth;
public short sDayOfWeek;
public short sDay;
public short sHour;
public short sMinute;
public short sSecond;
public short sMilliSeconds;
}
[System.Runtime.InteropServices.DllImport("kernel32.dll")]
public static extern bool SetLocalTime(ref SystemTime time);
Or call the System Timesetting directly over a process:
using System.Diagnostics;
ProcessStartInfo TimeSetting = new ProcessStartInfo(@"C:\WINDOWS\system32\rundll32.exe","shell32.dll,Control_RunDLL timedate.cpl,,0");
TimeSetting.UseShellExecute = false;
TimeSetting.WorkingDirectory = @"C:\WINDOWS\system32";
Process TSet = Process.Start(TimeSetting);
TSet.Dispose();
TSet = null;
Hope it helps!
All the best,
Martin
|
|
|
|
|
In the OS? Or just for your application?
I wouldn't attempt the former.
|
|
|
|
|
can sum1 plz provide me codes to make a media player in c#!!!
vid thanx...
Tarun SUneja
|
|
|
|
|
Nope. We're here to help you write your own code, not just hand over our own work to someone to play with.
|
|
|
|
|
Hi,
I'm wondering if there is a content alignment feature inside container controls (Panel, TableLayoutPanel) . e.g. I have several controls in a TableLayoutPanel. Those controls may change their size on runtime. I want to place them into a grid (like html table) one per cell and align them to middle of the cell(horizontally and vertically). Is this possible without writing custom code ? Until now, I figured out only way that to keep them aligned is to dock-Fill them.
|
|
|
|
|
Hello,
Have a look at the "Anchor" property of the controls?
Maybe it fits your needs.
All the best,
Martin
|
|
|
|
|
Thanx for answer.
anchor doesn't provide what I need.
|
|
|
|
|
do anyone have the coding for messenger in C# language or any other language
kindly reply asap
|
|
|
|
|
It's easy to build a chat application. But a messenger like msn is far more complicated. The client should be in sync with the server. i.e: whenever you get a new message the client should be intimated. Mechanisms like polling in regular interval would be complicated,or rather may not be optimal . I think msn messenger has implemented a tcp channel for that purpose.
|
|
|
|
|
there is a file called class diagam in the project Now my qustion is what's the utility of this file.Just to view the class (the project have)?
Sonia Gupta
Soniagupta1@yahoo.co.in
Yahoo messengerId-soniagupta1
Love is Friendship and Friendship is Love....
|
|
|
|
|
The benifit of the class view:
Shows all the classes include in the project.
provides the definition for all the classes used.
Faster reference if you want to go to any part of the class just double click the class name
Overall it is for better understanding of your project!
gauthee
|
|
|
|
|
Hey guys, I'v worked on Windows application for quite a while and it switched to ASP.net about 3 months ago ! Of course it's something totally different and I was wondering if you could hook me up with some practical sources ! as well some websites to get some ready projects to get a better idea !
Thanx
Mr.K
|
|
|
|
|
|
|
Its 2.0 ! the thing is ve got tons of ebooks about this, I need something that gets to the point like i dunno builds a complete website from scratch ! something like that !
Mr.K
|
|
|
|
|
You can't start to build the complete website straight away. You have to read the book and try some samples steps by steps.. then, if you get some ideas how web application works, you can start the project... You can also participate in opensoure ASP.NET project if you wanna practice ...
Thanks and Regards,
Michael Sync ( Blog: http://michaelsync.net)
If you want to thank me for my help, please vote my message by clicking one of numbers beside "Rate this message". Why vote? Plz Read it here. Thank you.
|
|
|
|
|
Can anybody tell me how to convert a .msg file to .eml file.using a .net component or some C# .net or even a COM libary.
Thanks in advance.
|
|
|
|
|
Xs_2 wrote: Can anybody tell me how to convert a .msg file to .eml file.using a .net component or some C# .net or even a COM libary.
I'm not sure about .NET components. But there are some free converting tool available for that...
You may wanna read this thread.
http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=6706&SiteID=1
Thanks and Regards,
Michael Sync ( Blog: http://michaelsync.net)
If you want to thank me for my help, please vote my message by clicking one of numbers beside "Rate this message". Why vote? Plz Read it here. Thank you.
|
|
|
|
|
HI I have created an application that uses the registry.
On the application there are two textboxes and a button. When the form is loaded the first textbox displays a font that has been declared in the registry and the second text box displays the font size, again declared in the registry. The button allows the user to change the font and font size using a FontDialog. When this dialog is opened (by clicking the button), the selected font is the font declared in the registry. I also want the font size that is declared in the registry to be selected in the dialog. The font name works perfectly fine, I am just having trouble with converting the font size.
First of here is my code:
string font;
int size;
FontDialog selectFont = new FontDialog();
font = Convert.ToString(Registry.GetValue(@"HKEY_LOCAL_MACHINE\SOFTWARE\RegKey_test", "Font", ""));
selectFont.Font = (Font)TypeDescriptor.GetConverter(typeof(Font)).ConvertFromString(font);
size = Convert.ToInt32(Registry.GetValue(@"HKEY_LOCAL_MACHINE\SOFTWARE\RegKey_test", "FontSize", ""));
selectFont.Font.Size = (Size)TypeDescriptor.GetConverter(typeof(Size)).ConvertFrom(size);
if (selectFont.ShowDialog() == DialogResult.OK)
{
Registry.SetValue(@"HKEY_LOCAL_MACHINE\SOFTWARE\RegKey_test", "Font", selectFont.Font.Name.ToString());
TBFont.Text = selectFont.Font.Name.ToString();
Registry.SetValue(@"HKEY_LOCAL_MACHINE\SOFTWARE\RegKey_test", "FontSize", selectFont.Font.Size, RegistryValueKind.DWord);
TBFontSize.Text = selectFont.Font.Size.ToString();
}
I am unsure if I should set the variable size as an integer or a string, and then according to this how is it converted to Font.Size?
Lucy
|
|
|
|