|
Actually, this topic did interest me a while back as well, and i made some research.
I'm not sure there is a .NET VNC server implementation, but search Google for vnc activex server and you will find a commercial company that just released a beta of a vnc server activex control.
(I tested it and it works well)
i would be vary happy to find some project about a vnc .NET server
|
|
|
|
|
Hi, using VB net (2003) I Have 2 DataGrids on a Windows. Form(Tab Control with 3 pages) on page2 is DataGrid2, and on page3 is DataGrid3. Both DataGrid have 5 Rows and both first Columns are identical, ex: Normal Price is (Col. 0, Row 0), Credit Card is (Col. 0, Row 1), Discount 5% is (Col. 0, Row 2), Discount 10% is (Col. 0, Row 3), Discount 20% is (Col. 0, Row 4). What I need to do is when I click on any row of either DataGrid (highlighted meaning selecting a row) that the same row in the other DataGrid be selected. Is there a Way to do that programmatically, hope you can help me and thank-you in advance,.
|
|
|
|
|
It's not my best work by far but you get the idea
Private Sub Form2_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
Dim dsTbl As New Data.DataTable("test")
Dim dsRow As Data.DataRow
dsTbl.Columns.Add("col1", GetType(System.String))
dsTbl.Columns.Add("col2", GetType(System.String))
dsTbl.Columns.Add("col3", GetType(System.String))
dsTbl.Columns.Add("col4", GetType(System.String))
dsTbl.Columns.Add("col5", GetType(System.String))
Dim dstbl2 As Data.DataTable = dsTbl.Clone
For i As Int16 = 1 To 10
dsRow = dsTbl.NewRow
dsRow("col1") = Chr(65 + i)
dsRow("col2") = Chr(66 + i)
dsRow("col3") = Chr(67 + i)
dsRow("col4") = Chr(68 + i)
dsRow("col5") = Chr(69 + i)
dsTbl.Rows.Add(dsRow)
dsRow = Nothing
Next
For i As Int16 = 1 To 10
dsRow = dstbl2.NewRow
dsRow("col1") = Chr(69 + i)
dsRow("col2") = Chr(68 + i)
dsRow("col3") = Chr(67 + i)
dsRow("col4") = Chr(66 + i)
dsRow("col5") = Chr(65 + i)
dstbl2.Rows.Add(dsRow)
dsRow = Nothing
Next
Me.DataGridView1.DataSource = dsTbl
Me.DataGridView1.Refresh()
Me.DataGridView2.DataSource = dstbl2
Me.DataGridView2.Refresh()
End Sub
Private Sub DataGridView1_SelectionChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles DataGridView1.SelectionChanged
If DataGridView1.SelectedRows.Count = 0 OrElse DataGridView2.Rows.Count = 0 Then Exit Sub
DataGridView2.Rows.Item(DataGridView1.SelectedRows.Item(0).Index).Selected = True
End Sub
Private Sub DataGridView2_SelectionChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles DataGridView2.SelectionChanged
If DataGridView2.SelectedRows.Count = 0 OrElse DataGridView1.Rows.Count = 0 Then Exit Sub
DataGridView1.Rows.Item(DataGridView2.SelectedRows.Item(0).Index).Selected = True
End Sub
|
|
|
|
|
How can i read all of the entries in a registry subkey and then display them in a list inside a textbox?
|
|
|
|
|
Hi,
I have got this issue where I need to copy/paste multiple rows. At the moment, copying and pasting a single row seems possible. And it seems to work. copying and pasting multiple rows seems to be the problem. Only the last row that was highlighted to be copied seems to be entered within ClipBoard.
Here is my code:
Try
If e.KeyCode = Keys.C Then
'copy key c is pressed
Dim counter As Integer = 0
Dim selectedItemsArrayList As New ArrayList
For Each r As DataStructure.ItemsRow In MainForm.Data.Items
If dg.IsSelected(counter) Then
selectedItemsArrayList.Add(counter)
End If
counter += 1
Next
Dim format As DataFormats.Format = DataFormats.GetFormat(Me.ToString)
Dim data As IDataObject = New DataObject
Dim row As DataRow
If selectedItemsArrayList.Count > 0 Then
'if count is greater than 0, there are some rows selected
For Each i As Integer In selectedItemsArrayList
'for each row that is selected to be added
'add to clipboard
selectedDataGridRow = selectedItemsArrayList(i)
row = MainForm.Data.Items(selectedItemsArrayList(i))
data.SetData(format.Name, False, row.ItemArray)
Clipboard.SetDataObject(data, False)
Next
End If
End If
If e.KeyCode = Keys.V Then
'paste key is pressed
Dim row As Object()
Dim ClipData As IDataObject = Clipboard.GetDataObject
Dim format As String = Me.ToString
If ClipData.GetDataPresent(format) Then
row = CType(ClipData.GetData(format), Object())
'add row to datagrid
MainForm.Data.Items.Rows.Add(row)
End If
End If
Catch ex As Exception
MessageBox.Show(ex.ToString)
End Try
I guess I need to either modify the way I add items into ClipBoard or modify the way I retrieve items from within ClipBoard.
Cheers
---------------------------------
There is life outside coding.
|
|
|
|
|
The reason why you are only getting the last row is because of the clipboard works. it only retains one setdata at a time. it will not append automatically for you. so you need to bundle all your rows and use setdata once.
|
|
|
|
|
I have created an application in Vb.net that I need to deploy on other pc's. This application includes several windows forms and 6 different Access databases. At this point I'm not interested in making it available for downloads but want to create a simple install procedure for a novice user to install from DVD. What are the steps/options I need to take to create this type of install package ? Thanks.
|
|
|
|
|
Well, if you want to create a custom installer, try something like Clickteam Install Creator.
Or, if you want to create an installer using Visual Studio (not very customizable), then goto the "Build" menu and click on Publish. You can find options for the "Publishing Wizard" in your project's properties menu under the "Publish" tab.
Hope this helps.
|
|
|
|
|
I heard somewhere about a Sound Recording control in Vb 2005. Is this true, and if so, where can I find it? And if there isn't a recording control, is there another way to record sound using Vb?
Thank you for your help!
|
|
|
|
|
UltraCoder wrote: I heard somewhere about a Sound Recording control in Vb 2005. Is this true, and if so, where can I find it? And if there isn't a recording control, is there another way to record sound using Vb?
I don't know of any controls or classes in the .NET Framework that enable you to record audio. There is certainly a way to record audio in VB or any other language for that matter. You have the Win32/64 API and there is DirectX's DirectSound, although I'm not completely sure about DirectSound, I have never used it. I think Windows' standard multimedia API is called MCI. Take a look at the functions available in that .DLL If you are unable to find a .NET class library that enables you to record sounds then you have the opportunity to create your own using MCI.
http://www.allapi.net/vbtutor/tutmain.shtml[^]
Both API-Guide and API-Viewer are good programs for exploring the Windows API. They are tailored for VB6 but it should be easy to convert.
█▒▒▒▒▒██▒█▒██
█▒█████▒▒▒▒▒█
█▒██████▒█▒██
█▒█████▒▒▒▒▒█
█▒▒▒▒▒██▒█▒██
|
|
|
|
|
Thank you, but I'm not sure what to do. Could you please help?
Thank you for replying!
|
|
|
|
|
Here is something that may help.
http://www.codeproject.com/cs/media/DirectSound9p2.asp[^]
The Win32 multimedia APIs look very complicated, you best bet is DirectX. I would also check out the XNA Framework from Microsoft. Download XNA Studio Express and check it out.
█▒▒▒▒▒██▒█▒██
█▒█████▒▒▒▒▒█
█▒██████▒█▒██
█▒█████▒▒▒▒▒█
█▒▒▒▒▒██▒█▒██
|
|
|
|
|
I need to make 1 of my textboxes (which displays available system RAM) update itself every few seconds, now I very easily understand this example:
http://abstractvb.com/code.asp?F=26&P=1&A=1032[^]
BUT...
It up an exception saying something about threading.. has VB 2005 gone mad and is trying to eternally pee on me! or am i doing something wrong because i followed that exactly and i get that exception...?
|
|
|
|
|
Can you please post the exact error?
|
|
|
|
|
|
Use a timer control instead. It runs in the same thread.
---
b { font-weight: normal; }
|
|
|
|
|
I havent used timer controls, how would i type one out?
|
|
|
|
|
Just type:
Dim TimerControl As New Timer
|
|
|
|
|
oh ok thanks
|
|
|
|
|
Just drag the Timer control from the toolbox to your form.
---
b { font-weight: normal; }
|
|
|
|
|
ah cool
|
|
|
|
|
I am trying to format cost once the file is written to the database. Here is what I have:
Dim FormatCost As String
FormatCost = Format(row("coreprice").ToString(), "c")
It is displaying c instead of the actual number, but when I do this for example:
MessageBox.Show(Format(553378.6789, "c"))
This code works fine.
Any advice will be greatly appreciated!
jds1207
|
|
|
|
|
your using your ToString too early. you can only format a number/date. if the argument is a string, it doesn't understand that.
FormatCost = format(CSng(row('coreprice")),"c").tostring
|
|
|
|
|
|
FormatCost = String.Format(CSng(row("coreprice")), "c")
You do NOT need to call ToString on the return value of Format, since it's already a String.
Sorry, just one of my pet peeves.
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|