|
I made WinForm project.
And I made a label and it has a font of 12 point and Comic Sans MS.
And below of it,
I made a textbox too and it has a font of 12 point and Comic Sans MS.
both of it are multiline.
and I give a words in this.label1.Text="I found a reason for me to change who I used to be. A reason to start over new. And the reason is you.";
and I runed my program and I typed same as above on textbox.
and position of the text of textbox is more left than label text.
I hope it's position of left to right is same.
Someone help please. StreamFormat? or anything?
Image will remind us some feelings and if I can ask someone about a problem, that's not a bad life.
|
|
|
|
|
I made a small test program and did the same thing that you describe. I see that I had to make the textbox narrower so that the text wrapped thesame way. I also have to make the textbox taller.
I saw that the textbox had the characters 1 pixel to the right of the label. Also the spacing between lines for each was different too. It looks like it might be about 1.5 pixels or so added to each line in the textbox that the label does not have.
With VS.Net 2005 (at least on my system), when you move a textbox it goes transparent and you can see what is underneath. I put the text in both the label and the textbox and it was very obvious that the line spacing was off and the left-right spacing was off by 1 pixel as well.
Sorry I could not come up with something more than confirming what you see even on the new compiler.
Steve Maier, MCSD MCAD
|
|
|
|
|
In addition to what Steve said, you can also adjust the position of the text in a Label using the TextAlign property. This is also available to set in the designer with a useful UITypeEditor similar to what the Dock property exposes.
Software Design Engineer
Developer Division Sustained Engineering
Microsoft
[My Articles]
|
|
|
|
|
I am looking for a ListView control capable of being used in "virtual" mode. I have to display large amounts of data (from datasets too).
|
|
|
|
|
What do you mean by "virtual mode"?
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
The list items aren't actually read-in in their entirety, but the scroll bar is adjusted accordingly. This is nice for large lists or for lists that grab their items from a slow data source.
See my reply to the parent post for more information if you're interested.
Software Design Engineer
Developer Division Sustained Engineering
Microsoft
[My Articles]
|
|
|
|
|
You might try searching google for virtual ListView s. IIRC, there might be one or two mentioned here on CodeProject.
As far as binding DataSet s (and keep in mind that bindable controls in the .NET BCL actually bind against IList and/or IListSource , not just DataSet s), there's really isn't any support for this in the .NET BCL. You must add this yourself. How complex you make it is a question that you must asked based on your requirements. I've done simple one-way "binding", but it's not true binding.
The ListView in .NET 2.0 will contain support for virtual lists (among other things) and, IIRC, support for data-binding, although you might find a better alternative based on your requirements from GridView .
You can find more information about these components on http://lab.msdn.microsoft.com/library[^] and from various articles you can find on http://msdn.microsoft.com[^].
Software Design Engineer
Developer Division Sustained Engineering
Microsoft
[My Articles]
|
|
|
|
|
I want to change the color of listview control cell based on condition.
|
|
|
|
|
|
hi all
seems that i have a real problem with crystal reports i wanna pass a parameter from a text box to the crystal report and i dont know how i tried reading in the msdn but in vain plz help me asap its really urgent for me i need to know wat to do exactly
thanx
|
|
|
|
|
Have a read of this[^]
It should get you started and help you look-up the correct sections on MSDN.
Michael
CP Blog [^]
|
|
|
|
|
Hi,
For programming pocketpc(.net compact framework) in C#, do I need to
buy the whole Visual studio .net package or just buy the C#.net package ?
There is a great price difference between the two. Have anyone just buy
C#.net and able to use it to program smart device in .net CF ?
Thanks
|
|
|
|
|
C# .net box states that "build device-based applications and solutions" is not part of this
So, in short you need to buy VS.NET to do pocket programming
Sanjay Sansanwal
www.sansanwal.com
|
|
|
|
|
Is there a way to kill an existing process in C# using the Process class ? I've only been able to find literature that allows you to kill a process that was created with the Process class. How would I go about killing all the instances of notepad.exe running on my machine using C# ?
|
|
|
|
|
If you look at the member documentation in the .NET Framework SDK, several methods should be obvious, like GetProcessByName :
Process[] procs = Process.GetProcessesByName("notepad");
if (procs != null)
foreach (Process proc in procs)
proc.Kill(); Please note it's not always such a good idea to kill processes, though. First try to close them gracefully using Process.CloseMainWindow followed by Process.Close . If that doesn't work or if you really mean to kill processes, then use Process.Kill .
Software Design Engineer
Developer Division Sustained Engineering
Microsoft
[My Articles]
|
|
|
|
|
check
http://www.codeproject.com/csharp/cskillapp.asp
Sanjay Sansanwal
www.sansanwal.com
|
|
|
|
|
|
Colin Angus Mackay wrote:
Won't anyone think of the clicketies!
Haven't you started that fund yet? SaveTheClickities.org?
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
I am just doing a bit of load testing of a web service. I wrote several test cases in NUNIT to fire off.
One test case creates several (5) threads which all start close to each other and call the web service several times. For some reason, usually only one (sometimes 2) of the threads complete, the others seem to hang. It is also never the same thread that completes.
Does anyone have a clue why this may be the case?
tia
stephan
|
|
|
|
|
Maybe the Web Service isn't mutli-threaded...
|
|
|
|
|
Wininet.dll limits connections to an HTTP 1.0 server to 4 and to an HTTP 1.1 server to 2. See http://support.microsoft.com/default.aspx?scid=kb;en-us;320721[^] for details.
Similarily, the ServierPointManager is configured to, by default, limit connections to a particular server to 2. You can change this by setting ServicePointManager.DefaultConnectionLimit to something higher, or use HttpWebRequest.ServicePoint to get the ServicePoint for a particular web address and set ServicePoint.ConnectionLimit to something higher than 2. This should apply to all connections made to a particular server.
Software Design Engineer
Developer Division Sustained Engineering
Microsoft
[My Articles]
|
|
|
|
|
Maybe I am missing it - but I am not connecting from IE.
This is a class dll that is running under nunit doing web service calls. it does so by creating multiple threads that all hit the same web service.
Basically some threads simply stop and never return;
Stephan
|
|
|
|
|
A WebService request is nothing but a glorified page request over HTTP or HTTPS. So, yes, your using the very same WinInet.dll that IE uses to execute and download its page requests and everything in that article applies to your problem.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Actually, the .NET BCL doesn't use wininet.dll. That's why I explained about the ServicePoint and ServicePointManager . It's the same situation under different APIs, but the KB article explains the "why" a little better than in the .NET documentation (which doesn't even state what the default connection limit is initially set to - you have to dig into the IL - which you know I love - to find that).
Software Design Engineer
Developer Division Sustained Engineering
Microsoft
[My Articles]
|
|
|
|
|
In .NET HTTP requests are made via HttpWebRequest (well, typically). This uses ServicePoint s and a ServiePointManager to manage connections to servers.
Why I explained this with wininet.dll and gave you a link is because it contains more information about why. The .NET Framework SDK documentation isn't clear on a default, so you have to dig into the IL intructions and type metadata in the assembly to know this information (which I do all the time).
A web service proxy (client) uses HttpWebRequest internally and thus is prone to the same conditions that I described in my post.
Software Design Engineer
Developer Division Sustained Engineering
Microsoft
[My Articles]
|
|
|
|