School Assignment - Drawing A Filled Box
May 8, 2009
Hi, I am currently working on a school assignment where I have to draw a house. I cannot figure out how to draw a filled box on the Form using my mouse. I have figured out how to get my pointers X,Y coordinates assigned to variables to be used, but I do not know what code to enter to draw a filled box.
My code is below
CODE:
View 2 Replies
ADVERTISEMENT
May 20, 2011
I have to make a visual basic program for a school assignment. I am an absolute beginner at it though, but am willing to learn.I have to make an income calculator for farmers that make giant turnips.
So basically:
1. If the turnip weighs less than 350kg, the farmer will receive $2 per kilo
2. If the turnip weighs 390 or more, the farmer gets $1.50 per kilo MINUS $180 for a maintenance fee.
3. If the turnip weighs between 350 and 389kg, it has to be sent to a paddock that costs $25 per week for lease. Turnips loose 1% of their mass per week in this paddock. When the turnip gets below 350kg it can be exported. As ships depart weekly, turnips may drop a bit below 350Kg before departure.
Create a profit calculator for the turnip farmer for a list of cattle weights.
Functional Requirements: oEnter the weight of each cow into an array oCalculate the income from each cow and store in another array oAdd up the values in the array and display total income.
View 1 Replies
Nov 18, 2010
I'm a student taking a beginner computer programming course. My teacher told me to use this website if I have any questions. The lesson I have just studied is about the different types of applications in VB.NET. My assignment asks me to "Give at least five examples of each type of application." I'm supposed to do a web search to find these. The different types of applications I'm supposed to find examples for are: Console, Window, Web, Class Library, Control Library, and Smart Device. Then I'm supposed to provide a description or a screen shot of each example.
I hope my question isn't considered too simple for this forum, but I don't know what else to do! I've spent a long time trying to search for examples myself and I can't seem to find anything.
View 1 Replies
Jun 3, 2012
draw individual pixels, without resorting to drawing a line and setting it's length to 1. Is there an actual ability to draw a pixel that is just 1 pixel big?
View 2 Replies
Feb 18, 2012
I need some code to draw a resizable, draggable rectangular cursor (or selection box) on a picturebox. I found some excellent code (albeit rather old) that does just that, but on a form rather than a picturebox. I have tried converting the code - basically moving things to the picturebox events (Paint, MouseDown, MouseMove etc). It nearly works but leaves a trail behind it when you move or resize the cursor. In other words, the selection rectangle is not being erased before being drawn in the new position.
Is there some fundamental difference between drawing graphics on a form and drawing on a picturebox that would cause this behaviour? Something like, when you invalidate a form and cause a redraw it erases what you did last? If not, then I just need to dig a bit further and work out how the cursor is being erased from the previous position.
Here's the original code that works fine on a form:
Private DragRect As New RectangleF(20, 20, 100, 80)
Private Adornments(7) As RectangleF
Private MouseInRect As Boolean = False
[Code]....
View 1 Replies
Jan 22, 2006
Where can I find some books that might be used at the High School level to teach students programming using Visual Basic from the ground up, assuming no knowledge of programming?
View 5 Replies
Jun 21, 2010
Say I have 3 Buttons, labelled: Unit 1, Unit 2 and Unit 3. When I click on any button I want a drawing of that unit to appear on screen at a pre-specified starting point. Thereafter when I press any other one of the buttons the unit drawings appear alongside each other in a line. So I could end up with:
[Code]...
View 4 Replies
Aug 17, 2009
With this line...
If PictureBox1.Image = My.Resources._2star Then
I get this error: Operator '=' is not defined for types 'System.Drawing.Image' and 'System.Drawing.Bitmap'.Is there another way to say = with images?
View 8 Replies
Dec 29, 2010
I want to generate a TimeTable for School autogenerate.how i can generate it with Any algorithm? and which algorithm can i use for it?is any Prepare Algorithm is available for generate it?
View 1 Replies
Dec 6, 2010
Iam doing a project for school (snake game) Ok here is the code:
[CODE]:................
Snake.image is the head of snake and snake2.image to snake27.image are the rest(body...) So i want create a code that (if snake intersect snake2 to snake27 parts) then timer1.stop I have tryed with:
CODE:
But it doesnt work..
View 6 Replies
Jan 11, 2011
I'm wanting to add two forms to my project that will allow me 1) Pull all the current MS Updates installed and list them in a nice looking grid, 2) Pull a list of all the available updates for the machine. I would love for this to work on XP/Vista/7.
View 5 Replies
Nov 10, 2009
I am an aid in a technology classroom at a middle school. They have 12 computers that must be logged into everyday. The teacher has given me the password to log in the computers for the students, because he doesn't want them to know it. The teacher's computer is linked to the other 12. I was wondering if it is possible to develop a program that has a list of the 12 computers with 2 fields, one for user name and password. These for each computer. You would enter the username and password and it would log in the computer. This would be done from the teacher's computer. It would make it a lot easier than having to go around and log in those computers. [URL]..
View 17 Replies
Mar 29, 2010
how can made school project in vb6 and vb.net2008 with full sources code?How can Made School project in Visual Basic 6 or 2008?
View 2 Replies
May 21, 2012
I am working on an Examination system for a secondary school. The system captures the marks of students of the subjects they take and stores them in the database. from there, it has to compute the grades of marks for each subject that a student takes and get the position of that student in the stream and in the class.
For the gradeing part of it, I have already made it, my problem is to get the positions of students and show them on the rdlc report.
The word class and stream here, I mean;
The school has six classes, senior one/form one TO senior 6/form 6 as classes and each class(form) for example senior one has 4 streams. By streams, I mean; Students are grouped into different streams but under one class(level/form).
for example; form1 A TO Form 1 D that is one class/form secondary level. form 2 also has four streams ( form 2A, 2B, 2C, 2D) and so on. So a student can be number one in his stream but if the marks are compared to other streams of thesame level, he is number 3. it is indicated on the report as Position in Stream 1...........Class 3
View 8 Replies
Mar 4, 2011
im working on a school project where i shall show/explain how a remote acess program work and i coded the most but when want to send all listbox items from server to the client and in the client is another listbox where it should be transfered over..[code]
View 4 Replies
Jul 19, 2009
I am only allowed to use HTTP in my school (ie, no FTP is allowed). and i have to upload some file from a specific folder on my PC to a web page at 1 hour intervals automatically (ie, every hour a file is dropped into that folder, and i have to get a windows service or desktop application that would automatically detect the new file, and the file finally show on my website page, hosted on the school server.) Remember, the files reside in a folder called DAT on my personal computer in my office.
View 4 Replies
May 23, 2009
Is it possible to convert an object form System.Drawing.Graphics to System.Drawing.Image?
View 4 Replies
Jan 21, 2010
Here is my favicon code
Dim oURL As Uri = New Uri(e.Uri.AbsoluteUri)
Dim favicon As Image
If oURL.HostNameType = UriHostNameType.Dns Then
[code]....
The error is Value of type System.Drawing.Image cannot be converted to System.Drawing.Icon Is it even possible to make the favicon be the icon of the form?
View 4 Replies
Jan 27, 2012
I'm trying to make an HTML editor for my school project. color coding the text so if they type <html>, <b>, <body> in any case it'll color code it to turn blue.
View 5 Replies
Jan 15, 2011
I am basically 4 weeks into my first ever programming class and we are working on a project for the game "Hangman". While I have struggled with everything for the past 3 weeks, I have finally cams across something I have no idea how to correct. I am getting a Null.Reference error in the following line of my
If Not strWordToGuess.Contains(strLetterGuessed) Then
Now this code was provided in my project files, it was dated 4/07, I am currently working in VB 8 express, I am thinking this might have something to do with it.
View 14 Replies
Mar 16, 2010
I am using Visual Basic 2008 express and I have created a simple database application for my y6 pupils. The program will eventually be installed on the school system but, i want to know how I can ask vb to find which folder the application was installed in and get it to return a string. Does anyone know how to do this??
View 5 Replies
Jun 18, 2012
i would like some help with how to start with my FINAL YEAR project work dubbed "SCHOOL TRACKING SYSTEM" . I am so much lost on how it shoud be like and what to actually do.
View 2 Replies
Dec 9, 2009
So I am supposed to be choosing a final project for my visual basic 2008 class. I cannot help but remember an old high school classmate from web design class who made a program that used the speaker built into the motherboard (or whatever makes the start up beep when you turn computer on) to time the beeps to play simple songs. It was very funny and amusing and I was wondering if anyone had seen something similar or knows how to go about making one?
View 5 Replies
Mar 15, 2011
So as the message says i believe im having a problem when declaring an array as control. The background:Im doing a school project where a picture is covered by 48 buttons. When a user clicks a button, they are asked a question. If they answer write, the button disappears until the whole image is displayed.
Im using each buttons visible property to hide it. Now that i think about it, i should probably un-enable it after a question is answered correctly.anyway, I keep getting a NullReferenceException when making the visible set to false. Any suggestions would be awesome. I have already created all the buttons and named them Q1-Q48.
[Code]...
View 7 Replies
Sep 4, 2010
im new to these forums and was working on a small program to change the school wallpapers. i want the user to be able to choose the imageand not have to put it in a secific directory could anyone please advise me on how to do this
[Code]...
View 1 Replies
Jun 30, 2011
I am making a calculator for a school project, I want to have it so it looks similar to windows calc ( with one button for each number & only one text box),My code has a few blank spots but so far it is :
Public Class calc
Private Sub Btn1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Btn1.Click
IOBox.Text = IOBox.Text + "1"
End Sub
[code].....
View 5 Replies
Mar 25, 2011
I need help writting a Trivia Game for a school project. The teacher wanted us to get used to looking to forums and google for help so he refuses to help us for this particular summative.
What I want to know is.. how to use a streamreader to read questions randomly from a text document located in the debug folder (I have 10 questions all in 1 text file in the debug folder, and the same for all of my answers) how to use a streamreader and split function to read answers from a text document located in the debug folder to a combobox.
[Code]...
View 19 Replies
Apr 3, 2009
im using an MDI parent form and MDI Child. how can i print the image that's inside a picture box that's inside the Child from a button that's on the Parent?when i try to use print preview or print dialog, i can't get it to recognize that the document is the picure inside the picture box. i've looked up this error message:Value of type 'System.Drawing.Image' cannot be converted to 'System.Drawing.Printing.PrintDocument'.[code]
View 6 Replies
Dec 1, 2011
I have to make an hangman game for school using visual basic 2008 express and make it a console application...because i need better mark i want to show an image when a player loses or wins(i think it can be done with windows application)...
View 9 Replies
Dec 13, 2009
I move a VB project from school and home on a flash drive. At school drive mounts on E: at home it mounts on F:. I have 4 forms, Form1, Form2, Form3. Form4. Form1 and Form3 have incorrect file paths, it has the E:, but Form 2 and Form4 path change just fine when I move it from school and home.
View 1 Replies