|
RodClark wrote: I'm thinking that the best way to acheive this is to purchase a book and read it, but which book...
I found the Head First[^] series a good read, though it's more a learn-by-doing style book. It's not a book you'd read in the train, unless you have a compiler at hand. Another good reference would be the How Do I-video's[^] on MSDN.
RodClark wrote: VB.Net/C#.Net - I've mostly done VB 6 in the past, but C# code does make some sort of sense to me.
How 'bout going for C#, and googling for the matching VB.NET syntax to compare it to? Seeing the same construction through two different glasses helps.
RodClark wrote: I think that means I need to get VS 2010 Pro, or can Express do this stuff, its just templates, any thoughts?
If I recall correctly, you'd need the Pro version to use the VSTO (Visual Studio Tools for Office) extensions. The Pro-version also allows to add in helpful extensions like Resharper, giving helpfull tips in the IDE.
RodClark wrote: Winforms/WPF/WCF - I barely understand the differences, I feel I'll mostly use Winforms. How do you decide which is 'best'.
The YAGNI[^]-princple would be the first filter. What's "best" depends on your circumstances - the man on the northpole will have different demands from a man in the desert. Go with what you're comfortable with, and read up on the new things when you have some spare time to kill. Once you discover some new area that's important to you, indulge.
RodClark wrote: How do you know the best way, and determine the best layout for a project - this function in module x, that one in module y.
I have to admit that I often don't know the best or recommended way.
Most (larger) programs are modular, and even the smaller ones tend to share a library with functions. As time passes, things get updated. The first step toward a cleaner architecturing was learning the OO-concepts, the second was learning design-patterns. What helped most overall, was reading code from articles on sites like this one.
RodClark wrote: I know this is long, I'm sorry.
Have a long answer as revenge
I are Troll
|
|
|
|
|
Thanks for the answers - appreciate them.
Those MS videos do look both interesting and useful, and the Head First book also. That sounds like the way I learn best (by doing) and I don't take the train often - when I do, I have my laptop so I can play. There's also a second edition which covers VS2010 - Here [^].
I'm nervous about going to C#, but then VB.Net is different enough to most of what I've done, that it represents a challenge too. It does seem that either language would do what I need, but most people tend to think that C# is a little more capable. It does look like I should use VS, rather than Sharp Develop. If I do use VS, then I do think that Pro is the minimum level - Just can't believe that MS dropped the standard edition (A$400, instead of A$1200!).
I like YAGNI, not heard that one before - makes sense to me. I do think that WinForms will be most of it - don't think the little utilities I written in the past or likely to create in the future need a fancy UI, just an easy, serviceable one.
Thanks again,
Rod
|
|
|
|
|
RodClark wrote: Thanks for the answers
My pleasure
RodClark wrote: I'm nervous about going to C#, but then VB.Net is different enough to most of what I've done
C# isn't more complicated than VB.NET, they're a close match. It looks a bit more cryptic perhaps, but that passes quickly.
RodClark wrote: but most people tend to think that C# is a little more capable
They match very closely, making automated translations possible. You could learn your C# and use a tool like this one[^] to take a peek at the equivalent VB.NET code.
RodClark wrote: It does look like I should use VS, rather than Sharp Develop.
The Visual Studio IDE remains my favorite IDE, but it's not a monogamous marriage. SharpDevelop is free software, and you could put it on a USB stick[^]. SharpDevelop also contains a built-in function to translate code from one language to another one.
Happy Programming
I are Troll
|
|
|
|
|
Thanks again, I've seen those code converters and even used them to get some example C# code into my VB program.
Now to make the purchase(s)...
|
|
|
|
|
Hi,everyone! I have some difficuties in my project. There are a lot of controls such as textbox and combobox in project, my question is: if I just input some values (not all) into these controls and then close the application; when I open the application next time, I want these controls could shown with values that I inputed last time.
What should I do to achieve it?Please give me some suggestions, thank you!
|
|
|
|
|
You'd have to save the available data somewhere before the app closes (a FormClosing event could help); and restore it when your app runs again (e.g. in a Form.Load event). Somewhere could be one or more files, or a database. I suggest you read a couple of articles here on CodeProject, at best you might come up with some functional search terms that match or come close to your application domain.
|
|
|
|
|
Hi,Luc! Thank you very much! I will search some articles to read
By the way,could you give me some keywords for search Thanks!
|
|
|
|
|
|
i have datagridview, i want to insert multiple rows( 5rows)
between two rows. how will i do that?
i know how to insert row between two rows but a single row.
i used: dttable.Rows.InsertAt(dRow, 0)
C# コードMicrosoft End User
2000-2008
「「「「「「「「「「「「「「「「「「「「「「「「「「「「
The best things in life are free
」」」」」」」」」」」」」」」」」」」」」」」」」」」」
|
|
|
|
|
dttable.Rows is a DataGridViewRowsCollection (the MSDN page on Rows told me so), and abviously its methods are also documented in MSDN. To insert one or more rows, look for a method with a name starting with Insert...
Please make Google your friend and MSDN your bible.
|
|
|
|
|
Do you want to add rows directly into datagridview or you want to update datatable, and so datagrid view?
Anyways, I'm pasting both, it's upto you to choose the best fit for you.
Sub insertRowsInGridView(ByRef dgvRows As DataGridViewRowCollection, ByVal rowsToInsert As DataGridViewRowCollection, ByVal insertAt As Integer)
For i As Integer = rowsToInsert.Count - 1 To 0 Step -1
dgvRows.Insert(insertAt, rowsToInsert(i))
Next
End Sub
Sub insertRowsInDataTable(ByRef dtRows As DataRowCollection, ByVal rowsToInsert As DataRowCollection, ByVal insertAt As Integer)
For i As Integer = rowsToInsert.Count - 1 To 0 Step -1
dtRows.InsertAt(rowsToInsert(i), insertAt)
Next
End Sub
|
|
|
|
|
Hello All, I have added a checkbox column to my datagrid, unfortunately, the checkboxes are not selectable. What am I missing? TIA
<pre lang="vb">Private Sub chkBoxAll_Approve(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles chkButton.Click
Dim ctr As New DataGridViewRow
Try
For Each ctr In dgvRequests.SelectedRows
If chkBoxColumn.Selected = True Then
Exit For
ElseIf dgvRequests.CurrentRow.Cells("requestType").Value = "OOORequest" Then
Call updateOutOfOffice(LeaveStatus.Approved)
Else
Call updateRequest(LeaveStatus.Approved)
End If
Next
Catch ex As System.Exception
MessageBox.Show(ex.Message)
End Try
End Sub</pre>
|
|
|
|
|
This isn't an answer, but edit your original post and check "Use HTML in this post". That will allow your pre tags to work.
[Update]
In response to your question, it's because of the SelectionMode property. You can only have one selection mode. And the only way to allow the column to be selected is to set the SelectionMode to ColumnHeaderSelect.
Though what you are talking about has absolutely nothing to do with checkboxes within the column.
It sounds like what you really want us to see if the current row has the checkbox selected and if not, you don't do anything with it. So, instead of doing what you are saying, you need to actually check the value of that cell, not whether or not the column is selected.
modified on Wednesday, September 15, 2010 6:24 PM
|
|
|
|
|
I am creating an application in which tcp server can connect to more than one tcp client.
following is the code- where winsockServer is the winsock control in VB6 whose index property is set to 0.
----------------
Private Sub Form_Load()
'winsockServer.Protocol = sckTCPProtocol ' choose the TCP protocol
winsockServer(0).LocalPort = 2020 ' an example port number
winsockServer(0).Listen ' tell Winsock to start listening
intSockCnt = 0
End Sub
Private Sub winsockServer_ConnectionRequest(Index As Integer, ByVal requestID As Long)
If intSockCnt > 2 Then
MsgBox "No. of hosts exceed....."
Else
intSockCnt = intSockCnt + 1
Load winsockServer(intSockCnt)
winsockServer(intSockCnt).Accept requestID
End If
End Sub
on compiling it is giving an error-
Procedure declaration does not match description of event or procedure having the same name
How can I do this ??????
thanks in adv..
|
|
|
|
|
Try this one;
Private Sub axWinsockListen_ConnectionRequest(ByVal requestID As Long) I wouldn't connect to many applications at once; VB6 wasn't built with multithreading support in mind.
I are Troll
|
|
|
|
|
I have 4 option buttons-
options1,options2,options3,options4
I want to add options1 and options2 in one group and options3 and option4 in another group.So that at a time one option button would be selected from each group.
How can I do this?
|
|
|
|
|
place the pairs of buttons within someother container such as a group or a panel.
Dave
Find Me On: Web| Facebook| Twitter| LinkedIn
CPRepWatcher now available as Packaged Chrome Extension, visit my articles for link.
|
|
|
|
|
Put the different groups of options buttons in separate frames
you can make the frame borders invisible if it spoils the look of the form
|
|
|
|
|
how to round this on vb.net? or how will i do this.
ex.1)
givenvalue= 3
12345 returns 12300
ex.2)
givenvalue= 4
12345 returns 12340
C# コードMicrosoft End User
2000-2008
「「「「「「「「「「「「「「「「「「「「「「「「「「「「
The best things in life are free
」」」」」」」」」」」」」」」」」」」」」」」」」」」」
|
|
|
|
|
This is very simple math. In you're first example, all you do is divide the number by 100, take the integer if you don't do integer division, then multiply by 100.
|
|
|
|
|
By reading your course notes? This isn't The CodeProject Homework Hotline
Then there is what typeof rounding you want to use; http://en.wikipedia.org/wiki/Rounding[^]
See this microsoft article; How to implement custom rounding procedures[^]
One method might be to convert the number to a string, and then just work in a loop through the digits, processing as per your rounding requirements.
Other methods include working with the numbers and performing calcs on them to round.
If this isn't a homework question, it sure sounds like one!
Dave
Find Me On: Web| Facebook| Twitter| LinkedIn
CPRepWatcher now available as Packaged Chrome Extension, visit my articles for link.
modified on Wednesday, September 15, 2010 2:35 AM
|
|
|
|
|
daveauld wrote: This isn't The CodeProject Homework Hotline
You may be on to something there, but let's hide it behind a paywall and make some money!
------------------------------------
I will never again mention that I was the poster of the One Millionth Lounge Post, nor that it was complete drivel. Dalek Dave
CCC League Table Link
CCC Link[ ^]
|
|
|
|
|
I wanted to know is there any technique to create a hyperlink on a field value of one of the column on the datagrid in VB6.I mean,if we click on the field value in the colunm on the datagrid,it should open the document connected to that information.Can anyone please let me know the solution?
|
|
|
|
|
Possibly, this might help,
Private Sub DataGridView1_CellContentClick(ByVal sender As System.Object, ByVal e As System.Windows.Forms.DataGridViewCellEventArgs) Handles DataGridView1.CellContentClick
If TypeOf (DataGridView1.Columns(e.ColumnIndex)) Is DataGridViewLinkColumn Then
Process.Start(DataGridView1.Rows(e.RowIndex).Cells(e.ColumnIndex).Value)
End If
End Sub
|
|
|
|
|
Is this code applicable to VB6.How to use this code in VB6.Please explain.
|
|
|
|