|
it seems that btnEvalGuide and btnIntVuDmExp both are buttons .u can can use
call btnEvalGuide_Click(sender,e)
that's all.
good luck
|
|
|
|
|
Thank you very much for your comment. I will try to do that, but if it is not working I will do it in a separate procedure then make a call to that procedure instead.
A thousand mile of journey, begin with the first step.
APO-CEDC
Save Children Norway-Cambodia Office
|
|
|
|
|
First of all, your btn name and the Handles control name really should reference the same button in the second click handler you have shown above.
Second, if you need to run a common set of code from two or more control event handlers, you should move the code out of the control event handler and into a separate procedure. In the long run this will make your code much clearer and more maintainable. Calling control events from other control events is not a particularly good practice in terms of design.
I would rewrite the above code as:
----------------------------------------------------------------------------------------------
Private Sub btnEvalGuide_Click(ByVal sender As System.Object, _
ByVal e As System.EventArgs) Handles btnEvalGuide.Click
' the code work here.
' ...
'Call common procedure here
DoMyCommonProc()
End Sub
Private Sub btnIntVuDmExp_Click(ByVal sender As System.Object, _
ByVal e As System.EventArgs) Handles btnIntVuDmExp.Click
' the code work here.
' ...
'Call common procedure here
DoMyCommonProc()
End Sub
Private Sub DoMyCommonProc()
'Put common code in this procedure and call from both click events
End Sub
----------------------------------------------------------------------------------------------
Robert
|
|
|
|
|
Thank you very much for your comment. I will consider this opinion if there is no more choice.
A thousand mile of journey, begin with the first step.
APO-CEDC
Save Children Norway-Cambodia Office
|
|
|
|
|
i m trying to make a vcd cutter like software in vb.net. i m using a binery reader to split the files.if i split the file from begnige it's playes fine but if i try to split it from sommeware middle the the clip is not working.can any one help me in this
|
|
|
|
|
The clip is not working because the beginning of the file has information about Audio and Video codecs, compression ratios, bit rates, etc.
If the player cannot find this information at the beginning of the file, it won't be able to play it.
You'll need to research the format specifications for whatever format(s) you want to support so that you can properly format your output, or find a third-party library to handle this part of the proccess.
|
|
|
|
|
i know that much but can u tell me how i can format the output of me file or any persone who can help me on this
|
|
|
|
|
Hi,
I'm trying to do something very simple, however I seem to going rouund in circles!
1. I have an Array which is loaded from a file, I then load it into a DataTable, at the same time adding Column names.
2. I create a DataView from the Datatable.
3. I asign the DataView to a Datagrid using Datagrid.DataSource = DataView
4. Run, everything works fine.
The issue...
I want to change the size of the columns and hide some occasionally. I tried using DatagridTableStyles are per several submissions on the web, but it won't work.
Any ideas?
Is there a simple way of doing this?
|
|
|
|
|
Using DataGridTableStyles IS the simple way of doing it, and as it happens, the only way.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Ok, thanks for that at least I'm in the right place.
In that case then please can you help me to understand when the following code doesn't work, it's probably something simple...
I'd really appreciate some assistance...thanks
What Happens > All the data loads fine, the Datagrid1 formating works ok, but the columns are not adopting the table styles I created!
coding...
-->Step 1 load up 'Product' Array with Data
-->Step 2 load up Column collection...
Private Sub LoadColumnCollection()
productColumnCollection.Add("Level3")
productColumnCollection.Add("Level4")
productColumnCollection.Add("Rep_ITEM")
productColumnCollection.Add("Description")
productColumnCollection.Add("Ext_Description")
productColumnCollection.Add("End_Date")
productColumnCollection.Add("Price_From")
productColumnCollection.Add("Price_To")
productColumnCollection.Add("Price_Comments")
productColumnCollection.Add("RRP")
productColumnCollection.Add("Min_ISP")
productColumnCollection.Add("Max_ISP")
productColumnCollection.Add("ISP%SIP")
productColumnCollection.Add("%Margin")
productColumnCollection.Add("Units")
productColumnCollection.Add("SIP")
productColumnCollection.Add("Pack_Priority")
productColumnCollection.Add("Exculsive")
productColumnCollection.Add("Despatch_Date")
productColumnCollection.Add("ITEM_Code")
productColumnCollection.Add("Lenght_Av.")
productColumnCollection.Add("Unit_EAN")
productColumnCollection.Add("Case_EAN")
productColumnCollection.Add("Outer_EAN")
productColumnCollection.Add("Length")
productColumnCollection.Add("Width")
productColumnCollection.Add("Height")
productColumnCollection.Add("Case_Length")
productColumnCollection.Add("Case_Width")
productColumnCollection.Add("Case_Height")
productColumnCollection.Add("Gross_Weight")
productColumnCollection.Add("H")
productColumnCollection.Add("Pallet_Weight")
productColumnCollection.Add("Cases_Per_Layer")
productColumnCollection.Add("Layers_Per_Pallet")
productColumnCollection.Add("Reason_For_Change")
End Sub
Private Sub LoadColumnNames()
Dim row As Integer
Dim dC As DataColumn
' set product table up...
productTable = New DataTable("Product Table")
' construct table columns and names...
Try
For Each Nm As String In productColumnCollection
dC = New DataColumn(Nm)
dC.DataType = System.Type.GetType("System.String")
productTable.Columns.Add(dC)
Next
Catch
End Try
End Sub
-->Step 3 load up Column names into table...
Private Sub LoadColumnNames()
Dim row As Integer
Dim dC As DataColumn
' set product table up...
productTable = New DataTable("Product Table")
' construct table columns and names...
Try
For Each Nm As String In productColumnCollection
dC = New DataColumn(Nm)
dC.DataType = System.Type.GetType("System.String")
productTable.Columns.Add(dC)
Next
Catch
End Try
End Sub
-->Step 4 load up Dataview...
Friend Sub ViewConstructor()
productTableViewDefault = New System.Data.DataView(productTable)
productTableViewDefault.AllowNew = False
productTableViewDefault.AllowDelete = False
productTableViewDefault.AllowEdit = True
End Sub
--> Step 5 Assign view to Datagrid1...
Datagrid1.Datasource = productTable
--> Step 6 Format Datagrid1...
With DataGrid1
.BackColor = Color.GhostWhite
.BackgroundColor = Color.Lavender
.BorderStyle = BorderStyle.None
.CaptionBackColor = Color.RoyalBlue
.CaptionFont = New Font("Tahoma", 12.0!, FontStyle.Bold)
.CaptionForeColor = Color.Bisque
.CaptionText = "Installed Software"
.Font = New Font("Tahoma", 8.0!)
.ParentRowsBackColor = Color.Lavender
.ParentRowsForeColor = Color.MidnightBlue
.HeaderBackColor = Color.DarkBlue
.HeaderForeColor = Color.White
End With
'set up style...
Dim objDataGridTableStyle As New DataGridTableStyle
Dim objTextCol As New DataGridTextBoxColumn
' set alternate background colour...
objDataGridTableStyle.AlternatingBackColor = Color.WhiteSmoke
' set the mappingname for the DataGridTableStyle...
objDataGridTableStyle.MappingName = "productTable"
'set column 1
objTextCol.MappingName = "Level3"
objTextCol.HeaderText = "Level >3"
objDataGridTableStyle.GridColumnStyles.Add(objTextCol)
'set column 2
objTextCol = New DataGridTextBoxColumn
objTextCol.MappingName = "Level4"
objTextCol.HeaderText = "Level >4"
objDataGridTableStyle.GridColumnStyles.Add(objTextCol)
'final step, add datagridtablestyle to datagrid...
DataGrid1.TableStyles.Add(objDataGridTableStyle)
End of code...
Thanks
|
|
|
|
|
I want my application to send a request to search engine(Yahoo.com ,Excite,Altavista,msn) and the search engine should return the URLs of the top 10 sites that match the keywords I sent to the search engine.
I have found google.com contain an API for developers but the other search engines does not provide a similar API or web service.
Thanks in advance
|
|
|
|
|
And your question is?
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
my question is How can I get the top 10 sites that match my request from a search site other than Google
|
|
|
|
|
You'll have to either
1) Write the code for each search engine to parse up the resulting HTML and pull out the information you need.
2) Consult with the search engine to find out if there is some kind of developer interface for you to use. Like Googles...
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
I need to concatenate a one list of wav files with another list
I found a vb program on the net that uses th dos copy command by creating a batch file on the fly. this doesn't seem to work and although concatenates the files (the file size is bigger) when trying to play the wav file it only plays the first file
The filenames are of the following format:
file1 "hey <text of var length>.wav"
file2 "oh <text of var length>.wav"
I want to run a batch list as there are 108 files of each type. The varying length text is the same for the two files that need to be joined.
Cany anyone help?
Terry
|
|
|
|
|
If only it was so easy as copying files together. Unfortunately, it's not. The header of the .WAV file stores information such as bit rate, encoding, channel format, data length, ... This information is not expected in the middle of a .WAV file and is not interpreted as a new .WAV and played, as you've noticed.
You have a couple of problems. First, joining two .WAV files together means you have to read both files, determine that they share the exact same encoding, bit rate, ... what have you... Then write a new header with a new header built to encompass the data from BOTH files, not just one. Write the audio data from the first file, then append the audio data form the second.
Secondly, what if the encoding is different? How about the bit rate? You'll now have to recode the data from the second file to match the encoding of the first. Same with the bit rate...
I would recommend searching for an audio format processing library to take care of this work for you. I would suggest Googling[^] for "audio processing library VB.NET wav".
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Thanks for the info, that's pretty muuch as I expected the case would be.
Terry
|
|
|
|
|
How can i generate dynamic database fields in crystal reports, pls repla imediately with the help of a sample code
in VB.Net
Jyt
|
|
|
|
|
Dear Friend i have the below string written
and i want to know if could be converted to executable code
"Tree" & "." & "Nodes" & "(" & 0 & ")" & "." & "Nodes" & "." & "Add(" & """0.4""" & ")"
where Tree is a treeview control
i want to add nodes in a complicated treeview and it would be
very easily to me if i could convert such strings as the above
to executable code
ergolabos
|
|
|
|
|
The complexity of the code involved is not worth it. Why on earth could you just use comething like:
Tree.Nodes(someIndexVariable).Nodes.Add("0.4")
It's incredibly easy to build the string you want, but incredibly difficult to convert it to executable code that will work with your TreeView control.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
hello,
i tried to use the ExitWindowsEx() WINAPI in Visual Basic 6,
i use Windows XP OS and i want to reboot my pc after some installation (designed in vb). the parameters include 0 for logoff, 1 for shutdown and 2 for reboot.....
if i use 0 (logoff) it works fine, but when i use 1 or 2 .... it wont execute... enters into err handler...
here is the code...
If ExitWindowsEx(2, 0) = 0 Then<br />
MsgBox "The system could not REBOOT the machine. !"<br />
End If
previous to this we need to define the function..
Public Declare Function ExitWindowsEx& Lib "user32" (ByVal uFlags As Long, ByVal dwReserved As Long)
plz help me...
- thanks,
Basavaraj P.Umadi
|
|
|
|
|
Using ExitWindowsEx isn't really so straight forward. You might want to try looking at the example shown here[^].
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
|
And people in hell want ice water.
Are you talking about the BETA version? Try here[^]...
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
but at that link it requested to enter the msdn id or patner id where i will get that ids to download vs 2005
|
|
|
|