|
IMO WindowsControlLibrary project or
In your project, right click and select Add -> User Control
जय हिंद
|
|
|
|
|
It really is about time microsoft gave us a more flexible text box. The one we have is the Win32 one that's been around forever and doing anything imaginative with it really is an uphill struggle. It's probably the most used control, but the least adaptable IMO.
DaveBTW, in software, hope and pray is not a viable strategy. (Luc Pattyn)Visual Basic is not used by normal people so we're not covering it here. (Uncyclopedia)
|
|
|
|
|
Maybe you could try out WPF controls. Provides a lot of amazing functionalities for all the controls including text boxes.
|
|
|
|
|
They want us to use WPF to do anything like that. Although the textbox is not that adaptable, we can always accomplish things using border styles, colors and containers.
जय हिंद
|
|
|
|
|
Take a look at this article[^].
The section entitled 'The XMLEditorChooser Dialog' shows a dialogue with a control similar to the one you are describing. THe source is in the source code for the article. Why not use it as a base for your own control.
If you improve on it, significantly, write an article and let us all have the benefit.
Henry Minute
Do not read medical books! You could die of a misprint. - Mark Twain
Girl: (staring) "Why do you need an icy cucumber?"
“I want to report a fraud. The government is lying to us all.”
|
|
|
|
|
hey is there any control to show data graphically in winforms. if yes then from where i can get learning vedio of that control.
thanks in advance
|
|
|
|
|
I've answered your original question a few posts down
|
|
|
|
|
Hello,
I developed an application that uses Word for word processing, I used this example
http://www.codeproject.com/csharp/wordml_template.asp
but I met a problem when I put my window in topmost = true
other windows displayed in Ms WORD background.
how can i do to resolve the problemes.
Thanx
|
|
|
|
|
hey is there any control to show data graphically in winforms. if yes then from where i can get learning vedio of that control.
thanks in advance
|
|
|
|
|
First of all, thank you. It's been far too long since I saw a new member ask a question without expecting the full source code. With regard to your question, what form of graphical data? Images are displayed in the System.Windows.Forms.PictureBox, while graphs are usually custom-made
|
|
|
|
|
costum made!
any idea how to make?
i want it just like task manager performance graph
|
|
|
|
|
There are lots of 3rd party softwares available for this. In case you do not need to use them, them you can create excel charts through code.
जय हिंद
|
|
|
|
|
The drawing is rather simple. I think you might even be able to find some articles on graph rendering on CodeProject. The basic idea, however is something like this:
- Get the highest value in the data range
- Get the lowest value in the data range
- Get the difference between them
- Divide the height by the result from step 3. This is how many pixels to get higher by for each unit
- Set the initial X coordinate to 0
- Set the line thickness to 3
- Iterate through each data value
- Multiply the value by the division. Subtract this from the height. You now have your Y coordinate
- Draw a line from (X, Height) to (X,Y) with the aforementioned line thickness
- Add the line thickness to X
Please remember, though, that this doesn't take into account having rather a lot of data points. If there are too many, then you may get an error. You'll probably have to take this into account yourself, but this should get you started
|
|
|
|
|
MicroSoft have their own Chart Control. Here[^].
Start there, then where ever you want to go today!
Henry Minute
Do not read medical books! You could die of a misprint. - Mark Twain
Girl: (staring) "Why do you need an icy cucumber?"
“I want to report a fraud. The government is lying to us all.”
|
|
|
|
|
|
Assuming that I have the following xaml code:
<UserControl x:Class="Test.DateList"<br />
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"<br />
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"<br />
xmlns:c="clr-namespace:Test"><br />
<DockPanel><br />
<StackPanel><br />
<RadioButton Checked="YMD"> Show YMD </RadioButton><br />
<RadioButton Checked="MDY"> Show MDY </RadioButton><br />
</StackPanel><br />
<ListView Name="list"><br />
<ListView.ItemTemplate><br />
<DataTemplate><br />
<TextBlock Text="{Binding Path=Date, Converter=???" /><br />
</DataTemplate><br />
</ListView.ItemTemplate><br />
</ListView><br />
</DockPanel>
and the following class:
[ValueConversion(typeof(DateTime), typeof(String))]<br />
partial class DateList : UserControl, IValueConverter<br />
{<br />
enum Form { YMD, MDY }<br />
Form DateForm = YMD;<br />
public DateList()<br />
{<br />
InitializeComponent();<br />
<br />
List<DateTime> dates = new List<DateTime>();<br />
for (int i=0;i<10;i++)<br />
dates.Add(DateTime.Today + TimeSpan.FromDays(i));<br />
list.ItemsSource = dates;<br />
}<br />
void YMD(object sender, RoutedEventArgs e)<br />
{<br />
DateForm = Form.YMD;<br />
list.InvalidateVisual();<br />
}<br />
void MDY(object sender, RoutedEventArgs e)<br />
{<br />
DateForm = Form.MDY;<br />
list.InvalidateVisual();<br />
}<br />
public object Convert(object value, Type targetType, object parameter, CultureInfo culture)<br />
{<br />
DateTime dt = (DateTime)value;<br />
DateList dl = parameter as DateList;<br />
if (dl != null)<br />
{<br />
switch (dl.DateForm)<br />
{<br />
case Form.YMD: return dt.ToString("yyyy/MM/dd");<br />
case Form.MDY: return dt.ToString("MMM dd, yyyy");<br />
}<br />
}<br />
return null;<br />
}<br />
public Object ConvertBack(object value, Type targetType, object parameter, CultureInfo ci) { return null; }<br />
}
How can I link the converter in the data template to correctly display the dates?
As I've coded the example, my thoughts were to use the ConverterParameter and to pass the reference
to the class, but I don't know how to set this to anythign other than a static value within the xaml file.
Any suggestions would be greatly appreciated.
|
|
|
|
|
You would stand more chance of a sensible reply if this was in the 'WPF / WCF / WF' Forum.
Henry Minute
Do not read medical books! You could die of a misprint. - Mark Twain
Girl: (staring) "Why do you need an icy cucumber?"
“I want to report a fraud. The government is lying to us all.”
|
|
|
|
|
Ditto what Henry said and use pre tags for more than one line of code, rather than code tags.
DaveBTW, in software, hope and pray is not a viable strategy. (Luc Pattyn)Visual Basic is not used by normal people so we're not covering it here. (Uncyclopedia)
|
|
|
|
|
I want the VB code for creating FXCOP custom rules in .net applications... After a long and refined search for a week i was able to get C# code only which at certain parts couldn be transformed as vb code... Pls help me in this issue since im running out of time to complete this project within this week...
Thanks in advance...
|
|
|
|
|
Nirmala VijayAseelan wrote: fter a long and refined search for a week i was able to get C# code only which at certain parts couldn be transformed as vb code...
Nirmala VijayAseelan wrote: urgently required.. pls reply...
Sorry, urgentz requests go automatically to the bottom of the stack.
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
Nirmala VijayAseelan wrote: I want the VB code
This tells me that this post is meant for the VB forumn??
Nirmala VijayAseelan wrote: I want
Generally it should start with, I tried .
Excellence is doing ordinary things extraordinarily well.
|
|
|
|
|
Sorry, I replied as quickly as I could
DaveBTW, in software, hope and pray is not a viable strategy. (Luc Pattyn)Visual Basic is not used by normal people so we're not covering it here. (Uncyclopedia)
|
|
|
|
|
OK. I've replied.
Not many others have though. I wonder why?
Henry Minute
Do not read medical books! You could die of a misprint. - Mark Twain
Girl: (staring) "Why do you need an icy cucumber?"
“I want to report a fraud. The government is lying to us all.”
|
|
|
|
|
|
Thanks for replying Julien...
That link contains the contents in C# language that i already searched for.. Actually i couldn convert that C# code into VB totally.. pls help me in finding vb code.
|
|
|
|