|
Hi. here is my prob.
I have this treeview under Vb Net that is filling itself at each start fron my database(access) i can add nodes, delete, save, rename, reload, Expand, collaspe up to here it's ok, the problem start here from the same database which has also a table name Products consisting of 7 fields, i whould like when i click on any treenode to be able to fill the listview. I been searching and reading a lot but i am still going nowhere, if someone whould be kind enough to show me or direct me towards a web site or whould have an example that he could share i be most appreciative, in mean time thank you for reading me. Andy38
|
|
|
|
|
Andy,
I think what you need to do is to trap the TreeView's ItemSelectChange event and populate the listview within it.
A sample of code from an old VB 6.0 program shows the method, but you'll need to find the exact name of the event to trap in VB.NET (look at the help for the TreeView class). Note that this example uses slightly different classes but the method is the same.
Hope this helps.
Private Sub tvIDMTreeView_ItemSelectChange(ByVal Item As Object, ByVal ObjType As IDMTreeView.idmObjectType)
'
' Populate the ListView with the database query.
' I did this in a separate Sub but you could place your
' code in here.
'
Call PopulateListView(Item)
End Sub
Private Sub PopulateListView(ByRef oItem As Variant)
lstIDMListView.ClearItems
If Not oItem Is Nothing Then
If TypeOf oItem Is idmobjects.Folder Then
lstIDMListView.AddItems oItem.SubFolders, -1
lstIDMListView.AddItems oItem.GetContents(idmFolderContentDocument), -1
End If
End If
End Sub
...Steve
|
|
|
|
|
I have an application that contains a form with several controls. When I change the display settings from 32-bit color to 256 colors the controls turn to a different color that does not match the form. If I change the windows theme to standard everything looks ok. Also anything that has a gradient fill is also pixelated. Are there any tricks or techniques to dealing with these issues. We proofing our product in terminal server (256 color mode) right now and it looks like crap.
Thanks,
Glenn
|
|
|
|
|
That's a common problem when dealing with antiques like 256 color terminal servers. The easiest solution is to do all your graphics/objects in 256 colors to start with. Gradients are definitely a no-no.
If that's a problem, you may need to come up with 2 complete sets of controls, 256 color and 32 bit, and allow your application to switch between them depending on where it is running.
|
|
|
|
|
Hello all,
I am a beginner to programming and VB.NET. I am designing a basic desktop application to do an activity calculation (radiochemistry). I am using comboboxes to store single lists of numbers that can be used in the calculation.
The problem I'm having is that I need to put in more data that has multiple attributes and I don't see any comboboxes
that allow me to do this. For instance;
This is the calculation I'm doing:
----------------------------------
Private Sub btnActivity_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnActivity.Click
'function for Thyroid activity calculation
'Z = a + be(cY) + d / y2
'A = G/Z
'A= # cts/(efficiency * Branching ratio * count time * energy)
'A = activity of thyroid in Bequerels, Bq
'G = gross counts in counts per second (cps)
'E = efficiency in units of counts per second per Bq (cps/Bq)
'Initial Activity / Final Activity = e - ln2 * t / t1/2
Dim a As Single
a = -0.45573288
Dim b As Single
b = 0.45656697
Dim c As Single
c = -0.00083964
Dim d As Single
d = -0.0002884
' ----------- thyroid efficiency calculation ------------------
Dim Efficiency As Double
Efficiency = a + (b * Exp(c * CDbl(txtHeight.Text))) _
+ d / (CDbl(txtHeight.Text) * CDbl(txtHeight.Text))
txtEfficiency.Text = Efficiency.ToString("0.000...E+00")
' -----------------------------------------------------
' ----------- thyroid activity calculation --------------------
Dim Activity As Single
Activity = (CDbl(txtCounts.Text) / (a + b * Exp(c * CDbl(txtHeight.Text)) _
+ d / (CDbl(txtHeight.Text) * CDbl(txtHeight.Text))) * CDbl(txtRatio.Text) * CDbl(txtCtime.Text) _
* CDbl(txtIsoenergy.text))
txtActivity.Text = Activity.ToString("0.000...E+00")
' -------------------------------------------------------------
I need a combobox that can list for me ... first an isotope of choice from others ie: I-131 (text value) then a corresponding energy 0.996 keV (a numeric value to be used in the calculation) and another number that corresponds to that energy, a branching ratio ... say 0.564, to also be used in the calculation. The other values come from text boxes that the user can input ie: person's height, weight, count time, counts etc. I would like the isotope information to come from one combobox (if possible??). There would be mulitple choices of isotopes to choose from with all there corresponding energies and branching ratios.
Is this possible to do this, is this the proper way to do this, or am I completely off base.
Any help would be greatly appreciated
Thanks
|
|
|
|
|
do u mean an combobox item which has multiple values?
if so,
Create a struct or class
then Set Combo's DisplayMember property
|
|
|
|
|
hi there,
does anybody know how the .mps files, used to store maps in pocketPC, are formatted?
thanks in advance,
F2R
|
|
|
|
|
Hey all,
I am looking for a managed .NET MODBUS component. Anyone know of one. Everything I have found is ActiveX or C++ dlls. I can go with one of these, but would like to avoid it if possible.
Thanks in advance.
*****************
"We need to apply 21st-century information technology to the health care field. We need to have our medical records put on the I.T." —GW
|
|
|
|
|
Hi Dwayner79,
I work with modbus quite a bit myself. Unfortunately, I've yet to find a good .NET modbus control/library. Most of them are just wrappers around ActiveX controls.
If you don't mind using an ActiveX then I highly recommend the one in the below link. It's fast. It's relatively cheap. It supports modbus ASCII, RTU, and TCPIP. The biggest plus is that it communicates on its own thread so that it won't hang up your app.
http://www.modbustools.com/modbus_activex.asp[^]
I've also tried WinTech's modbus ActiveX. I'd say stay away from this one. It's slow and it seems to be unstable on XP systems.
I hope this helps.
|
|
|
|
|
Awesome. I hate going to ActiveX, but looks like I will have to. Thanks fo rthe recommendation.
-Cheers
*****************
"We need to apply 21st-century information technology to the health care field. We need to have our medical records put on the I.T." —GW
|
|
|
|
|
Hello,
I developed a middle layer DLL file - mainly used to declare the database connectivity and some database dependent functions. If i register this DLL file in a remote pc(or in other words, register in a remote assembly) where database is stored, how can i refer this assembly from a VB project? Also how to keep the consistency in the path refered when a custom deployment is done.
Thanks in advance.
Regards
Nito Jose
|
|
|
|
|
I have a lot of connections made in Visual Studio, and I want to get rid of some of them. Any way to just erase them so when I make a new connection, there aren't as many to choose from?
|
|
|
|
|
|
Hi, have a problem.
I'm filling a dataset from db and a datagrid from the dataset in my application. The problem is that it sometimes takes some time and i want to make it possible for my users to abort the process. Have tried with delegates and threads and i don't seem to make it work. (The idea is to flash a form to the user with an abort button) This abort button will prefferably exit the db request.
Ideas anyone....
|
|
|
|
|
evertbylt wrote: I'm filling a dataset from db and a datagrid from the dataset in my application
Where is the bottle neck at? Is it pulling the data from the db or adding that information to the data grid?
If the bottle neck happens while pulling data from the database, step through your code. There is a problem with the query / stored procedure.
More than likely the problem is with adding the data to the grid, again start debugging why is it taking so long? What are you doing with that’s overly complicating the process?
evertbylt wrote: Have tried with delegates and threads and i don't seem to make it work. (The idea is to flash a form to the user with an abort button) This abort button will prefferably exit the db request.
You could always (this is VB.NET right) start a thread have it pull the data and post messages to the grid adding the text that way. In your little cancel dialog send the worker thread a message to stop sending data out and clean up after it self.
Hope that helps…
DEBUGGING : Removing the needles from the haystack.
|
|
|
|
|
....was a little fuzzy, sorry about that...and thanks for responding.
The bottleneck is absolutely (timed it!) the database binding (behind the .NET curtains)
myCommand.CommandText = sqlQuery
myCommand.Connection = myConn
myFancyDataAdapt.SelectCommand = myCommand
myFancyDataAdapt.Fill(myDS, "myDataBaseView")
Normally, no problem at all. If no of records > 100000 the time for filling my dataset is
acceptable. However when the number of recs from db exceeds 1-2 million the time for
making the ds > 30 secs, which can be ok, but my ambition is to make it cancellable...
Have dived into the "new" Background Worker for VS 2005, but all the examples i have found
concerns recursive functions such as fibunachi calculations an so forth...
This is ONE long mother of an operation and no feedback as the sub progresses...
Also tried with "normal" threads and set them to background, but i don't seem to be able to abort them
*grmpf*. Must be thick in the head..
You say "stop sending data" and "clean up after it self"...sounds nice...could i be bould and ask you to be more specific.
|
|
|
|
|
evertbylt wrote: However when the number of recs from db exceeds 1-2 million the time for
making the ds > 30 secs
Found the problem its a design flaw, do your users really need to look at > 1 million records? Will they be able to gleam more information from 1 million-verse 1000 property (filtered for info they want / need to see) selected rows?
Here is a way to handle this, do this in transactions, fetch 1000 or so at a time, display that to the user, if they want more fetch more and remove the previous 1000. If they scroll backwards then fetch the previous 1000.
evertbylt wrote: but my ambition is to make it cancellable...
Doubt that will ever work, binding a data grid to data doenst return until its complete. Your app can not process any messages until that function has returned. It can’t be canceled, unless there is an error binding it.
evertbylt wrote: *grmpf*. Must be thick in the head..
You say "stop sending data" and "clean up after it self"...sounds nice...could i be bould and ask you to be more specific
Don’t worry about it I thought you where doing something else completely. This is one case where threads won’t help.
DEBUGGING : Removing the needles from the haystack.
|
|
|
|
|
OK, thanks for helping. At least one learns a little something when facing problems like this
|
|
|
|
|
evertbylt wrote: OK, thanks for helping
No Problem...
DEBUGGING : Removing the needles from the haystack.
|
|
|
|
|
Hi,
I am developing some software for US client. Recently my client wants to develop somethin Tiny OS, with RFID and Network OS. But I am not experienced with these technologies, I have VS 2003/2005(Beta-Evaluation) and SQL Server 2003/2005(Beta). I dont know what is the hardware and software requirement for doing this project.
Please can anyone assist me, what are the H/W as well as S/W requirement and am I able to do these with my existing softwares(Visual studio, Do i need to purchase any Softwares, can I get it as an evaluation version from anywhere...
Please help me at the earliest
|
|
|
|
|
how to use fax component in vb.net to make aplication fax???
|
|
|
|
|
I wanted to ask if i can do an interface in excel where i can enter a value from the table and return another value that coresponds! Is it possible?
Help!
|
|
|
|
|
You can! Did you want to get a value from your worksheet and perform a calculation on it? Or is this a value from and external table? Please give more details.
Ken
|
|
|
|
|
to convert I build shamsi.OCX
connect me to send;)
|
|
|
|
|
Dude - none of this makes any sense. Please try to explain what you want, because no-one is going to know how to answer this.
Christian Graus - Microsoft MVP - C++
|
|
|
|