|
Hi,
someone has a working code of this control. I already found some in C but I can't convert them into VB.net
Thanks Jan
PS: I work with 2008
|
|
|
|
|
jan212r wrote: someone has a working code of this control
Which Control? You didn't even find time to write your question poperly and expect someone to give you cooked code.
jan212r wrote: PS: I work with 2008
So what?
Please remember to rate helpful or unhelpful answers, it lets us and people reading the forums know if our answers are any good.
|
|
|
|
|
Ditto............didn't even provide the link so we could even look at what he is talking about.
Any suggestions, ideas, or 'constructive criticism' are always welcome.
|
|
|
|
|
I beleave that the title speaks for itself
So i'm looking for a multiline listview
Even that on the codeproject there are several articels Ex:
[^]
Jan
|
|
|
|
|
I need the following format: @@-@@@@-@@
I know you do the following with something that is a numeric value:
microsoft.VisualBasic.Format(12345678, "##-####-##")
What do you do if you have an alphanumeric string and you want the same format? Is there a way to do this without parsing the string? I realize I'm probably missing something simple here.....
Any suggestions, ideas, or 'constructive criticism' are always welcome.
|
|
|
|
|
Not pretty, but it works...
microsoft.VisualBasic.Format(cdbl("12345678"), "##-####-##")
|
|
|
|
|
Thanks for the reply,
I should have been more specific in my example. The VB.Format function will work with numeric values like you pointed out, but what do you do with alphanumeric values.
Suppose I want to format: "AB1234Z7" in the same format (@@-@@@@-@@)?
Is there a built in way to accomplish that or do you need to manually parse the string and build a new one?
Any suggestions, ideas, or 'constructive criticism' are always welcome.
|
|
|
|
|
Any of C.P.s finest have an answer for poor ol' me?
Any suggestions, ideas, or 'constructive criticism' are always welcome.
|
|
|
|
|
The most efficient way, I think, is to use a StringBuilder:
Dim formatted As String = New StringBuilder(10) _
.Append(alphaNumeric.Chars(0)) _
.Append(alphaNumeric.Chars(1)) _
.Append('-') _
.Append(alphaNumeric.Chars(2)) _
.Append(alphaNumeric.Chars(3)) _
.Append(alphaNumeric.Chars(4)) _
.Append(alphaNumeric.Chars(5)) _
.Append('-') _
.Append(alphaNumeric.Chars(6)) _
.Append(alphaNumeric.Chars(7)) _
.ToString()
The StringBuilder uses an internal string buffer, and the ToString method will return that buffer as a regular string, so there is no extra copying going on. As you define the correct size when creating the StringBuilder, there will be no reallocation of the buffer or unused overhead at the end of the string.
Another method is to use a regular expression. It's not as efficient, but fairly short:
Dim formatted As String = Regex.Replace(alphaNumeric, "(.{2})(.{4})(.{2})", "$1-$2-$3")
Despite everything, the person most likely to be fooling you next is yourself.
modified on Thursday, August 28, 2008 5:15 PM
|
|
|
|
|
Guffa wrote: The most efficient way, I think, is to use a StringBuilder:
I'll give something like this a go.
Guffa wrote:
Another method is to use a regular expression. It's not as efficient, but fairly short:
Nice! I thought regex's could only check data, not update it. Sigh....
Thanks Guffa for pointing me back into the light.
Any suggestions, ideas, or 'constructive criticism' are always welcome.
|
|
|
|
|
How can i make sure that no one can kill the process of my window service
|
|
|
|
|
Can't. A user with administrator privileges can kill the process or just stop the service.
|
|
|
|
|
|
Ok if this is not possible then is there a way that i can restart the service if it is stopped or shutdown.
|
|
|
|
|
hello...
i have a combobox and a datagrid...i have contents of f_name displayed in combobox from database...so when i select name from combobox it should display all the data of that particular name...but in my grid only columns are displayed...they are blank....neeeeeeed help!!!!!!!
|
|
|
|
|
seee this
http://www.codeproject.com/KB/cs/N-Tier22.aspx[^]
Vuyiswa Maseko,
Sorrow is Better than Laughter, it may Sadden your Face, but It sharpens your Understanding
VB.NET/SQL7/2000/2005
http://vuyiswamb.007ihost.com
http://Ecadre.007ihost.com
vuyiswam@tshwane.gov.za
|
|
|
|
|
hello frends .......
m facing problem while trying to insert values into the database using dataset and tablemapping...... getting error no coloumn at index 0
Dim ds As New DataSet
ds.Tables.Add("DATA")
Dim dr As System.Data.DataRow
Dim k As Integer
' For i = 1 To 90
Dim m As Integer
' m = i
m = 1
k = 0
' Dim t As TextBox = Panel2.FindControl("Text" & i.ToString())
' If t.Visible = True Then
dr = ds.Tables("DATA").NewRow()
dr(k) = Session("proj")
k = k + 1
dr(k) = Session("vol_name")
k = k + 1
dr(k) = Session("brd")
k = k + 1
For j = 1 To 9
If j = 4 Then
Dim d1 As DropDownList = Panel2.FindControl("Text" & m.ToString())
m = m + 1
dr(k) = d1.SelectedValue
k = k + 1
Else
Dim t1 As TextBox = Panel2.FindControl("Text" & m.ToString())
m = m + 1
If t1.Text.Trim() = "" Then
dr(k) = OracleString.Null
k = k + 1
Else
dr(k) = t1.Text.Trim()
k = k + 1
End If
End If
Next
ds.Tables("DATA").Rows.Add(dr)
' Else
' Exit For
' End If
' i = i + 8
' Next
'*******************************
Dim cn As OracleConnection
cn = New OracleConnection("user id=lntforms;data source=;password=user123")
cn.Open()
Dim sq1 As String
sq1 = "SELECT * FROM CMS_LOADLIST"
Dim oraDa As OracleDataAdapter
oraDa = New OracleDataAdapter(sq1, cn)
oraDa.TableMappings.Add("Load_list", "DATA")
oraDa.Fill(ds, "CMS_LOADLIST")
'Label5.Text = ds.Tables("DATA").Columns.Count.ToString()
Dim cb As OracleCommandBuilder
oraDa.SelectCommand = New OracleCommand(sq1, cn)
cb = New OracleCommandBuilder(oraDa)
Try
oraDa.Update(ds, "DATA")
ds.AcceptChanges()
'Session.Add("ds", this.ds)
Catch ex As System.Exception
'err = 1
ds.RejectChanges()
'Session.Add("ds", this.ds)
If ex.Message.StartsWith("ORA-00001") Then
Label5.BackColor = Color.Red
Label5.Text = "All project entries must be unique."
Else
Label5.BackColor = Color.Red
Label5.Text = ex.Message()
End If
End Try
please help me out....
kisran
|
|
|
|
|
i want to work on something that manages staff time schedule. the rows indicate the time and the columns indicate the staff/employee. the logic of my app is when the start an end time is inputed it will color the datacells affected and show the details of the employee task. my problem is the details will appear on every datacell it will affect. is there a way in vb.net that same cells will be merged displaying a single values? i have seen an application in vb6 that display in datagrid what i need. here is the image:
http://img357.imageshack.us/img357/5510/datagridus2.th.jpg[^]
the image show same dates merged into a single cell and displays a single value. hope there is a way in vb.net. ive tried to search for it in the web, i cant find any samples of it.
modified on Thursday, August 28, 2008 2:43 AM
|
|
|
|
|
Please do not cross post, its rude.
Bob
Ashfield Consultants Ltd
|
|
|
|
|
|
Hi
I am using the following code to retrieve an HTML page contents but it is throwing an exception for certain page of javascript type. Following is the code used to retrieve the page.
Dim objWebClient As New WebClient()
Dim objUTF8 As New System.Text.UTF8Encoding()
Dim strRequestHTML As String
strRequestHTML = objUTF8.GetString(objWebClient.DownloadData(New Uri("http://search.live.com/results.aspx?q=basic")))
Here the error is thrown while downloading the data that an unspecified error occurred at line #.
I want to suppress this error, please suggest me any mod which could do the trick. I would be so thankful to you.
Thanks and Regards,
MAP Tiger
Tiger Softwares
Software Designer and Developer
VB.NET, ASP.NET, VFP
|
|
|
|
|
Try to supply request headers as a valid JS supported browser. This may avoid JS errors. I don't think that you can suppress it.
|
|
|
|
|
Hi
Thanks for the reply.
Can you please give me an example?
Regards,
MAP Tiger
Tiger Softwares
Software Designer and Developer
VB.NET, ASP.NET, VFP
|
|
|
|
|
Hi guys
I just have analyzed that the problem is not in this procedure but the upcoming syntaxes are throwing the error:
Dim aDoc As IHTMLDocument2 = New HTMLDocumentClass()
aDoc.write(strRequestHTML)
aDoc.close()
I am using this procedure to access all the elements of the downloaded HTML page and the error throws at aDoc.write(strRequestHTML) and I think it is because there are javascripts which are supposed to be loaded but the current implementation is not letting it loaded so the functions which are using them are of course left undefined which in turn throwing the error.
Please help me in this regard, I would be so thankful.
Regards,
MAP Tiger
Tiger Softwares
Software Designer and Developer
VB.NET, ASP.NET, VFP
|
|
|
|
|
since you have the string you can prepend to it:
<script language="JavaScript" type="text/javascript"> <!--
function stoperror(){return true}
window.onerror=stoperror
// -->
</script>
This will suppress the javascript errors, if that is what is causing the problem.
|
|
|
|