|
Hey all,
I am trying to get Julijan's 3D Pie chart working with values read from a database in VB.NET. This is a sample of the information needed to build the chart:
PieChartControl1.Values = New Decimal() {25, 15, 5, 135}
PieChartControl1.SliceRelativeDisplacements = New Single() {0.1F, 0.2F, 0.2F, 0.2F}
PieChartControl1.Texts = New String() {"red", "green", "yellow", "blue"}
PieChartControl1.ToolTips = New String() {"Peter", "Paul", "Mary", "Brian"}
what I need to do is something like this:
PieChartControl1.Values = New Decimal() {arrValues}
PieChartControl1.SliceRelativeDisplacements = New Single() {arrSlice}
PieChartControl1.Texts = New String() {arrTexts}
PieChartControl1.ToolTips = New String() {arrTooltips}
However, the arraylists cannot be converted to the respective required types (decimal, single, and strings). I dont get how to append the arraylists to the PieChartControl. Help!
|
|
|
|
|
If possible you should not use ArrayLists at all. If you use framework 2 or later, use List<decimal>, List<single> and List<string>, then you can simply feed them to the constructors:
PieChartControl1.Values = New Decimal(values)
PieChartControl1.SliceRelativeDisplacements = New Single(slices)
PieChartControl1.Texts = New String(texts)
PieChartControl1.ToolTips = New String(tooltips)
(Note: VB.NET is a strongly typed language. There isn't really any reason to use hungarian notation to keep track of the data types of variables...)
Despite everything, the person most likely to be fooling you next is yourself.
|
|
|
|
|
thank you very must for posting. Very sorry, but I don't quite understand how I would do that. I am using some looping statements to create the array lists. I have never worked with LIST before.
How do I declare it? can I just ListName.Add?
If I do the following, I get an error:
Dim ListValues As New List(Of Decimal)
...
code blocks
...
ListValues.Add(decValue)
PieChartControl1.Values = New Decimal() {ListValues}
"Value of type 'System.Collections.Generic.List(Of Decimal)' cannot be converted to 'Decimal'."
|
|
|
|
|
Tom Henkel wrote: PieChartControl1.Values = New Decimal() {ListValues}
Do as I showed you:
PieChartControl1.Values = New Decimal(ListValues)
Despite everything, the person most likely to be fooling you next is yourself.
|
|
|
|
|
hi i'm using vb.net 2003 version.I have added 4 items to the list using collection property.On some condition i need to disable a particular item (say for ex. item no 2) in the combo box list items so that user can't able to select this item.
pls suggest me the solution.
|
|
|
|
|
I am not aware of any way to disable an item other than removing it form the list completely.
|
|
|
|
|
Off of the top of my head I can think of two ways you can do this. These aren't are the most efficient and exactly how your program works will determine if either is good for you:
1) If the item can't be selected temporarily remove it form the list box. When certain conditions are met, re-add it.
2) When the user selects an item, check if the index of the selected items is one of the ones that can't be selected. If so, change the selected index to the next selectable one.
Hope this help or at least points you in the right direction.
|
|
|
|
|
Thanks For ur suggestion.
I can do removing items from list...but
for some particular condition if i remove the items, combo box wil
be left with one single item...i thought it doesn't look good...
so thought of disabling items instead of removing...
|
|
|
|
|
Just remove the item from the combobox. There isn't any real way to just diaable it.
"The clue train passed his station without stopping." - John Simmons / outlaw programmer
"Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon
"Not only do you continue to babble nonsense, you can't even correctly remember the nonsense you babbled just minutes ago." - Rob Graham
|
|
|
|
|
I have a program that produces data reports in excel format. I found a library that let's me produce the excel files without using the Excel object which has greatly sped up the performance of the program. However, I have a need to sometimes print the reports also. I was wondering if anyone knew of any other libraries that would allow me to print the excel files without using Excel. If not does any one know where I can begin researching how to write such a library. I understand the basics of printing but what I'm not familiar with is how to translate an Excel file to a print document (ie: How to figure out how many cells per page, spacing cell accordingly, etc.) Thanks in advance for any help.
|
|
|
|
|
|
I am looking for both a good charting component and good flow charting component for my VB project. I have come across the following:
www.mindfusion.org
However I am also come across what looks like very slick charting components from other vendours. However none of these other vendours seem to have a flow charting component:
www.dotnetcharting.com
www.dundas.com
Can anyone comments on the mindfusion components? Any other recommendations for Flow Charts?
Thanks
EM
|
|
|
|
|
I want to add something to my app to do certain work every hour (system time).
E.g. 13:00, 14:00, 15:00 etc...
How do I do this without polling the system time every second?
Cheers!
|
|
|
|
|
Poll the system time every minute instead.
|
|
|
|
|
Thanks Dave, I was hoping there was some kind of System Event that I could catch.
So to get an accurate on-the-hour event I'll do the following:
When the app starts, poll every second until (now.second MOD 10) = 0;
Then poll the system time every 10 seconds until now.second = 0; (on the minute)
Then poll the system time every 60 seconds until now.minute = 0; (on the hour)
Don't know if it's justified but I'm always worried that timers with short intervals use excessive CPU, even when they have little or no code to execute....
Cheers
|
|
|
|
|
evilnoodle wrote: I was hoping there was some kind of System Event that I could catch.
Nope.
evilnoodle wrote: So to get an accurate on-the-hour event
evilnoodle wrote: When the app starts, poll every second until (now.second MOD 10) = 0;
Then poll the system time every 10 seconds until now.second = 0; (on the minute)
Then poll the system time every 60 seconds until now.minute = 0; (on the hour)
A convoluted solution at best. Why do you have to be down to the second to execute a process once an hour?
evilnoodle wrote: on't know if it's justified but I'm always worried that timers with short intervals use excessive CPU, even when they have little or no code to execute....
No, they don't take a lot of CPU time. It's the code you supply that takes all the time. The more efficient the code is written, the better the performance.
|
|
|
|
|
How can i resize and move a label at runtime like in design time and also want to make it a control.
WITH REGARDS
KOUSHIK SAHA
|
|
|
|
|
|
Haha, talk about being at the right place at the right time!
|
|
|
|
|
Hi,
i am a a beginner at this....
my question is that ...From the client pc , how do i call or reference a .dll that sits on the server and get it to execute commands on the server.
sort of like it would do on the client pc.?
i am using vs2005, developing in vb.net
thanks in advance
Anoop
|
|
|
|
|
Hi
How can I send multiple messages using "GsmCommunication.dll" And how to use "retry delay" and "max attempts" parameters?
When I do like sending one message this error occures:
"No data received from phone after 4500 ms"
thanks
|
|
|
|
|
vahidkiani wrote: How can I send multiple messages using "GsmCommunication.dll"
Please remember to rate helpful or unhelpful answers, it lets us and people reading the forums know if our answers are any good.
|
|
|
|
|
You should probably direct your question to the maker of that dll.
|
|
|
|
|
I’m developing an windows application using vb.net 2003 as front end& ms access 2003 as backend.
I have a column to store date(today’s date).datatype I’m using is text.i.e. using front end I wil add some new records to database,
At that moment “today’s” date wil be stored in the corresponding column as text datatype.
Then in frontend I need to search the database for records between 2 date ranges and display in a datagrid.
To select date ranges I’m using 2 date time picker controls with short date format.
The Resultant recors will not be 100% accurate if I select date as single digit date(i.e. below 9 to 1).
If I select dates 10 & above 10 (2 digit date) , the resultant records wil be accurate.
Pleass suggest me the solution.Thanks in advance.
|
|
|
|
|
I am not sure, whether I got that right, but you are saving the date in text-format? Why? Use datetime-format. Then there will be no problems when searching your database's entries by date.
"I love deadlines. I like the whooshing sound they make as they fly by." (DNA)
|
|
|
|