|
What does this have to do with VB.NET?
|
|
|
|
|
Does your inquiry have anything to do with VB.NET or you just dumping a post in a random forum?
"I guess it's what separates the professionals from the drag and drop, girly wirly, namby pamby, wishy washy, can't code for crap types." - Pete O'Hanlon
|
|
|
|
|
it is related to vb.net,
i want to by pass cas so i want a virtual software like thinstall to deploy my application .
or can you help me regarding group policy on enterprise level ?
hello
|
|
|
|
|
I tried to use the following code to pass 1-D array value to 2-D array. This code works, but I wonder if there is a more efficient way to implement this. Thanks.
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim i As Integer = 0
Dim DeltaGamma As Double = 0.3
Dim DeltaTapPoint As Double = 3
Dim DACArray() As Double = New Double() {1, 3, 5, 7, 9}
Dim NewArray(5, 4) As Double
Do While DeltaGamma > 0.1 And DeltaTapPoint > 2.0
For j = 0 To 4
NewArray(i, j) = DACArray(j)
Next
ProcessArray(DACArray)
i += 1
If i > 5 Then
DeltaGamma = 0.1
DeltaTapPoint = 2
End If
Loop
End Sub
Public Sub ProcessArray(ByRef array() As Double)
Dim j As Integer
For j = 0 To 4
array(j) *= 2
Next
End Sub
|
|
|
|
|
Don't think you can get more efficient than that. Unless you do some loop unrolling...
"Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon
|
|
|
|
|
Hi!
I am populating the treeview on fly from database. I am trying to maintain the selected state of a tree node (either parent or child). select node in parent works fine but when i try to find a child node i get null reference exception. can someone please tell me how i could select the child node.
thanks
|
|
|
|
|
uglyeyes wrote: select node in parent works fine but when i try to find a child node i get null reference exception. can someone please tell me how i could select the child node.
Have you set breakpoints in your code, and then looked at data in your objects? This will do wonders, it will let you see if the data in your objects/variables are what you were expecting. Without more detail, such as what you tried, detailed expection info, or some code, that's the best I can offer. I left my crystal ball at home.
I'm going to become rich when I create a device that allows me to punch people in the face over the internet.
"If an Indian asked a programming question in the forest, would it still be urgent?" - John Simmons / outlaw programmer
|
|
|
|
|
yes i did set up breakpoint.
If Not Session("locationid") Is Nothing Then --> when they select a node i am storing the value of selected node in session
Debug.WriteLine(Session("locationid"))
'Debug.WriteLine(tvProperty.SelectedNode.Value)--> prints value of the node
tn = Me.tvProperty.FindNode(Session("locationid"))--> where i get null ref exception
tn.Selected = True
End If
please note it didnt throw exception when i navigate between parent nodes.
its only happening when i navigate between child nodes.
in findnode do i need to give ref of parent, path seperator etc?
|
|
|
|
|
can anyone please help me?
|
|
|
|
|
i posted too early without doing any research. i should have used valuepath in session instead of just value to get the selected child node selected.
|
|
|
|
|
My question is this...
I am trying to change a column of a datagrid to a drop down combo box. I set everything up but my problem is that I am displaying a list of text in my combobox ("Preparer", "Reviewer", "Approver") I need to set the values of these items to 1, 2, 3. I don't want the program to recognize the string representation of the items but their enumerated values. How do I achieve this?
|
|
|
|
|
Every item in the datagrid will have fields as Text and value.
Generally Text and value are taken as the same, but user can change value field to any thing without effecting data in the text field.
Check datagrid properties...
Jats
|
|
|
|
|
How can I have the text of the selected Item from listivew by enter key?
Using vb.net 2005
Thanks In advance
|
|
|
|
|
insert a keydown-event for your listview.
then check e.keys for enter-key and when enter is pressed, pick out your listview's selected item and convert it to a string. then you have your selected item's text.
|
|
|
|
|
Hi,
I have 2 forms.On main form I have a listview and a button to add the customer in the listview.
On clicking the add customers button a new form opens up with a gridview with all the customers.Now what I want is that when user select multiple customers from the gridview and click ok button on customers list form then the selected customers from gridview should be added in the listview.
Thanks in advance
|
|
|
|
|
How about this:
<br />
dim v as integer<br />
For v = 0 To DataGridView1.SelectedCells.Count - 1<br />
ListView1.Items.Add(DataGridView1.SelectedCells(v).Value)<br />
Next v<br />
Good Luck.
|
|
|
|
|
I am working in VB.NET. I have a probelm regarding changing the System/Computer TimeZone from the VB.NET code. Is it possible with VB.NET code and how can we do this?
Thanks
Azmat Ullah
|
|
|
|
|
Me.OracleInsertCommand1.Parameters.AddRange(New System.Data.OracleClient.OracleParameter() {New System.Data.OracleClient.OracleParameter(":ADDBY", System.Data.OracleClient.OracleType.VarChar, 30, "ADDBY"),etc...
I'm using VS 2005 and it says AddRange doesn't belong the ParametersCollection.
But this is generated code from VS! (possibly 2003, we upgraded)
Can someone with 2003 check if it was valid in that version?
"Neque porro quisquam est qui dolorem ipsum quia dolor sit amet, consectetur, adipisci velit..."
"There is no one who loves pain itself, who seeks after it and wants to have it, simply because it is pain..."
|
|
|
|
|
Me.OleDbInsertCommand1.Parameters.AddRange is a valid method apparently.
So the problem could be with the Oracle library?
"Neque porro quisquam est qui dolorem ipsum quia dolor sit amet, consectetur, adipisci velit..."
"There is no one who loves pain itself, who seeks after it and wants to have it, simply because it is pain..."
|
|
|
|
|
I want to display a webpage on a windows form. And gradually i want to iterate and display several webpages on it. Also i need to do something when a particular webpage completes download to the window.
Can anybody please advise how can i achieve this using windows forms in vb.net 2005. I used WebBrowser control but it doesn't allows me to specify a url address through coding, but if I set the URL property to a site address at design time then it displays the site when the form loads.
Thanks in Advance. Please Help.
Sekhar
|
|
|
|
|
SekharOne wrote: I used WebBrowser control but it doesn't allows me to specify a url address through coding
Yes it does, try :-
WebBrowser1.Url = New System.Uri("http://www.google.co.uk")
Steve Jowett
-------------------------
Sometimes a man who deserves to be looked down upon because he is a fool, is only despised only because he is an 'I.T. Consultant'
|
|
|
|
|
Thanks Steven
that worked.
Thanks a lot once again. You people are simply Great.
Sekhar
|
|
|
|
|
Is there is any way to format textbox for numeric values without using databinding?
Thanks In advance
Ejaz
|
|
|
|
|
Create a new class called NumericBox and inherit Windows.Forms.TextBox
Now all you need to do is intercept keypresses with the KeyPress event, and validate them, for example :-
Private Sub NumericBox_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles MyBase.KeyPress<br />
Dim KeyAscii As Integer<br />
<br />
KeyAscii = Asc(e.KeyChar)<br />
<br />
Select Case KeyAscii<br />
Case 8, 13 ' backspace and carriage return<br />
'Do nothing as the input is valid<br />
Case 48 To 57 ' Keys 0 to 9 <br />
'Test the number of decimal places<br />
If Me.Text.Contains(".") Then<br />
If (Me.Text.Trim.Length - InStr(Me.Text, ".")) >= DecimalPlaces Then KeyAscii = 0<br />
End If<br />
<br />
'Test to see if the new value will exceed the maximum value<br />
'or minimum value limits<br />
Dim sValue As String = Value.ToString<br />
Dim dValue As String<br />
sValue &= e.KeyChar<br />
dValue = CType(sValue, Decimal)<br />
If dValue < Minimum Or dValue > Maximum Then KeyAscii = 0<br />
<br />
'Do nothing as the input is valid<br />
Case 45 'minus sign<br />
If AllowNegativeValues Then<br />
'If negative values as permitted then...<br />
If Me.Text.Contains("-") Then<br />
'if we already have a minus sign then throw away this minus sign keystroke just pressed<br />
KeyAscii = 0<br />
End If<br />
<br />
If Me.SelectionStart <> 0 Then<br />
'If the insertion point is not sitting at zero (the beginning of the field),<br />
'throw away the minus sign<br />
KeyAscii = 0<br />
End If<br />
Else<br />
KeyAscii = 0<br />
End If<br />
<br />
Case 46 'decimal point<br />
If AllowDecimalPoint Then<br />
If Me.Text.Contains(".") Then<br />
KeyAscii = 0<br />
End If<br />
Else<br />
KeyAscii = 0<br />
End If<br />
<br />
Case Else<br />
'Any other input is invalid so throw it away<br />
KeyAscii = 0<br />
End Select<br />
<br />
If KeyAscii = 0 Then<br />
Beep()<br />
e.Handled = True<br />
Else<br />
e.Handled = False<br />
End If<br />
<br />
End Sub
The snippet above utilises additional properties I have added to my NumericBox, should as AllowNegativeValues and AllowDecimalPoints both of which are Boolean values
Steve Jowett
-------------------------
Sometimes a man who deserves to be looked down upon because he is a fool, is only despised only because he is an 'I.T. Consultant'
|
|
|
|
|
This works unless the user is allowed to paste into the textbox...
If you're rolling your own numeric textbox, then you have to look at the TextChanged event and validate the contents on every change.
Everyone's first thought is to handle the keys pressed, but you'd be suprised how many users paste into textbox's.
David Anton
http://www.tangiblesoftwaresolutions.com
C++ to C# Converter
C++ to VB Converter
C++ to Java Converter
Instant C#: VB to C# converter
Instant VB: C# to VB converter
Instant C++ VB Edition: VB to C++/CLI converter
Instant C++ C# Edition: C# to C++/CLI converter
|
|
|
|