|
hi,
anyone know how to create multiple textbox using for loop in vb.net?
Dim i As Integer
For i = 0 To i <= 10
Dim textBox(i) As TextBox
textBox(i).Multiline = True
textBox(i).ScrollBars = ScrollBars.Vertical
textBox(i).AcceptsReturn = True
textBox(i).AcceptsTab = True
textBox(i).WordWrap = True
textBox(i).Text = "Welcome!"
textBox(i).Visible = True
Me.Controls.Add(textBox(i))
Next
I have write the above coding but it's look not successfully and didn't appear any textbox comeout!!!
So, anyone know please help!
charleslau2855
|
|
|
|
|
You have not set a position for the textbox. It probably exists, but not in the visible area of the form.
|
|
|
|
|
Thanks, Christian Graus!
the following code:
Dim i As Integer
For i = 0 To i <= 10
Dim textBox(i) As TextBox
dim e as integer
textBox(i).Multiline = True
textBox(i).ScrollBars = ScrollBars.Vertical
textBox(i).AcceptsReturn = True
textBox(i).AcceptsTab = True
textBox(i).WordWrap = True
textBox(i).Text = "Welcome!"
textBox(i).Visible = True
textBox(i).Location = New Point(16 + e, 32)
Me.Controls.Add(textBox(i))
i = i + 1
e = e + 5
Next
Note: but after i set the position but It's also didn't comeout the textbox? then how to get the textbox comeout?
charleslau2855
|
|
|
|
|
charleslau2855 wrote: i = i + 1
Doesn't think mean that i is increased twice per loop ?
Have you tried stepping through and checking things like the Size and Location property after it's added to the controls collection ?
|
|
|
|
|
How do you expose all objects of directshow. All I found is to reference quartz.dll, that only gives limited.
Mark Thibodeaux
|
|
|
|
|
If you download the latest platform SDK, DirectShow has a managed interface. Or, there are wrappers on the web, including at least one on CP.
|
|
|
|
|
Hi,
I am new to vb.net, i would like to play a video, and during certain time frames within the video add text to it.
for example after 10secs into a video clip some message should pop up and then the video should continue to play. is this possible, and if so how? Im assuming i will need the windows SDK stuff.
I would much appreciate anybodies help.
|
|
|
|
|
Playing a video is easy. Titles are more tricky, unless you use WPF ( .NET 3.0 ). In that case, it's quite easy. Otherwise, it's pretty involved, and I don't know exactly how it's done.
|
|
|
|
|
hi
thanks for the reply, but how exactly do I play a video? i was hoping you could show me how to do this.
Im looking for a windows media player embedded form or something along these lines so whilst playing the video the user has the ability to play, fast forward, rewind, pause, stop etc.
|
|
|
|
|
jady84 wrote: i was hoping you could show me how to do this.
OK, I assumed you'd googled to find out how to do that, and wanted to know how to do titles.
You add WMP to your control list, and then you can drag it onto your form. You can specify how much UI it shows, and you can do your own buttons if you prefer.
|
|
|
|
|
Hi,
Sorry about being a pest here, but I am new to this whole thing, how exactly do I go about adding WMP to the control list? (where is the control list?)
|
|
|
|
|
In the toolbox, right click and choose 'choose items'
|
|
|
|
|
when i right click i get to 'add/remove' items, iguessthats what you meant so i try to search to WMP but it's not there. i have windows mediaplayer SDK and windows media encoder already installed on the PC, also i have triedto browse but i cannot seem to add WMP to the control box, is there another way?
|
|
|
|
|
There is no other way. You're not right clicking on the toolbox, or you'd see the option that I told you to select.
|
|
|
|
|
|
I deloped visual Studio application on terminal server running win 2003 server. I want to run the same application on a different machine running win xp. This machine doesn't have Visual studio 2005 or Sql server 2005 installed.
I copied all the files from Terminal server to this local machine and when I tried to run .exe file I get an error saying that SQL server can not be found. I already got .net framework 2.0 installed.
Any help would be appriciated.
thank you in advance.
programmer
|
|
|
|
|
yyyyyy87 wrote: I get an error saying that SQL server can not be found.
Then you need to install it
yyyyyy87 wrote: I already got .net framework 2.0 installed.
That has nothing to do with SQL Server.
|
|
|
|
|
OK. What is the answer then?
thank you in advance.
programmer
|
|
|
|
|
Installing SQL Server, obviously. Or, if it's on the same network, setting up the connection string so it will connect.
|
|
|
|
|
|
Hi yyyyyy87.
The client need have the SQL Native Client Installed.
SINCERELY.
ANTHONY ACUÑA
PREFERED PHRASE:
SOMEBODY TELL ME WHY IS MORE REAL WHEN I DREAM THAT I AM WAKE?
|
|
|
|
|
Hi.
Last week I posted a question regarding reading Excel file and loading it into the DataGrid.
I didn't get any useful response back so please forgive me for posting this second time.
I'm sure someone had the same problem I have.
I have 3 columns in Excel. One of the columns (User Id) has text data (like: User 1) or a number data (like: 12345). My code works and doesn't throw any error but for some reason it only extracts text data. The numbers are missing and I'm not sure why. I've tried to foramt that columnt to TEXT only but it doesn't help. Just to be sure I looped through DataSet to make sure the values are there and of course they weren't.
Here's the code that reads Excel and loads data into DataGrid. Please help.
Thank you.
Try<br />
'Create DataSet and DataAdapter<br />
ds = New System.Data.DataSet<br />
da = New System.Data.OleDb.OleDbDataAdapter<br />
<br />
'Establish connection<br />
con = New System.Data.OleDb.OleDbConnection( _<br />
"provider=Microsoft.Jet.OLEDB.4.0; " & _<br />
"data source=" & Session("ExcelFilePath").ToString() & "; " & _<br />
"Extended Properties=Excel 8.0")<br />
<br />
'Create command<br />
cmdSelectExcel = New System.Data.OleDb.OleDbCommand("SELECT * FROM [Sheet1$] ORDER BY Company", con)<br />
<br />
'Open connection<br />
con.Open()<br />
<br />
'Exectue command through adapter<br />
da.SelectCommand = cmdSelectExcel<br />
da.Fill(ds, "[Sheet1$]")<br />
<br />
'Assign DataSourse of the DataGrid and bind it<br />
dg.DataSource = ds.Tables(0).DefaultView<br />
dg.DataBind()<br />
<br />
'Close Connection<br />
con.Close()<br />
Catch ex As Exception<br />
'Display error message<br />
lblError.Text = "Error: " & ex.ToString()<br />
lblError.Visible = True<br />
End Try
|
|
|
|
|
Hi Alexfromto.
Do you want that the oledb driver extracts all data as Text, correctly?
Then you need add the follow Extended Properties:
1st: IMEX=1;
2nd: MaxScanRows=0
The first property force the OleDb Driver to read any cell of excel for determine the column type.
The second establish the number of cell for every column to scan for determine de column type, the 0 value force to scan all cells.
SINCERELY.
ANTHONY ACUÑA
PREFERED PHRASE:
SOMEBODY TELL ME WHY IS MORE REAL WHEN I DREAM THAT I AM WAKE?
|
|
|
|
|
Thank you very much Anthony. It worked like a charm. You da man.
Alex.
|
|
|
|
|
I am new to "The Code Project".
I was attracted to this site due to an article; "Advanced DataGrid Formating with ItemDataBound".
The article identified how to format ADO.Net Datagrid rows conditionally.
I need to do the same from a VB.Net Datagrid.
My Application provides the user a datagrid that displays equipment calibration related data. I.E. "Equip. Serial #", "Due dates" ETC...
I want to conditionally change the color of rows (records) who's "Due date" columns are greater than the current date; DueDate > Today()
Thus, visually identifing records which need to be prioritized.
Can anyone direct me to an article, or perhaps point me in the right direction?
Regards:
DDscales
DDscales
|
|
|
|