|
Hi,
You are correct to some extent. You can move on to develop a software following the steps :
1. Analyzing the needs of the solution and prepare any relevant documentation on the to-do stuff. (Requirement Gathering)
2. Identify the Design Pattern, Technology etc. to be used for the development considering the scenario, requirements.
3. Once you are done with this, you can move on to prepare the prototype of the application. i.e. The general skeleton of the
working model of the software.
4. Develop the code with OOP concepts. i.e. Modularity, Re-usability etc.
5. Test the code as you develope. It is a good habit to test the code at every level.
6. Give the first release to the client. (User Acceptance Testing)
7. Let client evaluate your software. If they are ok with the functionality and everything, Prepare the final release (GO Live!!!!)
For more info refer :
http://www.exforsys.com/tutorials/programming-concepts/software-development-life-cycle.html[^]
Is it a necessity to develop new classes? Couldn't one use already developed classes or just subs and functions reside in some modules?
Ans : Software Developers follow the principle of Re-usability. i.e. You develop the modules in such a way that they can be used from some other
applications also. It reduces the time needed to develop the softwares. You should not start from scratch always. Always look for the
pre-developed components and make use of them.
What percentage of total-time would each one of the development phases take?
Ans : There is no clear answer to this question. It totally depends on the size of the software. Sometimes it is task of month, sometimes even
the years are less to complete the development.
|
|
|
|
|
Since Pravin has already set some things straight I'll just tell you this, with your 5 point plan you've already shown me to be a candidate to be a good developer someday. I deal with people that think they are developers on almost a daily basis and they still haven't grasped the concepts you roughly outlined.
My advice to you: Never stop learning, never stop improving on your skills!
|
|
|
|
|
It is not always necessary to develop new classes, but that is better than creating slow bulky classes that are very general.
This depends on your role and the organization. In general (assuming you are not doing complicated multi-threading), you are NOT going to spend as much time on documentation unless you are a low level grunt or you are a system architect giving high level instructions to your subordinates.
Your code should be self-documenting with variable names that make sense unless your aim is to try to increase job security by writing code that no one else understands or wants to use.
|
|
|
|
|
hahaha
I have never thought of that side effect concerning the use of the variables...!
Thank you all for your enlightening opinions.
|
|
|
|
|
I didn't find a suitable forum to ask this so I ask for your superior experience and knowledge.
I have been commended the task of building some sort of "automation" for one report we usually hand in the form of units required to satisfy a given demand on a given product. All needs to be done in Excel though
So, situation is like this:
I have an spreadsheet which contains the given demand of a finite number of artifacts, handled by product code, and with dates and expected pieces for this dates:
Model 4-Jan 11-Jan 18-Jan 25-Jan 1-Feb
WFW8300SW 198 11 20 35 0
Each product code has a corresponding catalog of components for this product, which goes in another spreasheed given the following format:
WFW9550WL
item description qty
W10270180 Some silly piece of Machinery 1
This spreadsheet contains all product codes and component codes in the same 3 columns.
Finally, in this same second workbook, there is an spreadsheet which contains the components for the component code's component! ( ) in the following arrangement:
PartNo Description Supplier Family W10159465 W10261477 W10074160 8540050
W10270180 PPGV30 WPenn Family1 5 10 0 1
What is the expected result? Easy, the amount of pieces of pieces's pieces and their codes of course XD
First of all, could it be possible to do in VB for Applications alone? May be that is late at night but I got stuck on here. I'm also trying with a Office solution but may be lack of understanding of the component model that I haven't figured this out. If you have any suggestions, all are well accepted
If I come with a solution before, I'll let you know and even post the resulting code in case anyone faces a similar requirement
Thanks CP! Good night, and good luck!
moved on Wednesday, January 19, 2011 2:04 AM
modified on Wednesday, January 19, 2011 9:59 AM
|
|
|
|
|
You are looking at a Bill of Materials.
Each Top Level Item Has a Collection of Children, who have themselves a collection of children. That should give you a clue.
Class SomeProduct
Public _components As List(of Component)
...
End Class
Class Component
Public bom As List(Of things)
End Class
Class Components
Inherits List(Of Component)
...
End Class
...
Use something like this and populate from the data to build the report? Very easy to do with a "real" database.
I don't speak Idiot - please talk slowly and clearly
'This space for rent'
Driven to the arms of Heineken by the wife
|
|
|
|
|
Hi,
I have developed an email program to send emails to users at end of the daily based on the data I have in database. I want to schedule this program in a PC. When I did a test run from that PC I could not get mails from my program. But it is working fine on another computer. Could anyone let me know what are the system requirements for my email program to work correctly. To my uunderstanding we should have SMTP server. How to install/configure SMTP server on the PC.
my email code is as follows
Dim iMsg As New CDO.Message
Const cdoSendUsingPort = 2
' Apply the settings to the message.
With iMsg
.To = Recipient
.From = Sender
.Subject = Subject ' "This is a test CDOSYS message (Sent via Port 25)"
.HTMLBody = strHTML
.Send
End With
Regards,
Uma
|
|
|
|
|
That depends on the user account your app is running under. For example, if you're using Exchange, you need to setup an Exchange account for the user account that your app is running under.
|
|
|
|
|
We are using exchange server. thank you for your response.
Regards,
Uma
|
|
|
|
|
It's not usual to find the answer within the question:
Uma Kameswari wrote: .Subject = Subject ' "This is a test CDOSYS message (Sent via Port 25)"
So, prerrequisite for this code: port 25 must be opened.
But port 25 is not usually opened. Some ISP's close it to avoid spam so I guess you should try another port, and maybe SSL, to make sure your emals will be sent. There are several articles here at Code Project that might help you. Search "SMTPClient" and have a look.
|
|
|
|
|
Hello to everybody!
I managed to write a VB6 application an context sensitive help.
I am able to call and open the correct page inside the CHM file.
I am using the code found at http://support.microsoft.com/kb/315988[^].
When I open directly the CHM file from explorer, it will work, and in the search tab I can enter text and get results.
Now to the problem: when opening the same CHM from the application (F1), the search tab is there, but no text can be entered.
I have also a page inside the CHM with some java script and an form with input type="text". This works fine opening the CHM directly, but when called from the VB6 application, I can press form button it will execute the onclick event, but I can't enter a value in the textbox (in other words: java script itself is not blocked).
MJsDiag reports no problem. I tried also http://www.ec-software.com/products_hhreg.html[^]
So I think the problem is not the CHM but somewhere else.
Any Ideas?
Edit: sometimes, starting from the VB6 application, if I open the CHM, close it and open it again the search start working.
I did not found how exactly reproduce this systematically...
I am calling the CHM from a DLL, I have a helper class where in the Class_Initialize() I initialize the help system like this:
App.HelpFile = App.Path & "\help_file.chm"
Call HTMLHelp(objForm.hWnd, App.HelpFile, HH_INITIALIZE, ByVal "starting_page.htm")
It seems that if I start the application and just use the mouse and hit F1 it's not working, but if I type before something and then hit F1 it works????
Can, Could this be?
Edit2:
Added this code to the form load routine: now search in help works....
Me.Visible = True
txtBox.SetFocus
Strange world, can someone give me an explanation of this behavior?
modified on Friday, January 14, 2011 11:48 AM
|
|
|
|
|
Hi, I have Win XP Pro SP3, and one of the command line programs I regularly run has an initial message which requires the user to press a key to get past it; and it doesn’t accept keyboard redirection, i.e. something like “program.exe < cr.txt” at the command prompt doesn’t get past the message.
In VBscript I have found that the following usually works:
Set oShell = WScript.CreateObject("WScript.Shell")
oShell.Run "program.exe arguments & pause"
WScript.Sleep(3000)
oShell.Sendkeys"{ENTER}"
(despite a VBSCRIPT book I have saying that Sendkeys can’t be used to send keystrokes to a non-Windows application).
However once in a while the program generates a whole lot more initial messages and takes more than 3 seconds to get to the point when you can press a key, and if possible I want to expand the script to run the program a second (and third, and …) time, after the first run finishes.
Hence, is there some way for the script to be able to “read” the text in the command prompt window generated by the “oShell.Run” statement and search for “press any key to continue” (or similar), before issuing the sendkeys method (and similarly, search for an “end of program” type message before running it again)?
I also have VB6, so if there is some way to do this in VB6 but not VBscript, I could change to using VB6.
|
|
|
|
|
You can use WScript.Exec to launch your command window, which will return a WshScriptExec[^] object and give you access to its StdOut and StdIn streams. StdOut is the stream of output from your launched program and StdIn is the keyboard that your code uses to type in the console. You don't need SendKeys at all.
|
|
|
|
|
Thanks for the suggestion about WScript.Exec. I have been trying it out over the last couple of days, initially with not much success, partly due to the fact that I have been unable to find any reasonable documentation on StdOut and StdIn – I could basically only find example bits of code in places like script56.chm and Microsoft Technet, which didn’t work with my application. However after much trial and error, I have basically got it working.
But I couldn’t get StdIn to work at all – it wouldn’t pass keystrokes to my command line program. Hence I have continued to use SendKeys to pass keystrokes to the program, after reading StdOut to determine when to issue the keystrokes. And I have found that I had to introduce a slight delay (Wscript.sleep 100) before issuing the keystrokes – if I didn’t, sometimes it worked and sometimes it didn’t. A disadvantage of Exec compared to Run is that with Exec, the output of the command line program wasn’t displayed in the command window (it is with Run), so I have copied it from StdOut to the window with Wscript.Echo.
Hence I think I have now got the basis for something that should work as I want, although it needs more work. Thanks for your help.
|
|
|
|
|
What is the best way to check for a particulair file in a folder?
e.g. I want to count the number of files that start with say "temp" and have an extension of txt.
In this example
Folder = Temp
Files = temp01.txt, report.txt, temp02.txt.
In this example we would return a count of 2
|
|
|
|
|
Central_IT wrote: What is the best way to ...
Depends on your definition of best.
The easiest way would be based on the Directory.GetFiles(String, String) method, taking the Count of the array being returned. This however is not the least expensive one in terms of system load, as it is building an array of strings, which potentially could be huge and take long.
The cheapest way would probably be based on calling the Win32 functions GetFirstFile() and GetNextFile() , which requires P/Invoke and a bit more code.
Luc Pattyn [Forum Guidelines] [My Articles] Nil Volentibus Arduum
Please use <PRE> tags for code snippets, they preserve indentation, improve readability, and make me actually look at the code.
modified on Friday, January 14, 2011 6:27 AM
|
|
|
|
|
Hi All,
I would like to know, how can I detect whether an application is already launched?
I need to enable some function according to this checking, can some people help?
thanks so much.
|
|
|
|
|
The preliminary question is: how do you identify your app?
You could use Process.GetProcessesByName() to check for a specific process name; process names normally get derived from the EXE's file name (which can easily be modified!).
A more reliable approach, if you are the author of the app, is by using a system resource (e.g. a Mutex) with a chosen system-wide name; you then check for the existence of that Mutex. This is how "single instance applications" normally do it. You may want to read this: A Pure .NET Single Instance Application Solution[^] or some similar article.
Luc Pattyn [Forum Guidelines] [My Articles] Nil Volentibus Arduum
Please use <PRE> tags for code snippets, they preserve indentation, improve readability, and make me actually look at the code.
|
|
|
|
|
Thanks for your infomation, Luc.
I'm using your approach, and it works fine.
I just got another question, if the PC is a remote server that different user may login to the server and launching the same application. May I use the same function to detect what specific user is launing the application ?
thanks
|
|
|
|
|
application event:
Private Sub MyApplication_StartupNextInstance(ByVal sender As Object, ByVal e As Microsoft.VisualBasic.ApplicationServices.StartupNextInstanceEventArgs) Handles Me.StartupNextInstance
End Sub
can that help?
|
|
|
|
|
I have a listview with values
Salary Name Department
2000 Peter Accounts
1000 Anne Sales
If I want the salary, I have the following code that works
MsgBox(lvwListView.SelectedItems(0).Text)
This gives me a value of 2000.
What is the code if I want to display their Name or the Department instead of salary
|
|
|
|
|
Use the SubItems collection of the ListViewItem[^].
I must get a clever new signature for 2011.
|
|
|
|
|
Try changing the selected items to 2
ie
MsgBox(lvwListView.SelectedItems(2).Text)
You should also be able to refer to the name of the field ie
MsgBox(lvwListView.SelectedItems("Department").Text)
Cheers
Ants
|
|
|
|
|
Hi,
I am working Access 2007. I am using subforms as datasheet view. I am embeding this subform to another main form. In main form this subform displays like Gridview, behind this i have some text box control on the main form.
when i am selecting the records from the subform, the respective records will be bounded to the textbox boxes which is on the same form(Main),
The problem is clicking on the cells is perfectly working, but when i click the left side column (default) as soon as i click any cells its not working, the respective record will be the bounded
to the textbox boxes but the respective selected row from the subform is not highlighting instead of highting the same row .
private sub Form_current()
Form_frmFundGroup.Filter = "Id = " & Me![Id]
Form_frmFundGroup.FilterOn = True
end sub
the above code is for subform to bound the data as per the selection on the subform(gridvew)
how to resolve this can u anyone give me suggestion plz...
kannak
|
|
|
|
|
|