Implement A Controlling Design Logic That Prompts The User For A Length And The Area To Calculate?
Aug 12, 2009
I am trying to implement a controlling design logic that prompts the user for a length and the area to calculate until he or she enters a number less than zero in the length to end.So far I have it where I believe it�s doing the calculations but it�s not ending when I input a number less than zero or zero.
Sub Main()
' Declare Length As Float
Dim Length As Double
' Declare s, c, t As Float
[code]....
View 4 Replies
ADVERTISEMENT
Nov 20, 2009
im trying to make a a rogram that will calculate the area of a rectangle based on the lenght and
width given by the user
[code...]
View 4 Replies
Mar 17, 2009
I'm sure this should be easy but I'm having trouble getting my head around it. I shall try to explain what I need as best I can.I have a string called SoftwareGroupName. If that string is empty, I need to run some code that logs a call in our Helpdesk. So far, so simple.I then check two other variables, AuthorityLevel and InstallType. If the AuthorityLevel is anything other than "OnRequest" then a call is logged in the Helpdesk System. Again, so far, so simple.
The problem occurs when the AuthorityLevel is "OnRequest". At this point, the application should again log a call in the Helpdesk Call with a status of "Resolved" as well as add the user to the relevant group in Active Directory.What I need to be able to do is, effectively, say "If the AuthorityLevel is OnRequest and SoftwareGroupName is not empty then go ahead and create the call and update the group. However, if softwaregroupname is empty then DON'T even try and update the group and create a call with a different status (e.g. Assigned).Here's what I'm doing so far. But it seems wrong to have to check that SoftwareGroupName is empty twice.
[Code]...
View 4 Replies
Apr 10, 2012
I want to create a logic to calculate the age and unit from entered birth date. eg: If the difference between birth date and current date is >= 24 months, I will want it to display the age in years. If >= 8 weeks, I will want it to display it in months and so on here's my code
[Code].....
View 9 Replies
Jan 26, 2012
I am going to be creating an application which will monitor a folder, which could be a network folder and when new files are added in that folder it will notify the application. On notification application will import those files names into a listbox and will give the option to user to organize(move) those files into a different directory.
1. I have to implement a logic for monitoring the new files in the folder.
2. I have to move it into new directory and in some cases I will have to create those new directories as user specify.
For the first step I am confused to either implement it as a windows service using FileSystemWatcher class, example can be seen here. [URL] or do a file check based on timer, lets say every 5 minutes. If I do it as a service how can the service notify application?
View 1 Replies
Aug 16, 2010
I have tried searching all over the web for this logic. Got many but half of them did not match what i was looking for and half were malfunctioning.I want to calculate business working hours between 2 datetime, where in I should be able to set the working hours as well as weekends and holidays should not be calculated.
View 7 Replies
Nov 16, 2011
-Create an application that prompts the user for a number less than 100 and then when the button [Check Number' is clicked - displays whether the number is one digit or two digits.
View 6 Replies
Feb 7, 2012
I'm writing the following bits of code for a SaveFile Dialog box in Visual Basic 2010.NET. The code works well as the XLSX file is created and opens in Microsoft Excel. However, the problem that I am having is that if the program overwrites a file, the user is getting two prompts. One prompt is from the program's own SaveFile dialog confirming the choice. The other is from Microsoft Excel asking you the same. It's as if the program is running in the background. Does anyone know how I can write this code to save the file as an Excel file? [Code]
View 1 Replies
May 25, 2010
I'm trying to create a program that does the following:Executes the following command line string (wmic /node:computername bios get serialnumber)Prompts user for the "node" entry Displays the resulting serial number in a dialog box I'm a bit of a noob at this (I haven't coded anything in VB since early 2000s) so I'm at a bit of a loss where to start. I plan on including some functions to submit the node entry and the resulting serial number to a database in the future for archiving as well.
View 4 Replies
Feb 18, 2009
I have to create an application that prompts the user to enter today's sales for five stores. The program should then display a simple bar graph comparing each store's sales. Create each bar in the bar graph by displaying a row of asterisks (*) in a list box. Each asterisk in a bar represents $100 in sales. I have to make two different versions of this program. One using a "do while ... loop" and the other using a "for ... next loop". Could someone give me a hint on how to do this. I the "do while ... loop" version and I have had some problems, especially with converting the numbers to asterisks.
Private Sub btnDisplay_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnDisplay.Click
'Clear everything
[code]....
View 5 Replies
Jun 5, 2011
this is my first vb. and i have assignment and i have been trying for hours but i couldn't do it right I have to create an application that prompts the user to enter today's sales for five stores. Create a loop to prompt for an amount for the first store using an inputbox and do not exit until you have good data. The inputs cannot be negative or greater than 5000, but may contain decimal values. The program should then display a simple bar graph corresponding to the amount of sales using a row of asterisks (*) in a listbox. Each asterisk represents $100 in sales. Display the total of all the stores by looping this process for each store.
[Code]...
View 2 Replies
Jun 14, 2009
I have an assignment and I have to calculate the area of a circle. I have my textboxes and buttons but I don't know how to write the codes and I have followed the directions and the example in my book which is microsoft visualbasic 2008 step by step.
View 2 Replies
Jun 11, 2011
Since we have to resize the combo box dropdown area based on the combo box item length, used the drawstring() to add items to combo based on the item length. This gave us the below issue: On moving the cursor on the drop down area the font color and the background color are back hence the text is not readable (i.e. the whole item becomes black).
Below piece of code is used to achieve this,
Private Sub cboClient_DrawItem(ByVal
sender As
Object,
ByVal e
As System.Windows.Forms.DrawItemEventArgs)
[Code] .....
We tried changing font color and the dropdown area backcolor on selecting a particular item. How to make the text readable (i.e. the font color should change while if we scroll on the item).
View 2 Replies
Jul 31, 2009
Something happened to my project and it got all messed up. I am not sure what happened, but the form I was working on only shows the code and not the project itself(where you design it). I am working in VB2008 Express Edition and do not wish to start over. What happened to my form?
View 6 Replies
Nov 14, 2010
how to implement a classic layout design in vb.net (2.0).The application design is the classical toolbar panel at the top and different panels stacked at the bottom. Depending on the button pressed at the top in the toolbar panel a different panel at the bottom will be available.This is thought to have different part of the software available on different panel but with the toolbar panel always available at the top.To implement this I thought:
1) one tablelayout with 2 rows. First row contain a panel with the button (toolbar panel) and adding/removing hte correct panel requested on the bottom row.
View 2 Replies
Apr 21, 2009
Recently I needed to compare a suggested pattern for IDisposable and object finalization with the auto-generated one we which VS2005/VB.NET provide. We have used the auto-generated one a fair bit, but after looking it the two side by side I had a number of questions about the VB.NET implementation..
[Code]...
Overall I am confused by the supposed added value of having an extended code-path that executes when Dispose() is called explicitly(as opposed to having a common path that is executed regardless of whether or not Dispose() was called explicitly). how it does anything other than delay the actual release of managed resources if Dispose() isn't called directly. In essence it seems to only work to make the managed resources unreachable in the object graph, orphaning them until the 2nd GC run rather than freeing them at a point where they are known to be no longer needed.
View 3 Replies
Jul 11, 2011
I'm trying to design cathodic protection for offshore pipelines using visual basics. However, I'm not very familiar with vb. I'm hoping I can start with basic calculations like finding pipe surface area etc. how I can design a dialog box to input pipe dimensions like length and diameter to enable me calculate the surface area?
View 4 Replies
Mar 10, 2011
I have built some simple software using vb2008 and excel to automate the process of ordering material and keeping track of work in progress at my business...Once the product is complete, it moves into a stock room and waits for invoicing.I have a dedicated accounting package that is far more advanced than what I can program...I want to know if there is a way to control this package as if a user was moving around the screen and clicking and inputing info?Or another means of control?
View 5 Replies
Apr 11, 2011
I am currently working on some software for a taxi company, and we have been asked to create a webbrowser (only simple) for the users which we allow to use it, to view traffic updates from a website that we already know about.
But...
We dont want them to be able to navigate away from this site via links to google adverts Etc...
Basically we don't want them to be able to surf the net at all, only be able to work!
View 2 Replies
Sep 20, 2011
I have a dynamic webpage that loads a user control multiple times, including loading the user control within itself as many times as needed. Within the user control there are four controls: Title Label, Repeater, Placeholder and within Repeater a AjaxControlToolkit Rating control.
The structure can look like the following:
Webpage
Placeholder
UserControl (repeater hidden, no data)
Placeholder - [UserControl]
[code]....
how do I efficiently loop through this type of structure to find the rating controls?
View 2 Replies
Jul 30, 2009
I am looking for logic that converts an incorrect user input to a correct integer input. For example, a user might mistakenly type in letters within an integer input and the logic changes that input to the correct form(integer).
View 3 Replies
Aug 20, 2011
Ok so I have designed a program to figure out commissions for phone sales at my company. Since the devices we sell and their associated prices change over time, I had to make that data within my program dynamic. I have a form within my program (frmprice) that has 160 textboxes - 80 for the devices and 80 for the associated prices. Now I hard coded the .text members with default values for our current stock of phones and prices.
I also added code so whenever that form with the phones and prices (frmprice) closes it saves any changes that have been made to either the phones or prices and when the form loads it overwrites the default data with any data that the user had entered at last run.
HERE is my logic problem. At the very first run the program is overwriting the default hard coded values with "" because no user data has ever been entered before. So when the form with the prices loads, it passes the user entered data from last run which is null because it has never run before. If I test to see if default value <> the user entered data before it executes the code to pass the user entered values it will always test to be true because the user entered data is null at first run. If I test to see if the default value is = to the user data it will always at first run test to be false because there is no user data yet.
HOWEVER once the user entered data is initialized (anytime after the first run) I need the program to pass the user data from the previous runs back in. Just NOT at the first run. Here is the code i am using: (in the code below the variables ending in "val" are the ones that are of the type string and are saved in the application settings) The frmprice_Load Event:
[Code]....
View 3 Replies
Oct 10, 2011
I need some help working out the logic when retrieving specific times from a userform I have created. In my userform, users are required to input a start and a end time in 24 hour time format. I am struggling to work out how best to analyze the selected times in order to multiply them by a set of rates, the rates are quite simple:
DayHours rate (day time is between 07:00 - 22:59)
NightHours rate (night time is between 23:00 - 06:59)
I cannot workout the logic to ascertain how many hours have been selected for which rate in an elegant manner, my best attempts so far are clunky and not quite there.
View 6 Replies
Jan 3, 2012
I have a picture in my picturebox. In that picture, I need to draw a straight line between two points and calculate the length of that line (probably in pixels). Is there any suggestion how to do it?
View 2 Replies
Nov 26, 2011
[code]...But, when someone else runs it their user name won't be the same as mine, so only people with the account name ADAM would be able to run successfully Is there a code so instead of me putting adam there is a code that will choose the user that the program is being run by?
View 9 Replies
Apr 7, 2011
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)
'Creates a string that holds the path to your file.
'this path uses the Special Dir .MyDocuments
'so on my computer LogPath = "C:UsersTechNoHickDocuments"
'on your computer LogPath might = "C:UsersKirbyDocuments"
Dim LogPath As String = String.Format("{0} est", My.Computer.FileSystem.SpecialDirectories.MyDocuments)
Dim FileName As String = "test.txt"
[Code]...
I am using visual basic 2010 express and would like to know how i can use a text box of sorts or windows explorer function to allow a user to save a file to a location of their choosing.At the moment a folder and .txt file is created in the mydocuments folder of the user's computer using this code
View 2 Replies
Mar 14, 2012
i want to give the ability for a user to drag an area on the screen that they want and a that area to be print screened. or alternativly they click anywhere and that location is the top left of the box and then when they next click that location is the bottom right of the box and that box is print screened. [code]
View 1 Replies
Jun 11, 2011
If I create a save a text file, how do I get my application to save it into the end users directory?
Ive current got this which saves into my user area.
file = My.Computer.FileSystem.OpenTextFileWriter("C:Users#####FruitFruit.txt", False)
View 6 Replies
Feb 8, 2011
screenshot function in my application. This is what I currently have:
vb
Dim bounds As Rectangle
Dim screenshot As System.Drawing.Bitmap
[Code]....
But instead of taking a picture of the whole screen, I want to just take a picture of an area the user chose. When the user presses the start point, I would like to have a rectangle drawn to the place where the user presses the end point. And then take the picture.
View 2 Replies
Jun 16, 2011
how do I adapt the my application area to the user's monitor resolution?I have created a winForms application on 1280*768 resolution monitor and the application is generally used on smaller laptops (10inches). Now I need to a scrollbar on my entire application so that the spacing remains the same as I have designed. For this, there has to be a scrollbar (Both Horizontal and Vertical) on the application.
View 1 Replies