|
I remember that in VB6 i can do this by copy/mutiple a textBox, then there is an array of them.
Can i do this in VB.Net? b'cause i want to display a array of number in several textBox. I can't type
textBox1.text = a(0).ToString()
textBox2.text = a(1).ToString()
...
...
textBoxXX.text = a(XX).ToString()
Can anyone have better idea???
Hopefully any idea...
Thanks
|
|
|
|
|
For Next Loop ?
End Less Loop
|
|
|
|
|
Oh, my God! How can i understand your idea????
Pls give me more detail...
OK?
|
|
|
|
|
Dim x As Integer
Dim count As Integer
count = 20
Dim ary() As Integer = {0, 1, 2, 3, 4}
For x = 0 To 4 'Count = collCtls.Count - 1
Dim tb As New TextBox()
With tb
.Name = "TextBox" & x
.Top = count
.Height = 150
.Width = 250
.Text = tb.Name & " Contains Array Item " & x & "'s value which is " & ary(x).ToString
End With
count += 40
Me.Controls.Add(tb)
Next
-----------------
One Click Operation.
You may change the properties of the Tbox accordingly.
I hope you should understand my idea now.
Can you help me with my posted question ?
thanks.
End Less Loop
|
|
|
|
|
thanks a lot!!
Sorry, i don't know much about ClipBoard.!
|
|
|
|
|
Well nevermind, anyways thanks for reply.
End Less Loop
|
|
|
|
|
My component will hold a connection to third party service (which takes more time to initalize). Have set the minimum pool size as 3 and maximum as 50. Before calling the required method on the class, i check for whether the object holds a valid connection to the third party service , otherwise i am setting up the connection. On deactivate of the class i am not closing the connection. So that pool will have objects with live connections. The problem is when more than 3 objects are created in the pool, after the timeout period the COM+ keeps only the minimum objects (3) in the pool and destroys the rest.
I wanted to close connection to thrid party service when object is thrown out of pool. I tried putting code in "Sub Destroy" it did not work..
Can somebody help pls ?
Choks
|
|
|
|
|
<serializable()>_
Class abc
Sub mysub()
Dim abc As DataObject
abc.SetData(System.Windows.Forms.DataFormat.WaveAudio,True,{?})
Clipboard.SetDataObject(abc)
End Sub
End Class
----------------------------
Which variable to use to place "Media File as object" in place of "?" in the above SetData Method.
1. FileStream.
2. MemoryStream.
3. Path To File.
All I want is to copy a media file to clipboard(mainly mpg,wav), so that I can paste it.
Thanks.
End Less Loop
-- modified at 8:24 Wednesday 29th March, 2006
Never Mind I solved it myself.
Thanks for your help.
Ta Ta Tadennn!
|
|
|
|
|
ok! u r genies mate hehe!
Adrian De Battista: .Net Programmer, Java Programmer and Web Designer.
|
|
|
|
|
Can I ask how you solved this? I have the same question.
Stew Scott
|
|
|
|
|
Hello Stew Scott,
Well, I used "FileDrop" option of ClipBoard.
Here is the code:
Imports System.IO
'Declaration
Dim obj As New DataObject()
Dim tarFile() As String
'If anyTxtBox is a text box, which contains the exact path to the tarFile then
If anyTxtBox.Text <> "" And File.Exists(anyTxtBox.Text) Then
'Assign data to string
tarFile = Split(anyTxtBox.Text, vbCrlf)
'Set this string to DataObject as FileDrop Object
obj.SetData(System.Windows.Forms.DataFormat.FileDrop, tarFile)
'Set this DataObject to ClipBoard
ClipBoard.SetDataObject(obj)
'The Clipboard will have the required file as long as another clipboard
'copy function is performed. You may paste that file any where now.
End If
--------- :->
Good Day.
End Less Loop
|
|
|
|
|
Thanks very much. This helped!
|
|
|
|
|
i'm trying to have a pop up quiz which i dont want other thing smoving around behind when doing the quiz , how do i pause it running?
I try use .showdialog which the code will continue after the form code, but it doesnt look work for me, or thats not the command? even i try to set the timer to false the token still moving behind on the board game.
ElseIf x = 32 Or x = 56 Then
Stime.Enabled = False
'if computer turn, on the AI player function in the quiz
If com(Turn).Visible = True Then
quiz2.computer.Text = "on"
End If
quiz2.ShowDialog()
.....
|
|
|
|
|
Where is the "IF PORTION".
If there is no IF portion preceeding this "ELSEIF PORTION", then change it to "IF x=32 OR x=56 Then"
thanks.
End Less Loop
|
|
|
|
|
all the if else statement r correct i only post a few of my coding which i want to ask how to STOP run the next coding when i try to sho the form
form2.showdialog
which someone told me to use the showdialog the coding will pause until the form2 close.
but it doesnt work for me... actually the .showdialog is it will pause read the next coding when i open the form and continue when i close the form2??
|
|
|
|
|
.<br />
.<br />
.<br />
Form2.ShowDialog()<br />
Exit Sub<br />
.<br />
.<br />
.
Chatura Dilan
|
|
|
|
|
the exit sub woundnt exit the function??????
cause my coding after the form.showdialog have some if else statement also
|
|
|
|
|
You can use Exit Function .
Use it at the correct place, according to you.
Chatura Dilan
|
|
|
|
|
i had try it not working.... if i exit that function... it woundnt run the other coding wat i mean it i just want to PAUSE it at that time when the other form open , when the form is close then continue the next coding.
actually my method is first i use timer to make the object move one by one which is the image according to the location, and then in my function check () to check some condition
--- check condition
...........
ElseIf x = 32 Or x = 56 Then
stime.enabled=false
'if computer turn, on the AI player function in the quiz
If com(Turn).Visible = True Then
quiz2.computer.Text = "on"
End If
quiz2.ShowDialog()
'if player able to win in the quiz move to other location
If x = 32 Then
If quiz2.result.Text = "y" Then
PlayerP(Turn).Location = squarelabel(z + 48).Location
Ppos(Turn).Text = 48
End If
ElseIf x = 56 Then
If quiz2.result.Text = "y" Then
PlayerP(Turn).Location = squarelabel(z + 74).Location
Ppos(Turn).Text = 74
End If
End If
ElseIf Turn >= NumPlayer.Text Then
Turn = 0.........
|
|
|
|
|
how to close the system properly instead of using ctrl+alt+del and end the process??
i try to use me.close to close the form but it didnt 100% close the whole system, might be some of the form was hidden...
|
|
|
|
|
campbells wrote: how to close the system properly
private sub button1_click (byval blablabalasfdas)
end
end sub:->
<blink>FeRtoll Software.net
------------
E-Mail me
WebPage
|
|
|
|
|
|
|
Hi,
Is it possible to remove the last line from the datagrid where you enter new row values (*) but still be able to edit the grid. Basically I want to be able to only edit the datagrid not add any rows to it.
Thanks!
|
|
|
|
|