|
Sorry but i don't understand the question. What do you require / mean?
Thanks
"If i was king cigarettes would be free."
|
|
|
|
|
When i bild my software how is best way to sell?
Anyway how to earnings some money with
knowledge Vb.net over internet...
|
|
|
|
|
|
Hi, can any one tell me any free tool to do a report in vb.net? I use the crystal report tool in vb.net and it require me to register on the web. Then I try SQL server 2000 reporting services, but it require sql server sp3a. I alread install sp3a but i don't know it still require it. So now I'm in the middle of the sea, i don't know where to go with the report. If any one know any free reporting tool for vb.net please let me know.
A thousand mile of journey, begin with the first step.
APO-CEDC
Save Children Norway-Cambodia Office
|
|
|
|
|
|
Hi, I made a custom datagrid with a special class that return a dataset.
to make it a short story i need to serialize a datatablestyle whos not marked as serializable. I dont really need the object it self i need the property of the datagridtablestyle and the property of every columnstyle (custom textbox column with events)
long story: my datagrid contain:
- a class that create a connection to DB and where I can pass a sql query that will return me a dataset
-i writte my sqlquery in a property of my customdatagrid and i send the dataset to the cumstomdatagrid.datasource. result = my datagrid is filled at design time from there i can edit the tablestyle.
-problem i find no way of "saving" this tablestyle when i run my programs
tryed to serialize it but datatablestyle aint serializable
HELP ME !
fred
|
|
|
|
|
Why not create a serializable structure that contans properties representing the properties of the object you want to serialize. You could then add a couple of methods to copy the properties to and from object instances.
There's an article here that does a similar thing with a TreeView that also cannot be serialized.
http://www.codeproject.com/vb/net/TreeViewDataAccess.asp[^]
Hope this helps
Tom
|
|
|
|
|
thanks Tom thats exactly what I was looking at. the only thing im wondering is if that is going to work at design time
fred
|
|
|
|
|
|
well thanks a lot atleast someone tryed to help me I think i figured out how to. Question on the side. Let's say i finally make it work would it be usefull to post it as an example?
|
|
|
|
|
Yes, if you find a solution to a problem you have posted you should always post it if no one else has. People ususally search the forums for a similar problem to their own before posting.
Cheers
Tom
|
|
|
|
|
thanks a lot john i finally manage to make it work and its real good looking but its a bit too "hardcore" to be posted i think heheh but may I ask why you used Structure in you exemple instead of a class? (struct = C
|
|
|
|
|
This is a code to calculate a class average. I am trying to modify the btnAverage_click event handler so that intGraderCounter is incremented until it is equal to the number of grades entered, and by using the 1stGrades.Items.Count to determine the number of items in the listbox. The number returned by the count property will be 0 if there are no grade entered. I need to use and if… then selection statement to avoid division by zero and to display a message dialog to the user if there are no grades entered when the user clicks the Average button. I also need help on modifying the code in the btnAverage_Click event handler so that the dblAverage is computed by using the intGraderCounter rather than the value 10. I tried all sorts of things that I could do but the program is still not running right. The code is below...
' handles Add Grade Button's Click event
Private Sub btnAdd_Click(ByVal sender As System.Object, _
ByVal e As System.EventArgs) Handles btnAdd.Click
' clear previous grades and calculation result
If lblOutput.Text <> "" Then
lblOutput.Text = ""
lstGrades.Items.Clear()
End If
' display grade in ListBox
lstGrades.Items.Add(Val(txtInput.Text))
txtInput.Clear() ' clear grade from TextBox
txtInput.Focus() ' transfer focus to TextBox
'' prohibit users from entering more than 10 grades
'If lstGrades.Items.Count >= 10 Then
' btnAdd.Enabled = False ' disable Add Grade Button
' btnAverage.Focus() ' transfer focus to Average Button
'End If
End Sub ' btnAdd_Click
' handles Average Button's Click event
Private Sub btnAverage_Click(ByVal sender As System.Object, _
ByVal e As System.EventArgs) Handles btnAverage.Click
' initialization phase
Dim intTotal As Integer = 0
Dim intGradeCounter As Integer = 0
Dim intGrade As Integer = 0
Dim dblAverage As Double = 0
' sum grades in ListBox
Do
' read grade from ListBox
intGrade = lstGrades.Items.Item(intGradeCounter)
intTotal += intGrade ' add grade to total
intGradeCounter += 1 ' increment counter
Loop Until intGradeCounter >= 10
dblAverage = intTotal / 10 ' calculate average
lblOutput.Text = String.Format("{0:F}", dblAverage)
btnAdd.Enabled = True ' enable Add Grade Button
txtInput.Focus() ' reset focus to Enter grade: TextBox
End Sub ' btnAverage_Click
Private Sub FrmClassAverage_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
End Sub
End Class ' FrmClassAverage
Need Help!!!!!!!
|
|
|
|
|
Another homework question.
I really must get a copy of your course textbook, but there wouldn't be much point as you've posted most of the test questions on this forum!
For example :
"I need to use an if… then selection statement to avoid division by zero "
easy solution to this. Go ahead and use one.
If you get stuck and post what you have tried rather than a copy of your set homework then we could help. Getting other people to do it for you won't help you to get a job coding, and if you are just learning for the sake of learning then you are really wasting everybody's time, including your own, by not putting a little effort into it.
If you have knowledge, let others light their candles at it.
Margaret Fuller (1810 - 1850)
|
|
|
|
|
Well, the number one cause of something like this is your not releasing resources, or .Dispose ing object, when you should be. Most of the .NET BCL wraps Win32 API's and objects. When you instantiate, say a Form, your actually allocating resources not managed by the CLR. If you don't Dispose of your objects properly when your done with them, you'll actually orphan these resources and eventually run the system out of things like Handles and Memory. When a resource pool get low, there is no telling what effect it's going to have on the rest of the system, and other applications and services.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Hi Dave,
thanks for your reply.
but i'm sure all the object references are disposed and i also add in GC collector explicitly.
actually the 1st windows service that i mentioned previously have been deployed to LIVE application server already.
The 2nd windows service was created to simulate those other windows services reside on the same computer that potentially consume high CPU usage.
in my old/1st windows services that running since 2 weeks ago, it works normal/reasonable Until any other windows services in same computer gone mad, let's say my 2nd windows services CPU usage 90%++
i've tried my best, but still can't solve the problem..
any idea/solution?
thanks..
Sayhigh Soon
|
|
|
|
|
sayhigh wrote:
but i'm sure all the object references are disposed
When anyone says this without a thorough code review, I seriously doubt it. I never say this myself even if I have done a code review. There's always something you miss.
sayhigh wrote:
and i also add in GC collector explicitly
Bad idea. Never, EVER, do this. Unless you know EXACTLY why your doing it. Putting in Collect Statement here and there in no way guarantees underlying reasource are getting freed.
If you have a resource problem in one application, there is no telling what that situation will do to another application. This is why you must do stress testing on your service BEFORE it gets deployed in production. If your 1st service only hangs up when there is a stress condition, you have a problem in your service. I would suggest instrumenting your 1st service so you can do some analysis.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Can we open new forms through or pass form compontes to dll( I have made the dll, not ant windows api). I need to pass some message to listbox handler. It is not accepting it.
Thanks for reading this. Please help me.
|
|
|
|
|
Once again, you haven't supplied nearly enough information to be able to help you.
geekru2 wrote:
Can we open new forms through or pass form compontes to dll
Yes. So long as your .DLL handles the Form properly and Disposes of it when it's done. But, since we know nothing about your .DLL's code or any problems your having with it, it's impossible to tell you anything useful.
geekru2 wrote:
I need to pass some message to listbox handler. It is not accepting it.
Since we don't know anything about this "handler", like what language it was written in, the parameters it takes and how they're supposed to be passed, the code inside this handler, what your actually passing to it, ... It's impossible to tell you what your doing wrong.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Seniors,
Please guide me about this problem..
my situation is like this:
At first, I have 1 windows service running(started 2 weeks ago) on my computer. It is running smooth as what i expected & the figure of CPU usage, memory usage, VM size and handles in Task Manager was normal/reasonable.
Now i have another new windows service installed in my computer.
The new windows service caused the CPU usage reached 90%++ and then i closed the new windows service immediately after i noticed it.
Unfortunately, the 1st/old windows service have been affected.
The old windows service CPU usage, memory usage, VM size and handles figure gone mad..
The figure is increasing steadily.
Statistic now: CPU usage more than 40%++, memory usage 50MB++, VM size 120MB++, handles 150,000
The uncertainty is very high!
I'm really out of idea, when & how the cpu usage and memory usage will go wild?
Any idea how would it be?
thanks for your valuable reply
Sayhigh Soon
|
|
|
|
|
I amade an application that uses shell command to run SQL Loader. I want the sql shell to return if the sql loader command executed successfully. If not, i want it to return the text that was at the console when the program terminated.
KnowME
|
|
|
|
|
I think the suitable solution might be came from using batch file with script file. You can write script file to perform the action what you do, it is not reach any action then post the scrite file to inform the user that it is not working and vice versa. I'm rarely to use this kind of action too but try to check the script at Microsoft Scripting Center.[^]
A thousand mile of journey, begin with the first step.
APO-CEDC
Save Children Norway-Cambodia Office
|
|
|
|
|
Hello,
I've been trying to move items up and down in a DataGrid in the .Net Compact Framework, using Visual Basic .Net 2003. I have tried using the InsertAt command, but I have not been able to get it to work.
Here is my current code to move an item up:
Dim currentpos As Integer
currentpos = DataGrid1.CurrentRowIndex
If currentpos >= 0 Then
Dim row As DataRow
row = DataTable.Rows(DataGrid1.CurrentRowIndex)
Dim NewRow As DataRow
NewRow = DataTable.NewRow
NewRow(0) = row.ItemArray.GetValue(0)
DataTable.Rows.RemoveAt(DataGrid1.CurrentRowIndex)
DataTable.Rows.InsertAt(NewRow, currentpos - 1)
End If
My code seems to sometimes work, other times it moves two items up, and sometimes it moves items around randomly.
Could anyone please help?
Thanks
|
|
|
|
|
What is your DataGrid bound to? Move the data around in the datasource, not the grid itself.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Hello,
My DataGrid is bound to a DataTable.
In my form's declorations, I have:
Dim DataTable As DataTable
Dim MyDataSet As New DataSet In the custom function that sets the DataSource (without the extra code that loads in the XML data into the MyDataSet's DataTable, DT1):
DataTable = MyDataSet.Tables("DT1")
DataGrid1.DataSource = DataTable Thanks
|
|
|
|