|
Basically : How to program controls on a form so that if they are synchronised with each other the updating of one control does not create a domnio effect of updates between the two or more controls.
Eg: Listbox and Spinbutton synchronised through a public variable.
The onchange event with a click on the listbox should update the spinbutton value without this conseguent change in the spinbutton returning an update to the listbox. (and viceversa)
ie. Switch off the controls events for a moment.
I am stuck with finding an elegant solution. I managed to get through in part using boolean flags but I realise this is not the way.
I believed that this could be done without classing the controls however options like Application.EnableEvents=False does not work.
[This is an MsOffice App mainly through VBA forms.]
Any help/examples would be most appreciated
Thanks
|
|
|
|
|
How to Send the Sms From vb.net program
please send to me source code to send sms
Ahmed
|
|
|
|
|
check this
_____________________
Proud to be Albanian
_____________________
|
|
|
|
|
hello
again i would like to ask you guys about this problem in datereader that i incounter during play---is says:" There is already an open DataReader associated with this Command which must be closed first."
heres my code:
Dim myconnection As New SqlConnection(My.Settings.sampleConnectionString)
Dim cmdjol As String = "select * from dbo.employee_divisions"
Dim cmd As New SqlCommand(cmdjol, myconnection)
'Parentnode'
Dim mydatareader As SqlDataReader
cmd.Parameters.Add("@description", SqlDbType.VarChar, 50, ParameterDirection.Input).Value = Divisions.divname.Text
myconnection.Open()
mydatareader = cmd.ExecuteReader()
While mydatareader.Read()
'If mydatareader.Item(0) = " " Then
TreeView1.Tag = mydatareader.Item(0).ToString
TreeView1.Nodes.Add(mydatareader.GetString(1).ToString)
TreeView1.ShowPlusMinus = True
TreeView1.ShowRootLines = True
Dim cmdj As String = "select description from dbo.employee_departments"
Dim cmds As New SqlCommand(cmdj, myconnection)
Dim xreader As SqlDataReader
cmd.Parameters.Add("@description", SqlDbType.VarChar, 50, ParameterDirection.Input).Value = Departments.depname.Text
xreader = cmds.ExecuteReader
While xreader.Read
TreeView1.Tag = mydatareader.Item(0).ToString
TreeView1.Nodes.Add(xreader.GetString(1).ToString)
End While
xreader.Close()
End While
mydatareader.Close()
myconnection.Close()
can you fix please coz that's for treeview unbound
thnaks in advance....
|
|
|
|
|
i am doing my project using visual studio 2005. i facing the problem the the analsing process cant be stop
and this is the coding i have
'This procedure stops waveIn...
Private Sub stopWaveIn()
Dim result As Integer
'Reset...
result = waveInReset(waveInHandle)
handlePotentialError(result)
'Stop...
result = waveInStop(waveInHandle)
handlePotentialError(result)
Dim i As Integer
For i = 0 To NUMBER_OF_BUFFERS - 1
'Unprepare each buffer...
result = waveInUnprepareHeader(waveInHandle, waveHeader(i), Len(waveHeader(i)))
handlePotentialError(result)
'Free the memory associated with each buffer...
GlobalFree(bufferAddress(i))
Next
End Sub
thanks
|
|
|
|
|
hi,
i am looking for code which activates or initiates scanner on my system or from network using vb.net
please help me out
regards Anas
|
|
|
|
|
hey guys can you help me on how to retrieve value(string/integer) from listview.subitem......im going to put it on Richtextbox.....
thanks for all your support
|
|
|
|
|
Richtextbox.Text&=listview.item(itemIndex).subitem(columnIndex).Text
!alien!
|
|
|
|
|
VB.NET/MS ACCESS/SQL
Consider the following data:
No Name Salary
1 Shawn DSouza I 4000
2 sHAWN D'Souza I 3000
3 Shaw-n DSouza I 2000
The above data is almost similar other that the cases or typing errors or maybe different ways of writing similar things. The data I have contain several such records. What I need to do is group such records together and filter out one record with the highest salary.
It seems like we need to apply some intelligent search ! Can someone help me with this.
With Best Regards,
Mayur
|
|
|
|
|
If I understand your question correctly you want to group the same name records together even if the spelling of the name is different and then find the highest salary record from that group.
First convert the name field to lower case. Then you will have to define a set of characters the can be savely removed from the name field. In that set you could include dash (-), quote ('), and space ( ). For each name remove those characters. This will attempt to convert similiar names to the same name. The way to find the highest salary kind of depends on how the data is stored. If it is in a datatable you can query records returning the highest value in the salary field. Or sort the records by salary in desc order putting the highest value in row 0. Or you can process the records one by one in a for next loop to find the highest salary.
I hope this helps!
|
|
|
|
|
Hi,
I am working on Unicode support for a project built in VB and VC++. We have filenames and filpaths to be Unicode supported.I have taken the hexadecimal values from the Unicode 1.1.5 and created word document files programmatically by taking 5 characrers for each filename in Windows XP.Some files are not created and some files are created with square boxes in the filenames.I am not able to open almost all files by double clicking on them. Doesn't filename support Unicode? I have to know the extra characters (belonging to the basic version of Unicode)to be supported by Unicode supported application. Can Someone help me.
Regards
Ranjan
|
|
|
|
|
guys could you please help me on how to put a string() Array in Richtextbox in run time...
its been my first time in CodeProject and i find it so resourceful spcially for those beginners in VB.Net.....like me
|
|
|
|
|
You need to iterate through each string element in your string array and append them to the RichTextBox.Text property. You can do this via array indexing or ForEach.
Based on your previous post, I'm guessing that you also want to append a newline to each string in your array. You can do this via Environment.NewLine .
Dim myStrings() As String = {"Hello", "World"}
Dim nextString As String
For Each nextString In myStrings
myRichTextBox.Text &= nextString & Environment.NewLine
Next
|
|
|
|
|
Create a project to keep track of concert ticket sales by your club. Ticket prices are based on the seating location. Your program should calculate the price of each sale, accumulate the total number of tickets sold in each section, display the ticket price schedule, and print a summary of all sales.
The form should contain a list box of the sections for seating.
Do not allow the user to receive an exception for subscript out-of-range.
Section Price
Orchestra 40.00
Mezzanine 27.50
General 15.00
Balcony 10.00
|
|
|
|
|
What are you having a problem with ?
Chatura Dilan
|
|
|
|
|
What part of this homework assignment are you having problems with??
If you want it written for you, don't waste your time here. Get out your credit card and go to RentACoder.com. By the way, you'll be paying someone else to help you fail the class. If you don't write the code yourself, you won't learn anything about it...
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
hello guys im new in vb.net anyone could help me on how to add new line in Richtextbox during run time! .......i appreciate any help
god bless us all!
|
|
|
|
|
Try this :
Me.RichTextBox1.Text = "First Line" & vbCrLf & "Second Line"
Hope this help!
|
|
|
|
|
thanks merlynml for your codes.....
|
|
|
|
|
Hi,
Good day.
Why is it HashTable in VB .Net is very poor in performance esp. in searching the objects in the collection?
Is there any way to boost it? Please help!!
j.j.
|
|
|
|
|
What are you doing exactly ?
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
Hi,
Actually, I created a user controls in my VB .Net project. And later, I want them to instantiate in my main form module at once without reinstantiating them. So, I decided to use HashTable class to store these objects. But, I found out, when im accessing one of the objects in the HashTable, it is really very slow. It takes a about 5 to 10 seconds before it loads. So, this is really a problem of using HashTable class?
Thanks.
j.j.
|
|
|
|
|
A key search in a HashTable is very fast. It's O(1) to be exact. However, an iterative search via ForEach would not be as fast as an Array or an ArrayList. If your HashTable has a lot of elements in it and you need to iterate through, then you should consider using a different data structure.
Also, if I were you, I'd double check to see if any exceptions are being thrown and caught in your code. A single exception can cause a 5-10 second hang when in a Try/Catch block. It's happened to me before.
|
|
|
|
|
how i can create xml file and write or read from\to it
vb.net 2003
123
|
|
|
|
|
The XMLDocument class is a DOM implimentation. There's also an XMLWriter ( from memory ), a stream that allows you to specify the nodes to create, and it makes sure the XML is valid.
Christian Graus - Microsoft MVP - C++
|
|
|
|