|
The pick up a book or two on C#. They'll walk you through those first "starting out" apps.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
|
you can grab this book from MSDN website when you register your copy of C# Express
Microsoft® Visual C#® 2005 Express Edition: Build a Program Now
|
|
|
|
|
I know that you can get ISO 8601 date/time format using DateTimeFormatInfo.SortableDateTimePattern.
From the VS help on DateTimeFormatInfo.SortableDateTimePattern we can get:-
"This code produces the following output.
CULTURE PROPERTY VALUE
en-US yyyy'-'MM'-'dd'T'HH':'mm':'ss
ja-JP yyyy'-'MM'-'dd'T'HH':'mm':'ss
fr-FR yyyy'-'MM'-'dd'T'HH':'mm':'ss"
However, there does not seem to be any mention of the timezone extension. i.e. in the format
YYYY-MM-DDThh:mm:ss±hh:mm
How can I add the ±hh:mm based on the current timezone location.
Thanks,
Liam
|
|
|
|
|
Just add zzz to the format string.
---
b { font-weight: normal; }
|
|
|
|
|
I want my application to start maximised and I want the Maximise(resize) button beside the close X button to be disabled. How would you do this?
In the end we're all just the same
|
|
|
|
|
Set the WindowState (in the properties) to Maximized and the Maximize Box to false but you can change the windowstate stil by doubleclicking on the formheadline. To disable that you have to catch the forms resize event and than set the windowstate to maximized.
Greetings,
Ingo
|
|
|
|
|
i am looking on the net for a long time for an example code that shows how can i resolve Channel in c#.
does anybody know?
thanks.
|
|
|
|
|
I have created a form which will give the user CPU info.
I have a button called "btnCPUInfo" and I want it when clicked to display information on the CPU speed on "txtCPUSpeed" textbox and in "txtCPUCore" This will give the CPU core name. and Finally I want thwn button "btnCPUInfo" is clicked a list box called "lstCPUCore" will populate with the number of CPU cores.
How would you do this?
In the end we're all just the same
|
|
|
|
|
You could start by making use of the PerformanceCounter class provided under the System.Diagnostic Namespace. It gives you control over monitoring yours or a remote machine via a number of performance parameters
|
|
|
|
|
Hello!
I'm wondering if anyone know of an article where you make your own textbox. I don't want to inherit from textbox, I want to do it from scratch. Or an article that goes through something simular.
Thanks in advance!
~~~~~~~~~~~~~~
Martin Lundberg
Student, Sweden
|
|
|
|
|
i think u may need to put a picturebox and draw the character accordinig to the pressed key. but why you want to do it from scratch.
|
|
|
|
|
I want to do it from scratch for fun. You don't know of an article about it? Well, I'll take a look at PictureBox, thanks.
~~~~~~~~~~~~~~
Martin Lundberg
Student, Sweden
|
|
|
|
|
You don't need a Picturebox. It's too heavy weight to be the base of another control as simple as a TextBox. Besides, the normal TextBox doesn't use one, so why should you?
You can see how MS implemented the TextBox in the .NET BCL by downloading .NET Reflector[^] and using it to open up the System.Windows.Forms namespace. Find the TextBox class and you'll be able to see the complete code for the TextBox with a little work.
You'll see that it inherits from System.Windows.Forms.TextBoxBase. You'll probably want to do the same.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
i think he don't want to inherit from TextBox class he want to do it fro scratch
I don't want to inherit from textbox, I want to do it from scratch
|
|
|
|
|
He didn't tell me to inherit from TextBox but from TextBoxBase which is a abstract class
~~~~~~~~~~~~~~
Martin Lundberg
Student, Sweden
|
|
|
|
|
Ahem. Read the post again. I didn't say TextBox , I said TextBoxBase .
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Hello!
Thanks for the tips about Lutz Roeder's .NET Reflector, might give me some ideas
~~~~~~~~~~~~~~
Martin Lundberg
Student, Sweden
|
|
|
|
|
It's an awsome tool! You can learn a LOT from just poking around the .NET BCL and seeing how MS implemented everything.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Now I am creating excel files by using Odbc driver. But that just creates .xls file with ordinary table in it.
Is it possible to use more excel features? for example to add to some cells green color?
|
|
|
|
|
I wouldn't use odbc to create excel files, if you want to add more features. Just reference to excel's interop class (Microsoft Excel 11.0 Object Library). Then you can create a new excel document add sheets, change cell values, formats and call macros.
Greeting,
Ingo
|
|
|
|
|
Hello,
I'm still messing around the PropertyGrid Control, and I still not sure/don't know about some certain point. And I would like to ask something:
1. The relationship between TypeConverter and PropertyGrid is.When PropertyGrid have to show some data, TypeConverter try to convert object into string form and the PropertyGrid will take that string to show. And when PropertyGrid have to store the object, it will call TypeConverter.ConvertTo() to convert it back into object. Am I right ?
2. Is there anyway to customize the text that is represent the property data shown in PropertyGrid's Cell. for example if I have struct like :-
struct SomeInt<br />
{<br />
public int Current{get;set;};<br />
public int Min{get;}<br />
public int Max{get;}<br />
}
Inside some Class, and the PropertyGrid is assigned to that object.
Inorder to use with TypeConverter, I need to supply all of those 3 fields to ToString() method(needed to create new Instance of SomeInt) and provide some mechanism to parse those 3 fields back to SomeInt. However if it show all 3 field in the PropertyGrid's Cell, user may change the min or max number (which is not desired). So Is there anyway to show just the Current value?
What I means is that, instead of show text like "5-(0,100)" (5 is Current, 0 is min and 100 is max), I want it just display 5.
Do I need to create new class that inherit from PropertyGrid myself?
3. Which article should I read if I want to create new class that inherit from PropertyGrid ?
I'm really sorry that this thread is quite long, My English skill is quite rather bad.
Regards and Thanks
Wutipong W.
|
|
|
|
|
1.
mr_tawan wrote: it will call TypeConverter.ConvertTo() to convert it back into object. Am I right ?
No. Override ConvertTo method to convert object to string for the property grid and Override ConvertFrom method to convert string from property to object.
2.
If you don't want a property to be visible. you can use [Browsable(false)] attribute to decorate the property. But, you might not need it.
3.
You should download Reflector for .Net[^] and look at how Microsoft wrote their typeconverter.
|
|
|
|
|
hello..
i want to make the tab control aligned to the left..the problem is that when i do so via the Alignment property, the Text no longer appear visually on the tab pages!!!
does anyone know how to solve this..
note:this only happens if the Appearance is "normal".if it's "buttons" the problem doesn't occur..
|
|
|
|
|
this is the first time i use interface.
how can i create a class that handle different kinds of objects as dates, numbers, strings...?
|
|
|
|