|
Navigation News Trebuchets Trebuchet #1 Mangonel Trebuchet #2 Project Links Programming Visual Basic Code Help Projects Mikwit.com Shop Overheard at College |
![]()
Usefull List of Visual Basic.Net commands: Example: What this does: code - How it works Create a New Text File: FileOpen(A, [file name, with .txt] , OpenMode.Output) - A must be a varibale between 1 and 100, and is used to reference the new file untill you close it. This will create a new file, or edit an old file. Top of Page Delete a File: IO.File.Delete([name of file]) - This will delete the file that is named inside the perenthases. Top of Page Find Width of Screen: Screen.PrimaryScreen.Bounds.Width - This gives you width of the screen of the computer. Top of Page Find What Folder the Programs Running In: (System.Windows.Forms.Application.StartupPath) - This will give you what folder the program is in. I find it usefull for storing data in things such as text files in the same place that the program is. Top of Page Find Height of Screen: Screen.PrimaryScreen.Bounds.Height - This gives you height of the screen of the computer. Top of Page Loop: For A = B To C Step D ...[code]... Next A - A must be a variable, B & C must be numbers, or variables as numbers "step" and D don't need to be there if you want the step of A in the loops to be one if not you put it in and make D the amount you want it to add, make it negitive you you want it to subtract. For every time you go thought the loop it will add D to A and untill it is equal to C, and A starts off as B. Top of Page Make One Form Close and Another Open: Click here to get answer Top of Page Maximize the Window:  Me.WindowState = System.Windows.Forms.FormWindowState.Maximized - This will maximize the window of the program. Top of Page Minimize the Window:  Me.WindowState = System.Windows.Forms.FormWindowState.Minimized - This will minimize the window of the program. Top of Page Open an Image:  Drawing.Image.FromFile([file name of image]) - This will open the image that is specified. Top of Page |
Information ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() |