Sip Posted February 14, 2002 Report Share Posted February 14, 2002 At UCLA CS, they have 2 main courses: CS 31 and 32. 31 starts with basic programming with C/C++ (much like what you would do with BASIC) and then CS 32 does the OOP stuff. You won't have much trouble understanding OOP since Visual Basic is all object oriented !!! (as opposed to BASIC, QuickBasic, GWBasic, and all the older ones). Quote Link to comment Share on other sites More sharing options...
Harut Posted February 14, 2002 Author Report Share Posted February 14, 2002 Sip jan, i remember learning that VB is NOT object oriented programming language.they say it is object-based, because it does not fully support hirarchy, so it's not OOP language. i just looked over future terms' scheduals, and there are two more courses that will teach C/C++. they are called OOP II and Advanced Programming With C.the one that i'm going to take now is called OOP I. Quote Link to comment Share on other sites More sharing options...
Harut Posted February 14, 2002 Author Report Share Posted February 14, 2002 besides programming languages, we also have a lot of System Analysis classes and Database classes. some suggest that those classes are going to be much interesting, and that it would be wise to master those areas more than solely become a programmer. what do you guys think? Quote Link to comment Share on other sites More sharing options...
Azat Posted February 14, 2002 Report Share Posted February 14, 2002 Sip, VB is not oop. In advanced VB you can pretty much write apps that are very close to being oops apps, but VB fundamentally is not. Harut, System analysis is okay. I found it interesting, but it is now great, however I personally love database coding and admin and working with HUGE databases. It is fun. SQL is a very easy and basic language, but you can do miracles with it. DBA work is very cool as well. Also, I would be scared to jump into OOP with C/C++ without having a good foundation in C. I had 2-3 years of C knowledge and experience when I had to first learn C++ and it was a challenge. Quote Link to comment Share on other sites More sharing options...
MosJan Posted February 14, 2002 Report Share Posted February 14, 2002 Harout-> SAS jan, inch anem? es HyeForum@ esents virusi nman mtela mejs, chem karum azatvem. hankarts mi or chgam estegh, yerazits Movses@ galis a, esets satanayi kotoshnerov, u sksum a indz kheghtel. asum a:"ure eir, ara!? ure eir, ara!?"de, yes el stipvats galis em.ba? esents baner. tnashen ba shut aseyir yes el gitem ban chi statsvum indz mot sirt@s hangstatsav, uremn azduma qez vra He hA ColerID ches tesel inch tsuyts talsi ??? de asem imatsy HArout Aper ^(666)^ Quote Link to comment Share on other sites More sharing options...
Sip Posted February 14, 2002 Report Share Posted February 14, 2002 Granted, VB is not trully OOP but it follows the same philosophy. You basically deal with objects each having properties (data), methods (functions) ... on top of that you have event-based control. In my experience, people who know VB can grasp OOP much much easier than people who start off (and spend years) with pure functional languages such as C. In any case, I am not a big fan of pure OOP Quote Link to comment Share on other sites More sharing options...
Harut Posted February 21, 2002 Author Report Share Posted February 21, 2002 i'm surprised!!! listen what my VB professor said just yersterday, during the last meeting before final. as he summed up the results of the term and told us what we should have learned from this course, he said something like this: "this course was not designed to teach you VB programming language. we did not attampt to make to a VB programmers. the main objective of the course was to introduce to us the basic concepts of the programming. VB was chosen for this course only because it is easy language and it is easy to show the fundamentals of the programming to newcomers". i was sort of disappointed that i didn't know this before.parzvum a, we might take real VB course later. and what should i do now? stop spending my time on VB and start concantrating on C++, or along C++ i also should keep studing VB? i'm all confused now. Quote Link to comment Share on other sites More sharing options...
Sip Posted February 21, 2002 Report Share Posted February 21, 2002 Harut jan, the more you know the better! Down the road, it is good to concentrate on one but learn a bit of everything to get a good idea of how things work. Later on, you'll realize that VB, C++, Pascal, Java, Eifel, blah, blah, are basically the same! They all fall into the realm of "context free" languages that work great for "programming" the type of computers we have. The way you write each will seem different at first, and they all have some specific differences but basically they are the same. So I'd say learn a bit of both (or others like Java as well) and then decide which one you like. VB is great for making business like applications. C/C++ on the other hand, is more general purpose and can be used for anything, especially if you want speed. It also gives the programmer much more control (over everything) than VB. Java was geared more towards the web but now it is becomming a very general purpose language. I don't like Java much and I don't believe in it. The initial commercials sounded great but it just adds too much overhead compared to C/C++. Also, industry backing (like Microsoft) will have a big impact on what will happen to Java but the way Microsoft is pushing C# (C-sharp) and C/C++, I think they are here to stay for a while ... also remember that almost all of UNIX/Linux/Windows is written in C, so C will be here for a long long time. [ February 21, 2002: Message edited by: Sip ] Quote Link to comment Share on other sites More sharing options...
Garo Posted February 22, 2002 Report Share Posted February 22, 2002 I use Delphi (http://www.borland.com/delphi) most of the time and would suggest you to take a look at it. It's not as popular in the US as in the Europe but this is only because of the marketing issues. Quote Link to comment Share on other sites More sharing options...
Harut Posted February 22, 2002 Author Report Share Posted February 22, 2002 quote:Originally posted by Sip:Harut jan, the more you know the better!Down the road, it is good to concentrate on one but learn a bit of everything to get a good idea of how things work. Later on, you'll realize that VB, C++, Pascal, Java, Eifel, blah, blah, are basically the same! They all fall into the realm of "context free" languages that work great for "programming" the type of computers we have.The way you write each will seem different at first, and they all have some specific differences but basically they are the same.So I'd say learn a bit of both (or others like Java as well) and then decide which one you like.VB is great for making business like applications. C/C++ on the other hand, is more general purpose and can be used for anything, especially if you want speed. It also gives the programmer much more control (over everything) than VB. Java was geared more towards the web but now it is becomming a very general purpose language. I don't like Java much and I don't believe in it. The initial commercials sounded great but it just adds too much overhead compared to C/C++. Also, industry backing (like Microsoft) will have a big impact on what will happen to Java but the way Microsoft is pushing C# (C-sharp) and C/C++, I think they are here to stay for a while ... also remember that almost all of UNIX/Linux/Windows is written in C, so C will be here for a long long time.[ February 21, 2002: Message edited by: Sip ]well, i guess i still have a lot to go before decideing which one is good for me.i don't know any language yet, except a bit of VB.in any ways i hope i'll make the correct desision.verchivercho, i have good friends like you guys, who will help me out. Quote Link to comment Share on other sites More sharing options...
Harut Posted February 22, 2002 Author Report Share Posted February 22, 2002 quote:Originally posted by Garo:I use Delphi (http://www.borland.com/delphi) most of the time and would suggest you to take a look at it. It's not as popular in the US as in the Europe but this is only because of the marketing issues.yesterday i picked up my books for coming term. two of which are "C++ How To Program" from Deitel & Deitel, and "Object-Oriented Programming Using C++" from Course Technology.i briefly went over the intros, and somewhere there it mentions that link. it says we can download a free copy of Borland C++ from there.i haven't checked it out yet. i'll do it now.but i don't understand one thing.does it matter which compiter i use? isn't C++ C++ whatever i use it with?i got Visual Studio 6. is it good or bad? Quote Link to comment Share on other sites More sharing options...
Harut Posted February 22, 2002 Author Report Share Posted February 22, 2002 guys, i need help with VB. i'm writing a small program for final. but i want to be a little fancy. i have wrote this. quote:Private Sub cmbResult_Change()Dim intLoop As IntegerDim intLenght As IntegerintLenght = Len(cmbResult.Text)For intLoop = cmbResult.ListCount - 1 To 0 Step -1If intLenght = Left(cmbResult.List(intLenght)) Then?????????????End IfEnd Sub what should i put instead of the question marks to set focus to a particular item in the list. can anybody help, please?thank you Quote Link to comment Share on other sites More sharing options...
Harut Posted February 22, 2002 Author Report Share Posted February 22, 2002 sorry guys, i had made mistake.here is the correct code.but i still need something for Q marks. quote: Private Sub cmbResult_Change() Dim intLoop As Integer Dim intLenght As Integer intLenght = Len(cmbResult.Text) For intLoop = cmbResult.ListCount - 1 To 0 Step -1 If cmbResult.Text = Left(cmbResult.List(intLoop), intLenght) Then ????????????End If End Sub Quote Link to comment Share on other sites More sharing options...
cis_academy Posted February 22, 2002 Report Share Posted February 22, 2002 Here is how You can find a good book on OOP[VB] steps : Type in Your browser window - Google then: Google Search - Black Book C++ then: Search Results are - Coriolis then eBookstore Barnes & Noble - C++ Black Book then: Click - Barnes & Noble.com - C++ Black Book: C++ Black Book Steven Holzner see, then: Click - Steven Holzner see: Output - Below are 1 - 25 of the 74 titles sorted in bestselling order. 1. Visual Basic 6 Black Book: Indispensable Problem Solver with Cdrom Quote Link to comment Share on other sites More sharing options...
Garo Posted February 22, 2002 Report Share Posted February 22, 2002 quote:Originally posted by Harut:guys, i need help with VB. i'm writing a small program for final. but i want to be a little fancy.i have wrote this. what should i put instead of the question marks to set focus to a particular item in the list.can anybody help, please?thank youWhat is the purpose of this sub?There are 2 ways to make an item selected1. listbox has a property that stores the selected item's index. you can change this property and assign the correct value.2. list items have boolean property 'selected' which is true for the selected item. Assign true to that item's 'selected' property and it'll become selected.I'm not sure about the exact syntax in VB. Quote Link to comment Share on other sites More sharing options...
Azat Posted February 23, 2002 Report Share Posted February 23, 2002 Harut, maybe you can say what you are trying to accomplish and I can assist you. Quote Link to comment Share on other sites More sharing options...
Sip Posted February 23, 2002 Report Share Posted February 23, 2002 quote:Originally posted by Harut:yesterday i picked up my books for coming term. two of which are "C++ How To Program" from Deitel & Deitel, and "Object-Oriented Programming Using C++" from Course Technology.i briefly went over the intros, and somewhere there it mentions that link. it says we can download a free copy of Borland C++ from there.i haven't checked it out yet. i'll do it now.but i don't understand one thing.does it matter which compiter i use? isn't C++ C++ whatever i use it with?i got Visual Studio 6. is it good or bad?That Dietel and Dietel book is excellent. That's also the same one UCLA uses to teach intro to C/C++.Visual Studio 6 is the best development environment ever made! Microsoft's C/C++ compiler is also very good.C and C++ should be the same as long as you stick to the ANSI standards. ANSI C is very well defined but C++ is still being changed. New features are being added and removed and some compilers may or may not support some features. However, almost all compilers support the basic stuff so your choice of compiler will not make a difference.The only thing is that don't confuse development environment and compiler. Visual Studio can make it seem like everything is integrated together but the complier is a separate program. Microsoft's 32-bit C/C++ compiler is called cl and you can use it to compile programs without using the Visual studio environment.Although most people will use the Visual C++ environment to work on their programs (somewhat like how you would work on a visual basic program). But at the end, CL is compiling your code into an executable.There are other compilers like GCC (gnu compiler) that I use a lot. But stick to Visual C++ since you already have it. It is very very good! (make sure you install the latest service packs from microsoft ... I think the latest is SP5. They fix a lot of bugs with the compiler). You can download Service Pack 5 from HERE (it's about 130MB) .[ February 22, 2002: Message edited by: Sip ] Quote Link to comment Share on other sites More sharing options...
Harut Posted February 23, 2002 Author Report Share Posted February 23, 2002 ok, here is what i want to do.i have a combo box, style = simple combo.it contains a lot of names.let's say:"Azat""Garo""Gnel""Harut""Movses""Sip"they are sorted.now, when the user type the first letter, let's say "G", then the first name with "G" gets selected in the list portion, which is in this case "Garo".if user types "n" next, then "Gnel" should get selected.and so on. Quote Link to comment Share on other sites More sharing options...
Harut Posted February 23, 2002 Author Report Share Posted February 23, 2002 quote:Originally posted by Garo:What is the purpose of this sub?There are 2 ways to make an item selected1. listbox has a property that stores the selected item's index. you can change this property and assign the correct value.2. list items have boolean property 'selected' which is true for the selected item. Assign true to that item's 'selected' property and it'll become selected.I'm not sure about the exact syntax in VB.yes el hents et "Selected" propertyn em uzuzum gtnem chem karoghanum.i guess there is no such a thing in VB. Quote Link to comment Share on other sites More sharing options...
Harut Posted February 23, 2002 Author Report Share Posted February 23, 2002 quote:Originally posted by Sip:That Dietel and Dietel book is excellent. That's also the same one UCLA uses to teach intro to C/C++.Visual Studio 6 is the best development environment ever made! Microsoft's C/C++ compiler is also very good.C and C++ should be the same as long as you stick to the ANSI standards. ANSI C is very well defined but C++ is still being changed. New features are being added and removed and some compilers may or may not support some features. However, almost all compilers support the basic stuff so your choice of compiler will not make a difference.The only thing is that don't confuse development environment and compiler. Visual Studio can make it seem like everything is integrated together but the complier is a separate program. Microsoft's 32-bit C/C++ compiler is called cl and you can use it to compile programs without using the Visual studio environment.Although most people will use the Visual C++ environment to work on their programs (somewhat like how you would work on a visual basic program). But at the end, CL is compiling your code into an executable.There are other compilers like GCC (gnu compiler) that I use a lot. But stick to Visual C++ since you already have it. It is very very good! (make sure you install the latest service packs from microsoft ... I think the latest is SP5. They fix a lot of bugs with the compiler). You can download Service Pack 5 from HERE (it's about 130MB) .[ February 22, 2002: Message edited by: Sip ]thanks Sip.i have been downloading that thing you are talking about for 4 months now. i reach 15% mark finally. Quote Link to comment Share on other sites More sharing options...
Sip Posted February 23, 2002 Report Share Posted February 23, 2002 Harut jan, I just wrote this code which I think does what you are asking. Just copy-paste it code into a text file, call it something like list.frm, and open and run it in VB. It basically lets you add items to a list, and then select either the next item or the previous item. Is this the "select" you are asking about? code:VERSION 5.00Begin VB.Form Form1 Caption = "Form1" ClientHeight = 1890 ClientLeft = 60 ClientTop = 345 ClientWidth = 3210 LinkTopic = "Form1" ScaleHeight = 1890 ScaleWidth = 3210 StartUpPosition = 3 'Windows Default Begin VB.CommandButton Command3 Caption = "Select Prev" Height = 495 Index = 0 Left = 1680 TabIndex = 3 Top = 1320 Width = 1455 End Begin VB.CommandButton Command2 Caption = "Select Next" Height = 495 Left = 1680 TabIndex = 2 Top = 720 Width = 1455 End Begin VB.CommandButton Command1 Caption = "Add Items" Height = 495 Left = 1680 TabIndex = 1 Top = 120 Width = 1455 End Begin VB.ListBox List1 Height = 1620 Left = 120 TabIndex = 0 Top = 120 Width = 1455 EndEndAttribute VB_Name = "Form1"Attribute VB_GlobalNameSpace = FalseAttribute VB_Creatable = FalseAttribute VB_PredeclaredId = TrueAttribute VB_Exposed = FalsePrivate Sub Command1_Click()newItem$ = "Item " + Str(List1.ListCount + 1)List1.AddItem (newItem$)End Sub Private Sub Command2_Click()If List1.ListCount > 0 Then sel = List1.ListIndex sel = sel + 1 If sel >= List1.ListCount Then sel = 0 List1.Selected(sel) = TrueEnd IfEnd SubPrivate Sub Command3_Click(Index As Integer)If List1.ListCount > 0 Then sel = List1.ListIndex sel = sel - 1 If sel < 0 Then sel = List1.ListCount - 1 List1.Selected(sel) = TrueEnd IfEnd Sub Quote Link to comment Share on other sites More sharing options...
Harut Posted February 24, 2002 Author Report Share Posted February 24, 2002 Sip jan, that wasn't quite what i wanted but it helped me see how the Selected property works. now i think i know how to do what i wanted to do. so i'll post it to show you shortly. Quote Link to comment Share on other sites More sharing options...
Harut Posted February 24, 2002 Author Report Share Posted February 24, 2002 ok guys i found it!!! here is what i wanted to do so long.this time i used a text box and a list box.before i was using a simple como box, but unfortunatly it doesn't support the Selected property. .anyways. i guess i have to use separate text box and a list box. thanks for your help people. quote: VERSION 5.00Begin VB.Form Form2 Caption = "Form2" ClientHeight = 1920 ClientLeft = 60 ClientTop = 345 ClientWidth = 3855 LinkTopic = "Form2" ScaleHeight = 1920 ScaleWidth = 3855 StartUpPosition = 3 'Windows Default Begin VB.ListBox lstTest Height = 1230 ItemData = "Form2.frx":0000 Left = 120 List = "Form2.frx":001F TabIndex = 1 Top = 600 Width = 3615 End Begin VB.TextBox txtTest Height = 285 Left = 120 TabIndex = 0 Top = 120 Width = 3615 EndEndAttribute VB_Name = "Form2"Attribute VB_GlobalNameSpace = FalseAttribute VB_Creatable = FalseAttribute VB_PredeclaredId = TrueAttribute VB_Exposed = False Private Sub txtTest_Change()Dim I As IntegerDim L As Integer L = Len(txtTest.Text)For I = lstTest.ListCount - 1 To 0 Step -1 If LCase(txtTest.Text) = LCase(Left(lstTest.List(I), L)) Then lstTest.Selected(I) = True End IfNext IEnd Sub Quote Link to comment Share on other sites More sharing options...
Garo Posted February 24, 2002 Report Share Posted February 24, 2002 quote:Originally posted by Harut:ok guys i found it!!!here is what i wanted to do so long.this time i used a text box and a list box.before i was using a simple como box, but unfortunatly it doesn't support the Selected property. .anyways. i guess i have to use separate text box and a list box.thanks for your help people. To make an item selected in combobox you use its TextColumn property.From the VB help file: When the user selects a row, the Text property of the control is set to the value of the column identified by the TextColumn property. In a combo box, the system displays the column designated by the TextColumn property in the text box portion of the control. Quote Link to comment Share on other sites More sharing options...
Azat Posted February 25, 2002 Report Share Posted February 25, 2002 Harut,Sorry for the late reply. The ".Text" property of the combo box will give you the item that is currently selected. Also I think what you are trying to accomplish can easily be done by just changing the combo box "style" property to a dropdown list. One warning, when it is a list you cannot add new items to your list, you have to do it programmatically. Hope that helps.Azat Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.