|
If you had botherd to do a google search "c# to vb.net" the first link would have given you this:
http://labs.developerfusion.co.uk/convert/csharp-to-vb.aspx[^]
wich would give you:
Public Partial Class frmMain
Inherits Form
Public Sub New()
InitializeComponent()
' Stand2plates.Add(3);
allStands = New List() {Stand1plates, Stand2plates, Stand3plates}
End Sub
Private allStands As List()
Private Stand1plates As New List()
Private Stand2plates As New List()
Private Stand3plates As New List()
End Class
|
|
|
|
|
Thanks you for your help.
I try to test this code but it have error on underline. What's problem ?
Public Class Form1
Inherits Form
Public Sub New()
InitializeComponent()
' Stand2plates.Add(3);
allStands = New List() {Stand1plates, Stand2plates, Stand3plates}
End Sub
Private allStands As List(Of Integer)
Private Stand1plates As New List(Of Integer)
Private Stand2plates As New List(Of Integer)
Private Stand3plates As New List(Of Integer)
Private Sub MoveFromTo(ByVal source As Integer, ByVal dest As Integer)
Dim top As Integer = allStands(source - 1)(allStands(source - 1).Count - 1)
allStands(source - 1).Remove(top)
allStands(dest - 1).Add(top)
RedrawPanels()
End Sub
End Sub
VB.Net
modified on Friday, August 22, 2008 10:43 PM
|
|
|
|
|
put the "allStands = New List() {Stand1plates, Stand2plates, Stand3plates}" code in the form "load" or "shown" event and see if you still have the error
without the error text I can't say much more
|
|
|
|
|
hi,
i have a new problem, i have a timer that send request for realtime display at client, i get it then create bitmap using set pixel, then show it on picturebox,
the problem now, i can show the image and it change every 5 seconds, but when i click a button to open other form and i drag it to picturebox, it become an error, it said 'parameter is not valid' then picturebox show error image.. the problem occured too when i minimize form and restore it again.. why this happen?
|
|
|
|
|
i dont get u well...Ope sam1 may understand or if u can xplain better?
|
|
|
|
|
Hi
I want a code for match the string with the souce string and then undo the matched string from the source string in the textbox.
like if source string is HiHello
and match string is hello
then undo that hello string from the original string or source string
|
|
|
|
|
I guess you want the string.Replace method for the second part and the contains ( from memory ) method for the first.
Christian Graus
No longer a Microsoft MVP, but still happy to answer your questions.
|
|
|
|
|
hi,
it is my first time using listview, i can add the item,
but, the problem now, how can i make the listview only focus or show the latest item or row that have been added? and, if i have textbox, i can use text_Changed event to alert something, but how can i do this for listview?
plz..
|
|
|
|
|
mm - there doesn't seem to be an event. I'd say grab an event you know would get fired when an item is added ( like the item draw event ) and keep track of the number of items, and fire your own event if that changes.
Christian Graus
No longer a Microsoft MVP, but still happy to answer your questions.
|
|
|
|
|
Deselect all items...
For Each x As ListViewItem In ListView1.Items
x.Selected = False
Next
Add a new item...
Dim lvi As New ListViewItem
lvi.Selected = True
lvi.Text = "test"
ListView1.Items.Add(lvi)
Set the focus to show the selection...
ListView1.Focus()
|
|
|
|
|
Make the selected item visible
lvi.EnsureVisible
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
Hello im new to vb.net and need someone to write a VERY simple ftp for me please need it soon as possible, ive search on the internet and copyed examples of the internet but i could not get any to acculy work i need the accual code so it will send the file when i press a button
modified on Thursday, August 21, 2008 3:44 PM
|
|
|
|
|
Would you like a large pizza and a 2 liter of coke with that?
There are several tutorials on this site that work just fine. I suggest you slow down and more carefully analyze the code.
Any suggestions, ideas, or 'constructive criticism' are always welcome.
|
|
|
|
|
Use FileZilla.
Now where's my friggin beer?
|
|
|
|
|
Why do you *need* this code ?
Christian Graus
No longer a Microsoft MVP, but still happy to answer your questions.
|
|
|
|
|
Probably wants someone to do it for them.
"The clue train passed his station without stopping." - John Simmons / outlaw programmer
"Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon
"Not only do you continue to babble nonsense, you can't even correctly remember the nonsense you babbled just minutes ago." - Rob Graham
|
|
|
|
|
|
I have a program I need to run. It outputs to the command line, and I need to be able to read this output immediately. The problem is, a process's DataReceived event is fired in 'chunks', not at the same time the data is actually outputted. I've also tried writing to a .bat file, redirecting the output to a file from there, and then using a FileSystemWatcher to figure out when something has been written, but this doesn't seem to work either.
Thanks for any help!
|
|
|
|
|
Did you try making the process redirect standard output? There is a RedirectStandardOutput property on the ProcessStartInfo class. You will have to set UseShellExecute to false to use it.
|
|
|
|
|
Yes, but the process's DataReceived events aren't called at the time that the data is actually written (see the answer in this thread[^]).
|
|
|
|
|
Hi
I have added 3 textboxes in the form parallel ( datagrid in down).I want to display data in datagrid cells row wise.After enter, fresh data display above rows in grid cells.
Any Idea?
|
|
|
|
|
I'm sorry to say that your grasp of english is not up to asking this question, I have no idea what you are trying to do!
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
I just add data of textboxes in datagrid.
|
|
|
|
|
I have the below statement that will bring up the the windows print manager when a user clicks the button on the web page.
Print button statement---
Print this pagenclick=" window.print(); return false"
How would I alter this statement to have the windows "save page as" window appear to save the web page as a html document?
If I change the statement to the below it will not work.-----
Save this pagenclick=" save(); return false"
Thanks for the help!!
|
|
|
|
|
Try a different forum, for starters.
|
|
|
|