|
Hi ...
modified 28-Nov-12 8:11am.
|
|
|
|
|
I have found the solution to solve this issue
|
|
|
|
|
Hi guys, i'm a newbie programmer currently trying to develop a CRM software.
I am using VS 2005 (VB.Net) with MS SQL as the database.
As the title says, i am looking to display data (from my database) in a bar graph/pie chart like in http://img24.imageshack.us/img24/4885/piey.jpg[^].
Are there any tutorials available for what i am looking to do? I'm not sure how i should be doing this, with a windows form :A control to display pie charts with highly customizable formatting[^]? Or with what is done here: Drawing a Bar Chart[^]
Would appreciate any help/suggestions, as i'm at a loss to what to do, heh.
Thanks, and apologies if i'm posting in the wrong forum.
Edit: I came across A WPF Pie Chart with Data Binding Support[^] - looks really nice, but apparently it was " created by a newer version of this application(Visual Studio) and cannot be opened".
modified on Monday, May 11, 2009 12:06 AM
|
|
|
|
|
Microsoft has a nice free chart control - MSChart - (Similar to DundasChart)not sure it will work with VS2005 - Depends on what framework version maybe.
I don't speak Idiot - please talk slowly and clearly
I don't know what all the fuss is about with America getting it's first black president. Zimbabwe's had one for years and he's sh*t. - Percy Drake , Shrewsbury
Driven to the arms of Heineken by the wife
|
|
|
|
|
Hi,
normaly it is easier to use a control, if that looks the way you want/need. If you dont get the look you have to paint it 'by hand'. Try to search on codeproject or google, there are tons of good free charting controls out there.
The whole WPF stack is based on DotNET 3.5 and does not run under the 2.0 framework that VS 2005 is targeted at.
Regards: Didi
|
|
|
|
|
Thanks guys, i'll try it out and get back to you!
|
|
|
|
|
Hi all,
I am trying to use the keydown events on a form. They work up until I click on a textbox or button. I am pretty sure it has to do with the focus being on the txtbox/button etc., but how do i put the focus back on the form to make keydown events work again?
|
|
|
|
|
Hi,
you can receive all the keyboard events for your Form, even when a Control on it has focus, by setting Form.KeyPreview true.
Luc Pattyn [Forum Guidelines] [My Articles]
The quality and detail of your question reflects on the effectiveness of the help you are likely to get.
Show formatted code inside PRE tags, and give clear symptoms when describing a problem.
|
|
|
|
|
Thanks for the quick reply!
it works
|
|
|
|
|
You're welcome.
Luc Pattyn [Forum Guidelines] [My Articles]
The quality and detail of your question reflects on the effectiveness of the help you are likely to get.
Show formatted code inside PRE tags, and give clear symptoms when describing a problem.
|
|
|
|
|
i am developing an app in which i have used graphics object to create and fill
a rectangle with some color.
now i want to know when the user clicks inside the rectangle
but i am getting some problems
currently i am doing this with if-elseif conditions
wouldn't a much better way to do this is by associating
the click event to the rectangle
i can't figure out how to associate events with the rectangle
is it possible?
if yes then
please help
else
tell if there any other way of doing it
other than using a label or a picture box
end if
thanx
TheMrProgrammer
|
|
|
|
|
Hi,
The only UI objects that support events are Controls. Most of them are rectangular, so you are in luck. You could use say a Panel and set its background color.
OTOH a Rectangle has a Contains() method which takes a Point, and a MouseEventArg gives you a Point, so you don't have to switch to Controls (which wouldn't make things easy when non-rectangular anyway).
Luc Pattyn [Forum Guidelines] [My Articles]
The quality and detail of your question reflects on the effectiveness of the help you are likely to get.
Show formatted code inside PRE tags, and give clear symptoms when describing a problem.
|
|
|
|
|
thanks
but whats OTOH
TheMrProgrammer
|
|
|
|
|
Google for unknown acronyms.
OTOH means 'On The Other Hand'
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.”
|
|
|
|
|
hello every one
i m having '11' tabpages in tabcontrol now in each page there are 11 combobox
i named them starting from '0' like cmb0 which is in 1st tabpage,cmb1 which is in second tabpage and like wise...
now all 11 comboboxes have same items in it and i want to insert all of them using loop
for that i had code is like
dim i as integer
cmbstr as combobox
For i = 0 To 11
cmbstr = cmbstr & i
cmbstr.Items.add("a")
cmbstr.Items.add("b")
cmbstr.Items.add("c")
cmbstr.Items.add("d")
Next
i = i + 1
but this shows some error
please help..
please suggest if some another alternative is possible..
|
|
|
|
|
nazimghori wrote: but this shows some error
And that error would be ....... ??? Do you really think that there's only a single error possible when dealing with a combobox??
|
|
|
|
|
Let me do a mind meld with the computer (just seen the new Star Trek move) uhm, uhm, oh bugger that's the monitor you idiot now you've got indentations on the flat screen!
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
hi
error is like
operator '&' is not not defined for type 'system.windows.form.comboox' and integer
seems to be syntax error but please suggest how to solve it...
thank you in advance...
|
|
|
|
|
Of course not. You're trying to build the name of a ComboBox in a string and then treating that string as if it was the combobox. That's not going to work.
Luc has the best two solutions for you.
modified on Sunday, May 10, 2009 9:46 PM
|
|
|
|
|
There are several approaches possible:
1.
create a ComboBox array or collection (a generic list), copy a reference to each of the comboboxes in the list once (say in your form load handler), then do a foreach over that array every time you need to.
2.
assuming there is only the one combobox on every tab page, execute the following pseudocode:
foreach tabpage in tabcontrol
foreach control in tabpage
if control is combobox (skipping the other controls, e.g. buttons)
do what needs to be done
Luc Pattyn [Forum Guidelines] [My Articles]
The quality and detail of your question reflects on the effectiveness of the help you are likely to get.
Show formatted code inside PRE tags, and give clear symptoms when describing a problem.
modified on Sunday, May 10, 2009 8:03 AM
|
|
|
|
|
hello
i knew this approach but there are more than one combobox on each tabpage...
so please suggest some other approach...
|
|
|
|
|
I gave you two solutions, the first works no matter what.
the second can be modified to cope with multiple comboboxes per tabpage: give the ones you want a special characteristic (e.g. through their Name, their Location or their Tag) and test inside the "foreach control" loop.
Luc Pattyn [Forum Guidelines] [My Articles]
The quality and detail of your question reflects on the effectiveness of the help you are likely to get.
Show formatted code inside PRE tags, and give clear symptoms when describing a problem.
|
|
|
|
|
hello
i tried the second approach i gave the tag values of each combobox in tabpage to '0' at design time..
Sub fill(ByVal tbcon As TabControl)
Dim cnt As Control
For Each cnt In tbcon.Controls
If TypeOf cnt Is ComboBox Then
Select Case Tag
Case 0
cnt.Items.Add("NP")
cnt.Items.Add("ND")
cnt.Items.Add("FP")
cnt.Items.Add("FD")
End Select
End If
Next
End Sub
but this shows the syntax error like
'item is no the member of 'system.windows.forms.controls'
please help....
|
|
|
|
|
Of course your code does not compile: cnt is declared a Control, and Control does not have an Items property. You need to cast it to a ComboBox, something like Dim combo as ComboBox=DirectCast(cnt, ComboBox)
Luc Pattyn [Forum Guidelines] [My Articles]
The quality and detail of your question reflects on the effectiveness of the help you are likely to get.
Show formatted code inside PRE tags, and give clear symptoms when describing a problem.
|
|
|
|
|
..it should read somthiing like:
Sub fill(ByVal tbcon As TabControl)
Dim cnt As Control
For Each cnt In tbcon.Controls
If TypeOf cnt Is ComboBox Then
Select Case CType(cnt, ComboBox).Tag
Case 0
cnt.Items.Add("NP")
cnt.Items.Add("ND")
cnt.Items.Add("FP")
cnt.Items.Add("FD")
End Select
End If
Next
End Sub
Otherways the compiler doesn't know 'Tag'
Regards: Didi
|
|
|
|