|
That has to be done through the Win32 API function SetLocalTime[^].
|
|
|
|
|
Hi,
I have to get the items selected in the checked list box and accordingly insert the id's in the table I have written the following code but it throws up an error.
For i = 0 To chkLstProd.Items.Count - 1
If chkLstProd.Items(i).Selected = True Then
val = chkLstProd.GetSelected(i)
clsInData.InsertVchProd(vid, val)
End If
Next
Can anyone tell me where i am going wrong.
Thanks,
Riz
|
|
|
|
|
as such checked list box don't provide the option to populate itself with both ids and text(value member and display member)
but using the framework class
Imports Microsoft.VisualBasic.Compatibility.VB6.Support
and it's function
GetItemData(,) <br />
and<br />
SetItemData(,)
will help u sort out the problem
|
|
|
|
|
I would guess that GetSelected takes the index of the item in the selected items collection, and if you have 2 items selected, it wants 0 and 1, not 5 and 7, even if those are the indexes of the items.
There's a SelectedItems property, isn't there ?
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
i have a problem retrieving all available information in a specific column in Excel File. A Column in Excel has many cell data information that could reach a thousand characters if needed, so when i converted the said Excel File to a dataset most of the Column data information were omitted, i just assumed that a DataColumn has a specific Limit of character length allowed that's why this problem occur.
Below is the function i'm using:
Public Function GetExcelData(ByVal sFile As String, ByVal strSheetName As String) As Data.Dataset
Dim strCon As String = "Provider=Microsoft.Jet.OLEDB.4.0;" & _
"Data Source=" & sFile & ";" & _
"Extended Properties=""Excel 8.0;HDR=YES;IMEX=1"""
Dim conexcel As OleDb.OleDbConnection
Dim cmdExcel As OleDb.OleDbCommand
Dim daExcel As OleDb.OleDbDataAdapter
Dim dsExcel As Data.DataSet
Try
conexcel = New OleDb.OleDbConnection(strCon)
conexcel.Open()
cmdExcel = New OleDb.OleDbCommand("Select PDFColorPages from [" & strSheetName & "$]", conexcel)
daExcel = New OleDb.OleDbDataAdapter(cmdExcel)
dsExcel = New Data.DataSet
daExcel.Fill(dsExcel)
Return dtTable
Catch ex As Exception
MsgBox(ex.ToString)
Finally
conexcel.Close()
conexcel.Dispose()
cmdExcel.Dispose()
daExcel.Dispose()
dtExcel.Dispose()
End Try
End Function
|
|
|
|
|
i have a DVR Card include is not SDK.
and i want develop new software for it with vb2005
but now can't show video in form.
Somchoto...
|
|
|
|
|
If you have drivers for it, then you should be able to write code for it using DirectX
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
Yes,i have drivers for it,but i don't know how using DirectX
if use DirectX,i don't write code call DLL file ?
|
|
|
|
|
somchoto wrote: but i don't know how using DirectX
There are plenty of articles on this site
somchoto wrote: if use DirectX,i don't write code call DLL file ?
I have no idea what you're asking here. If you download any of the sample code on this site, it should just work with your device.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
|
but articles in site is DirectX with all C#
|
|
|
|
|
So what ? You can run them through a converter, convert them by hand, or just wrap the functionality in a dll and call it from VB.NET.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
I want to get drive, but when i get drive with the method .Name it work properly, otherwise error with .VolumeLabel, .TotalSize,... because it found drive "A", so what can i do?
................
|
|
|
|
|
This makes absolutely no sense at all. You want to get what again? What's the code you used?
|
|
|
|
|
For Each str As System.IO.DriveInfo In DriveInfo.GetDrives()
MessageBox.Show(str.VolumeLabel)
Next
................
|
|
|
|
|
All you have to do is either check the DriveType of each of your DriveInfo object, or check the drive letter to see if its lower than C. If it doesn't meet the test you want, do add it to your list control.
|
|
|
|
|
Thank in advanced, i'll my best
................
|
|
|
|
|
If you don't want to work with a floppy drive, you can ignore A and B if it finds them. Or just put the code in a try catch, each time you check the properties.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
Yes i already use Try Catch, but i can't bound it to combobox, the error response "Drive not ready".
How can i ignore Drive "A" or "B"?
Socheat
................
|
|
|
|
|
By removing them from your list ?
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
How can i remove?
................
|
|
|
|
|
By ignoring those letters when you iterate through the drives. You would have to have an intermediate step and not data bind your drop list to the drives collection, but that's basically it.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
I currently using VB.NET 2005, i want to connect to database on server with Ms Access.
Provider=Microsoft.Jet.OleDb.4.0; data source=//servername/d/database.mdb"
servername=socheat
after that i get error like that "Can not find instaled ISAM"
plese help me
................
|
|
|
|
|
Socheat.Net wrote: data source=//servername/d/database.mdb"
The correct format for a UNC path is \\servername\sharename\path\database.mdb
This, of course, depends on the server actually exposing a fileshare and you having Read and Write permissions to the share AND folder the MDB file is in.
|
|
|
|
|
Can u give me one example?
What about i get an error "Could not find installable ISAM"?
Socheat
................
|
|
|
|