-
Content Count
3,403 -
Joined
-
Last visited
-
Days Won
3
Everything posted by rvalkass
-
I downloaded Microsoft's Visual Studio Express suite a few months ago, but only recently got around to installing it. I have been practising with Visual Basic and making some rather basic programs and utilities, but they contain most of the basic concepts. This tutorial will explain how to create a basic image viewer, and I will try to explain each step from beginning to end as clear as I can. To start you will need: Microsoft Visual Studio About 10-20 minutes free time OK, first open up the Visual Basic part of the Studio. I am using the 2005 Express version, so some features may differ between versions, but most stuff should be relatively similar. Once it's loaded click File > New Project (or press Ctrl + N) to get the New Project dialog. Make sure you have Windows Application selected, and give the project a sensible name, then click OK. Now the screen will show you a blank form. This is the basis of your application where all of your controls, buttons etc will be placed, and represents exactly what your end user will see. Click on the Toolbox button on the left hand side of the screen, and make sure you are viewing the All Windows Forms section. This pane lists all of the possible controls you can put into your application. Drag the one called PictureBox onto your form, and position it in the top left hand corner, like this: Also drag a Button onto the form, and position it near the bottom border, roughly in the middle. Finally, drag on an OpenFileDialog, and position it anywhere on your form. You will notice that it doesn't appear in your application, but in a separate pane at the bottom of the screen. This pane contains all of the elements of your form that are not visible until you call them, or are permanently invisible, such as counters and timers. You now have all of the elements for your application, so you just need the code. Double click on the button you dragged on earlier. The view switches to the programming view, as opposed to the designer view. A command is created that will be run when the button is clicked, and your cursor positioned ready to type the code. Copy or type the code below where the cursor is: OpenFileDialog1.ShowDialog() This will cause your dialog box to display when the button is clicked. Now we need the picture box to display your chosen image. Right click in the code view, and select View Designer. Then double click the OpenFileDialog1 button at the bottom of the screen, and put this code where the cursor is. path = New Bitmap(OpenFileDialog1.FileName)PictureBox1.Image = path We have now defined path as the filename chosen in the dialog box, and have set the picture box to display that image.Notice that the word path has been underlined in blue? This is similar to the spelling and grammar mistakes in Word, and shows that you have failed to define something or have spelt something wrong. This is because we haven't defined path. At the top of the code view you will notice the following line: Public Class Form1 Below it, add this line: Private path As Bitmap We have now created a bitmap ready to display your image, and the blue underlines should disappear. Your project will now work, but if you click the little green Start Debugging 'play' button on the toolbar, and click your button to load an image you will notice a number of faults. Firstly, your Picture Box is far too small to display an image. Secondly the button is labelled Button1 and finally, the application is titled Form1. This shall all be fixed, along with a few extras. Close your application, or click the Stop button, and then flick back to design view and click on the button we added earlier. Make sure you can see the Properties window, which is normally a panel on the right hand side. If not, push F4 and it should appear. This Properties pane shows all of the settings and choices you can make concerning your button. If you scroll towards the bottom of the list you should see a property called Text. With virtually all of the controls you can add, Text is the text displayed on it, so with your button change this property so it says something like Load Image... and push enter. Click on the title bar of your form and change the text property again to something more logical than Form1, perhaps Image Viewer. Now, to get your images to display properly within your picture box, we need to change some other settings. I will just list them here, but you can read up about them in more detail in the help section if you wish. Anchor: Top, Left, Bottom, Right BorderStyle: Fixed3D SizeMode: Zoom Finally we just need some positioning. Click on the picture box and drag it so it fills most of your form, leaving space at the bottom for the button. Then click on your button and resize it so that it displays all of your text, then click Format > Center In Form > Horizontally . Finally set the Anchor property of the button to Bottom. Now click the Start Debugging button and there should be a vast improvement To turn your application into a working, distributable .exe file, click on Build in the toolbar at the top, and then Build (Your Project Name). You have now created a .exe file, which can normally be found at the following path: Here is my finished product:
-
These are also used in the UK to dial numbers costing upwards of Ł5 per minute. Regardless of what they say in the terms and conditions or whatever other documentation they have they are totally illegal, as they are charging ridiculous amounts of money and don't tell you that they will dial out. They are most certainly a scam, why would you download something that would charge you loads of money for no reason? BT released a bit of free software a few months ago to stop this hapenning. You can download it here. I have no idea if this works in other countries or with other phone providers. However, most firewalls now protect against this, so you could look for one of those.
-
Visual Basic Express Edition Beta How does it work?
rvalkass replied to Mortanis's topic in Programming
I also downloaded the Express version and there are some differences I have noticed between code, names for controls and other such stuff. Normally names can easily be converted from one version to another, and various help is given in the software if you type code from other versions. I am currently writing a very simple tutorial for the Express version to create a basic image viewing application and it should be finished soon. -
What Is A....quark? No seriously, i have no idea
rvalkass replied to dark_drgn's topic in General Discussion
A quark is what scientists believe, along with leptons, makes up all matter in existance. They can only exist inside larger matter, the protons, neutrons etc that constitute an atom. There are currently six known types of quark, known as: Up Down Strange Charm Bottom Top That's all I know about quarks, but Wikipedia has a good article here if you want to read more. -
It's like this at my school. The teachers seem to think that they instantly have our respect and we should be worshiping them or something, yet they treat the students worse than the rubbish they throw away. For example, at my school there are very few students that know anything about computers, one of which is me. Just because me and a few mates know one of the ICT technicians any slight problem, indication of anything against the rules or not allowed is immediately pinned on us. So far we have managed to avoid anything they throw at us, but they are still ignorant to the fact that there are 1,400 other students who could have done something! Just say you'll stop updating the web page if he doesn't appologise. Or you could change his password
-
Fbi's New Way Of Keeping Eyes On The Terrorists a humor
rvalkass replied to Albus Dumbledore's topic in General Discussion
Ah-ha! I can avoid being tracked by just moving onto the toolbar! Unfortunately this means I can't click any links... Not to worry Disable Javascript and the FBI can never find you -
Just reading through notes or looking over them doesn't actually get them into your brain, as you are not really thinking about what you're reading. Typing written notes onto the computer, or re-writing them onto index cards can be very effective, especially if you limit the space you have to write on. This makes you think about what you've written, and what is really important about what you've got to write. Another popular technique is a mind-map. Put the subject in the middle of a large sheet of paper, and then draw arrows coming off of it, with important main sections of the subject on the end of them. Then branch off those main topics with everything you know about it, going down many levels and linking parts to other sections etc. Then go through a text book or your notes and see what you've missed. They are the main things you need to revise. Practising questions from past exam papers can also be very useful, as it gives you an idea of the wording and style of the questions, and what sort of answers you are expected to give. If it's an internal exam try asking teachers for past papers, and normally they'll give them to you if you want to improve your grade. If it's an external exam them try looking at the examining board's website, where you can often find past papers and mark schemes. Dependant on what country you are in (these are UK examining boards), the following links may be useful. AQA Examining Board OCR Exams EdExcel Examining Body
-
It would be quite worried if the entire contents of my hard drive was freely available on Google's servers, even if it was protected by a password. Also, if the service does take off they will have problems getting enough bandwidth and space, especially if people are making daily backups or however it would work. Obviously it isn't totally working yet, otherwise they probably would have released it.
-
Mine seems quite like me, and some of the others are real for some people I know. However, some make no sense what so ever to people I know! Interesting to read though.
-
Have You Heard Computers Sing? Text to speech... or Text to song?
rvalkass replied to Dooga's topic in Science and Technology
Is it just me or does this seem to be one of the weirdest and probably most pointless things Microsoft has ever developed? Would people go out and buy a CD of Microsoft Sam singing "You Have Selected Microsoft Sam As The Computer's Default Voice"? It'd certainly not make the top ten. -
I use the Google translator very rarely and only to look up one or two words, as it seems to be the most inaccurate way to translate anything. One kid in my German class managed to use it for some coursework, and it helpfully got the word order entirely wrong and mixed up the meanings of a lot of words. Also, it quite often seems to freeze or crash mid translation, which is annoying if you just typed a block of text in. The translating web pages bit seems a little better but can still cause problems and can be unreliable. Yes, this is AltaVistas version of a translator, available here.
-
But, can you find any emus in the Dominican Republic? There are loads of little things like this, it's just unfortunate if you find someone who knows loads of animals and countries!
-
How Many Of Us Here Contemplate The Meaning Of Life?
rvalkass replied to trekken's topic in General Discussion
I sometimes think to myself whether our lives are planned out and we are all controlled, or whether we have free will and can do whatever we want. I also wonder if we have a purpose, if there is something we have to do or should be doing, or if we are left to our own theories and ideas. So far I haven't come up with anything that makes a great amount of sense. -
I generally get to sleep around 10/11pm and then wake up again at about 6am! I have too much homework and coursework to do. THat does give me 7-8 hours of sleep a night though.
-
I use GMail more than I use the search feature from Google, so I voted for that. Also, if you compare their services to similar ones, GMail is much better than email services from others, but they are catching up on the search functionality. Also, Tahoma search often provides more accurate and useful results.
-
Some useful little tools, great finds kvarnerexpress. Using the first one, the main page of my site takes about half a second to load. The second tool gives more information and useful tips and such. Justa few more tips to speed your site up: Reuse images and make them as small as possible In forums and other scripts turn on the GZip compression Don't use multiple external files of the same type. E.g. combine all your CSS into one document.
-
Could You Help Me Identify This Font? urgently needed
rvalkass replied to dodgerblue's topic in Graphics, Design & Animation
I tried going through a few different font identifiers and all of them suggest either Eurostyle or Microgramma, but one did say that the text may have been vertically compressed. E.g. resized without keeping the scale, which is why it looks slightly different. -
Gimp Tutorial I need to learn how to use GIMP
rvalkass replied to fsoftball's topic in Graphics, Design & Animation
Pixel2Life has a good selection of tutorials for the GIMP. As far as I can remember the GIMP has quite a good forum of experienced users who will be able to point you in the right direction. -
I'm going to wait until all of the high definition versions of DVDs come out, becuase surely one of them will end up being pulled off the market becuase less people use it, like the Betamax / VHS wars. The players will need to be relatively cheap, and hopefully they will also bring out a player that can record as well. Do you know how soon they intend to bring out drives for PCs, if they intend to at all?
-
The "invisible" batteries seem a little far fetched, but I suppose something has to be powering that thing! Personally I think that would feel more uncomfortable that wearing a normal watch, but that could just be because I wear my watch virtually constantly, so I hardly notice it now.
-
I would find a mouse like that quite weird to start with, but that's probably because I'm so used to the more 'round', traditional style. Also, the buttons appear to be at the end of the mouse, which would make them quite hard to click, especially quickly and precisely. Do they also offer one in a dinosaur shape for the dinosaur cursor set
-
Email/file Encryption nothing to hide?
rvalkass replied to brainless's topic in Science and Technology
This was on TV last night in the UK, where we have the threat of us all having to carry ID cards contaiing loads of personal information. Would the people who initiated these plans be willing for me to keep all of their private emails? Probably not, so why should I let them keep mine? Various human rights documents state that we all have the right to freedoms of speech and expression without any form of hindrance, and we all have the right to privacy. The government reading your emails and then prosecuting you because you said something they didn't like seems to break these human rights. -
Writing < Typing, Schools Need To Impliment A New System
rvalkass replied to brainet's topic in General Discussion
Can you imagine the insurance costs of having that many laptops? At my school we have around 1,500 pupils, if each one had a laptop costing around ?500 that would be a total of ?750,000 just on laptops for students, when the majority of departments have trouble finding enough money for new textbooks every 10 years. Most of the people in my classes spend their time making documents look pretty, which takes them even longer on a PC as they are not all exactly computer literate. Also, some seem to think the best use of their time is playing Flash and JavaScript games during ICT lessons, so there would be some problems.