|
Hi all,
Is it possible to have a text's fontstyle property to Bold, Italic and underline at the same time.
If yes then how?????
Thanks in advance
Rana Krishnraj
|
|
|
|
|
The documentation says:
This enumeration has a FlagsAttribute attribute that allows a bitwise combination of its member values.
So yes it is possible.
|
|
|
|
|
the Coding Way:
create a new Font(new FontFamily("Tahoma"), 12.75f); (for Example)
and change what ever u want in it
then assgin it to text's font property
The Designer View Way :
or Go To the component in the Design View and click on the Font Property
then Cahnge What ever u Like
Have Fun
Never forget it
|
|
|
|
|
ya that's correct.
But if font have already Bold property set to true and now i want to set its italic property then resulted output text would have both Bold and italic property set to true, instead of only one that is either bold or italic.
any way thanks for replying...I got the hint. let me do it
Rana Krishnraj
|
|
|
|
|
FontStyle fs = FontStyle.Bold;
fs |= FontStyle.Italic;
|
|
|
|
|
In code you can combine them using bitwise operations:
FontStyle.Bold | FontStyle.Italic
modified 12-Sep-18 21:01pm.
|
|
|
|
|
Hi!
Please, help me! I would like to create List<t>, for myType in runtime(for example, Int32):
Type myType = Type.GetType("System.Int32");<br />
List<myType> list = new List<myType>();<br />
- compiler is throwing errors:"The type or namespace name 'myType' could not be found (are you missing a using directive or an assembly reference?)"
How can I create such list for this type?
modified on Tuesday, July 8, 2008 9:42 AM
|
|
|
|
|
You can't. The generic type has to be known at compile time.
What is it that you are trying to accomplish?
Despite everything, the person most likely to be fooling you next is yourself.
|
|
|
|
|
Guffa wrote: You can't. The generic type has to be known at compile time.
Not quite. A generic type can still be created with reflection at runtime.
|
|
|
|
|
You can create a generic type with reflection at run time. However, I am not sure what use it would be to you.
Eg: Activator.CreateInstance(typeof(List<> ).MakeGenericType(yourtype))
|
|
|
|
|
Hi, I'm looking to create an executable file that I can load on my windows mobile Symbol device that'll delete everything that I don't need. The problem is that I'm not familiar at all with working with windows registry within code. This is my first time using c#, however I'm fluent in Java which I've heard is similar. Can someone give me a start on the code such as a method used to delete a registry key and a method used to delete a file.
Thanks in advance!
|
|
|
|
|
Here u Go it's here in CodeProject
[^]
Have Fun
Never forget it
|
|
|
|
|
umm after looking here I need some help as I've never written in c# before. Is there a way I can just hardcode what I need. I just want something simple for now that I can type in what I need and it will delete it. When I look at
[code]
try
{
// Setting
RegistryKey rk = baseRegistryKey;
RegistryKey sk1 = rk.CreateSubKey(subKey);
// If the RegistrySubKey doesn't exists -> (true)
if (sk1 == null)
return true;
else
sk1.DeleteValue(KeyName);
return true;
}
[/code]
it seems that when I'm cteating the Registry key rk and deleting it, it's doing nothing more then deleting what I made, even though I didnt call new. Could someone help me out.
|
|
|
|
|
This whole project is for windows mobile as I said before... I've been thinking about whether it would be easier to use a registry file (.reg file) to delete the registry entries that I would need to delete, and then just delete the files with the delete method.
Help please!
|
|
|
|
|
Maybe this can help u :
[^]
Have Fun
Never forget it
|
|
|
|
|
Thanks! I understand it more now. But i need to know is it possible to edit the registry in windows mobile 5.0 through an exe file or do i need to download a refistry editor?
|
|
|
|
|
Hi,
I used sql 2005 as my backend.
How do i check the MAX(of a field) in a table in from C# codes
|
|
|
|
|
if one stores data in a DATATABLE it's easy to see that :
DataTable DT;
DT.Columns.Count;
Have Fun
Never forget it
|
|
|
|
|
|
I think you want to get the max value of a column from a table in sql server?
select max(column_name) from table
You run this as an executescalar in your c#
hope this helps
Bob
Ashfield Consultants Ltd
|
|
|
|
|
is there a way to Listen to all Port's
Like the Ip Case ( IPAddress.Any )??
Have Fun
Never forget it
|
|
|
|
|
I'm using C#, .net2.0 framework and DB2 as my database.
I need to validate a database(DB2) query which is given by the user in the textbox. Please note that I just need to validate not to execute the query(text in textbox). I dont want any third party software and I want to do in .net2.0, ASP.net, C#, DB2
Please share your ideas and solution.
|
|
|
|
|
if you're using any kind of a dataSet u can create a shallow copy of it
and without "Thouching" the original Exe the Qurey for test only
use the try and catch finlly
Have Fun
Never forget it
|
|
|
|
|
thanks for your reply..
Could you please tell me how to do in .net2.0 with c#. If you provide steps or code is very helpfull for me..
Thanks in advance
|
|
|
|
|
Does db2 have the query parse facility like sql server? This allows you to parse the sql without executing. If so then you should be able to wrap it up in a try/catch and display any problems.
Bob
Ashfield Consultants Ltd
|
|
|
|