|
Good Morning everybody,
In console base application when i use Console.Write() or Console.WriteLine(), these writes simple text. Is it possible to write Bold text, underlined text or Italic text?
Dipak
|
|
|
|
|
Not on the console.
You can do it in a Rich textbox in a Winforms app though.
Cheers,
Vikram.
"If a trend is truly global, then that trend ought to be visible across ANY subset of that data" - fat_boy
|
|
|
|
|
You MIGHT be able to use the following to send ANSI codes for blinking and underlined text. I have not tried this code at all, so I'm not sure if it will work. You might also be required to load ANSI.SYS in your config.sys or config.nt.
Good luck and let us know if that works out.
|
|
|
|
|
Hello,
I am a .NET Programmer. I am trying to use Selenium functions and writing a c# code to test the sites. The problem I am facing is with the versions. Below, I am listing various softwares that I am using with their versions. Please let me know where the conflict is occuring and how do I solve it.
Selenium RC 0.9.0
NUnit Framework 2.4.1
Mozilla FireFox 1.5
Visual Studio 2005 (c#.NET 2.0).
I get the error saying "Version 2.0 is not a compatible version".
Same code works fine in Visual Studio 2003 (c#.NET 1.1); the versions of other softwares kept constant.
I feel the problem is with Visual Studio 2005. But if that is the case , how do I test the sites that are developed using Visual Studio 2005?
Help Needed......
Thanks in advance....
Vruddhi
|
|
|
|
|
Where and when do you get the error?
Take care,
Tom
-----------------------------------------------
Check out my blog at http://tjoe.wordpress.com
|
|
|
|
|
hi, how do i set the decimal place of a float?
i have,
double Value = 3.40292e+038;
then i want to get the float value with 5 decimal place. First i need to cast double into float,
float x=(float)Value;
what code should i use to be able to get x==3.40282e+038?
modified on Thursday, December 13, 2007 12:12:20 AM
|
|
|
|
|
Do you have this working yet?
"Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon
|
|
|
|
|
hi there,
while working on my project i got to know that ListView supports "Text" Property but it dont show.
can someone tell why?
Becoming Programmer...
|
|
|
|
|
The documentation knows it.
MSDN on Control.Text: The Text property of the control is used differently by each derived class. For example the Text property of a Form is displayed ...
|
|
|
|
|
What is the best practice, norm, efficient use of variable types as follows:
Decimal vs decimal
Int32 vs int
Single vs float
String vs string
etc.
Does it make any difference.
Thanks in advance,
Michael
|
|
|
|
|
I'm quite certain that it makes no difference. In the end, i beleive the compiler will make them the same.
My current favourite word is: Bauble!
-SK Genius
|
|
|
|
|
They are the same:
decimal is an alias for System.Decimal.
int is an alias for System.Int32.
float is an alias for System.Single.
string is an alias for System.String.
If you want to use Int32 (without specifying System.), you need "using System;" at the top of the file.
In almost every place you can use either form. There are some language specific uses where only the alias is possible to use. For example:
struct BetterBoolean : int { True, False, FileNotFound };
works, but not:
struct BetterBoolean : Int32 { True, False, FileNotFound };
Experience is the sum of all the mistakes you have done.
|
|
|
|
|
foreach (DataRow drProfile in dtProfiles.Rows)
{
DataGridViewRow dgvr = new DataGridViewRow();
DataGridViewTextBoxCell dgvic = new DataGridViewTextBoxCell();
//dgvic.ImageLayout = DataGridViewImageCellLayout.Normal;
//dgvic.ValueIsIcon = true;
dgvic.Value = drProfile["profile_id"].ToString();
dgvr.Cells.Add(dgvic);
DataGridViewTextBoxCell dgvtName = new DataGridViewTextBoxCell();
dgvtName.Value = drProfile["profile_name"].ToString();
dgvr.Cells.Add(dgvtName);
DataGridViewTextBoxCell dgvtClient = new DataGridViewTextBoxCell();
dgvtClient.Value = drProfile["client_name"].ToString();
dgvr.Cells.Add(dgvtClient);
DataGridViewTextBoxCell dgvtDate = new DataGridViewTextBoxCell();
dgvtDate.Value = drProfile["date_modified"].ToString();
dgvr.Cells.Add(dgvtDate);
dgvProfileList.Rows.Add(dgvr); //I get the error here. No row can be added to a DataGridView control that does not have columns. Columns must be added first.
}
}
|
|
|
|
|
What do you think it means ?
Christian Graus - Microsoft MVP - C++
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
Can anybody give me the checklist to make sure when class is decorated with [Seializable] attribute. For eg. if this class referred anywhere , where the other class is serialized or not serialized, or used as collection variable.
Thanks
|
|
|
|
|
Do all the integral numeric types implement some interface, like IInteger? I want to make a single method as follows:
public T someMethod<t>(T i1, T i2) where T : IInteger {
...
}
</t> Is such a thing possible without redeclaring the same method over and over again? Thanks,
Sounds like somebody's got a case of the Mondays
-Jeff
|
|
|
|
|
public T someMethod(T i1, T i2) where T:struct
will give you a method that only works with value types. That's as good as it gets, I think.
Christian Graus - Microsoft MVP - C++
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
Hey all,
Today I would like to start a little program for me, just for fun.
I use flasget as the default download manager because of the speed and wide range of downloads options.
However due to the lack of my own "Internet connection", i have a little problem. My problem is that i share the internet connection and whenever i use flashget the bandwith goes down to everyone and i kind of dislike the internet to be unplugged when i am downloading something, so i thought that maybe checking the network bandwith, could anyone lead me on this as well, i could decide whether to start flashget or not, normally night time it is always a good idea to do so but not always... to avoid any complaints from my lovely neighbors... the reason of sharing the internet connection is because it is cheaper!
Would it be possible to control Flashget behavior from another program, like decide which torrent to download? any suggestions?
So far i can start flashget from my little notepad program and run it for a certain amount of time, but for this to work flashget needs to be configured to automatically start downloading when it starts, and i would like to automate that .
Thanks in advance.
Luis E Tineo S
|
|
|
|
|
Hello,
I'm a newbie to using DirectX. My goal is to render a digital image on what looks like a coffee mug and rotate it. I downloaded the DirectX SDK and started playing with the code in the tutorials. (For reasons I won't go into here, I needed to download the older Summer 2004 DX-SDK which shipped with the DirectX 9.0c runtime and managed classes.)
I was able to modify tutorial 5, "Using texture maps", and come close to what I want (minus the handle on the mug). Unfortunately, when the image was texture mapped on the cylinder, two unexpected things happened. One was the image as viewed from the exterior of the cylinder was reversed. I overcame this by mirroring the image I was using for texture, though I wonder if I somehow could have avoided doing that by changing the code.
The other surprise is that the image appears on both the interior and exterior of the cylinder. Keeping my ultimate goal in mind, obviously I would like the interior to remain a solid color, such a white, and show the image only on the exterior. Could anyone offer some help on how to accomplish this? I'd appreciate it.
BTW: I'm still on the v1.1 Framework
Regards,
Rich
|
|
|
|
|
I imagine you'd need to create a second model, of the inside of the cup, and texture it the way you want it.
Christian Graus - Microsoft MVP - C++
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
I am fairly new to C#, how do I get a dialog box to fully display before executing any code. There is no user interaction, but I display messages during the execution, but they never are seen since the box does not finish displaying until the code is finished.
|
|
|
|
|
Hi,
the code you put in the form's constructor, or in its Load handler, will execute before the
form is visible.
And any code you put in any of its event handlers will run on the main or "GUI thread" at the
expense of a good user interaction.
If you have a lenghty operation, you really should use one (or more) separate threads, either
simply instances of Thread, or members of ThreadPool, or a BackgroundWorker. That way the
long operation is handled independent of the user interaction, so the form would continue to
respond to moves, resizes, repaints, etc.
If the long operation needs to start all by itself, launch the thread(s) from inside
the form's Load handler. If it should be launched by say a button click, you obviously
would put the thread launch code in the Button's Click handler.
Warning: as soon as you start using separate threads you will need Control.InvokeRequired
and Control.Invoke() to allow such threads to access the Form or its Controls, because only
one thread is allowed to directly access Controls (the thread that created them).
There are plenty of examples of this, at CodeProject and everywhere else.
|
|
|
|
|
This always happens - I start a reply, get distracted, finish it, and look like I replied when I had nothing to add...
Christian Graus - Microsoft MVP - C++
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
"second that" is fine too
|
|
|
|
|
Hard to know for sure, but I'd guess that the problem is that you've got a form showing modelessly ( show instead of showdialog ) and it doesn't show while the thread is busy with other processing you do directly after. Call ShowDialog and your code will stop until the form is closed. Use a seperate thread to do processing and keep your UI working, or call Application.DoEvents to force a paint event.
Hard to say if this is the problem, without seeing the code.
Christian Graus - Microsoft MVP - C++
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|