At first I think, to implement a the basis of little modules/classes, is a better
way to solve problems.
Classes are in general more flexible through inheritance, access rights etc.
privateobject m_objSync = newobject();
privateint m_nValueA = 0;
privateint m_szText = string.Empty;
m_nValue = value;
m_szText = value;
Thats not the best way to implement it, but out of this class you can be sure of the values (thread-safe). And if you need extern sync you just have to call lock([classInstance].SyncObj);
One more profit is, that you can have more than one instance of this class.
I hope I could explain you a little bit what I meant.
i have tried running threads in this format. but this also works only if button is clicked and only for 4 times but
i wish 1 client to connect to the server when button is clicked and other client will connect and close for each minute.
the code is:-
Nothing else is being done to the bitmap object or any of the other objects involved.
So you may consider the code above as being used as is.
The problem is, however, that using it like this, causes blurring in the text when drawn.
There is a solution to stop the blurring and that is by changing the TextRenderingHint:
From what I understood by reading Microsoft supplied information and the experiences from other developers, it's the Glyph hinting that causes the problem.
I increased the DPI of the originating Bitmap and dropped the hinting.
Some positioning adjustments are required, but nothing I can't fix.
Hope this will help others as well.
Sorry, its not to the problem itself, but I'm wondering.
You say "it's the Glyph hinting that causes the problem".
But on MSDN it says that TextRenderingHintAntiAlias does no hinting.
From MSDN: "TextRenderingHintAntiAlias:
Specifies that a character is drawn using its antialiased glyph bitmap and no hinting. Stem width differences may be noticeable because hinting is turned off. "
See how it's displayed.
Then remove it and compare the two.
Even though it's already visibly apparent, I would like to urge you to print the two results and compare them.
In my humble opinion, the AntiAlias touches the Glyph.
But I could be mistaken.
If I am mistaken and somehow I seem to have missed what the default does as opposed to what AntiAlias does, then please inform me.
Don't forget to add an informative link, not just for myself, but for others coming across this problem.
Thanks in advance.
By setting the TextRenderingHint to AntiAlias, you kill the default corrective Glyph hinting the Graphics object does by itself.
Specifies that a character is drawn using the currently selected system font smoothing mode (also called a rendering hint)."
Specifies that a character is drawn using its antialiased glyph bitmap and no hinting. Stem width differences may be noticeable because hinting is turned off."
"They couldn't fix the bugz in Graphics.DrawString() because way too much .NET 1.x code depended on its quirks. That's what Application.SetCompatibleTextRenderingDefault() is all about too. If you really want to use GDI+, you'll have to find the workarounds for the bugs yourself. Right now, using Graphics.DrawString() in a Paint event is a bug."
"Graphics.DrawString() is too broken to be usable. It got replaced by TextRenderer.DrawText()."
To simplify things:
If you care for precision work, in particular with text rendering, then use the old GDI.
GDI+ is bugged and unusable for precision work.
If you don't care for precision work and you don't use text rendering (or very little of it or the quality isn't important), then use the new GDI+.
You create paramaters in crystal report. via that parameters u can pass
rptCount = New ReportDocument
''Get the collection of parameters from the report
crParameterFieldDefinitions = rptCount.DataDefinition.ParameterFields
''Access the specified parameter from the collection
crParameter1 = crParameterFieldDefinitions.Item("Param1")
crParameter2 = crParameterFieldDefinitions.Item(“Param2")
''Get the current values from the parameter field. At this point
''there are zero values set.
crParameter1Values = crParameter1.CurrentValues
crParameter2Values = crParameter2.CurrentValues
''Set the current values for the parameter field
crDiscrete1Value = New ParameterDiscreteValue
crDiscrete1Value.Value = Request.Form(“param1value“)
crDiscrete2Value = New ParameterDiscreteValue
crDiscrete2Value.Value = Request.Form(“param2value“)
''Add the first current value for the parameter field
''All current parameter values must be applied for the parameter field.