How To Comment Multiple Line Quickly
Jul 13, 2009I saw the video from microsoft teaching the techique of programming and found out they can comment multiple line and the same time.
View 2 RepliesI saw the video from microsoft teaching the techique of programming and found out they can comment multiple line and the same time.
View 2 RepliesI'm using this script:
http:[url].....To convert some outlook HTML to plain text.It nearly works, the only thing that it leaves behind is the CSS which outlook places in html comment tags <!-- --> in addition to <style> tags (which are removed).This is the original text:
<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:x="urn:schemas-microsoft-com:office:excel" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">[code].....
If we need to comment more than one line we'll use the following syntax in C#.NET.
/* this.comboBox1 = new System.Windows.Forms.ComboBox();
this.button1 = new System.Windows.Forms.Button();
this.dataGridView1 = new System.Windows.Forms.DataGridView();
this.textBox1 = new System.Windows.Forms.TextBox();
[code]....
i know in java and other nice languages it's possible to comment out a bunch of lines at the same time. is it possible to do this in vb.net?
View 5 RepliesI'm just having a small problem with tabpages. I have a program that have multiple forms (on startup they are all created and hidden, except for the one being viewed by the user). When the user open one particular form, I has a tab control with two pages. I also have a toolbar. when the user click a menu option, I call a method that assigns all my controls to a variable (to be used in an insert statement later).
Here's an example of that Sub:
Public Sub SetValues()
'page 1
DateCreated = Date.Now
DateEdited = Date.Now
DateCompleted = Me.DateTimePicker2.Text
[Code] .....
The problem is, the controls on the second page cant be "seen" (this is confirmed by placing a msgbox in the above sub, which comes up blank) until the user open the second tab, at least just once. Then its ok. I know I can just run a small method to quickly open all tabs, but is there a reason this is happening, and a better way to do this?
Is there a way to comment out more than one line of code in vb.net using VS 2010?
View 4 RepliesIs there any SHORCUT for multi lines commenting in vb.net .. Altouhgh i know there is an option in toolbar for multilines comments but i want to know a keyboard shorcut for it...
View 5 RepliesHow to comment multiple lines of code/block of code in VB?
View 5 RepliesI want to develop an application using VB.Net to detect the arrival of USB Key once it's plugged into the USB port. I used a method by getting the list of all drives in the computer and then I check whether the type of the drive is "Removable Disk" and "Is ready" or not!. By using this method, I can figure out which drive is Removable drive. BUT I get confused with the FLOPPY Drive because it's also a type of Removable drive.
View 1 RepliesI am working with VB 05 Express, and I know C has this, but I want to comment multiple lines of code, without always having to put the little ' symbol on ea. line. Like, I think C has something like this-
\*
Comment! Comment!
Comment! Comment!
*/
or something like that !
.Basically I'm trying to code a program to output class names for a game which then allows the user to copy and paste the string of class names into the game itself.The template for class names in the game look like this ["name",quantity];So in the code for btn_add I have (which outputs to a text box):[code]How can I change the ' into "s without VB.net throwing up errors?
View 1 RepliesIn certain error situations within my VB 2008 code, I need to quickly terminate the program. This should be simple, but I haven't been able to figure out how to do it.
View 5 RepliesI found information about how to fade images on the net. But it is extremely slow. Here is the code:A is an ImageAttributes variable. matrixEl is the float value that is incremented to fade in the image.
View 6 RepliesI'm working on a program that has to continue functioning even if the SQL database isn't available. If the user has sufficient rights they can continue on using manually entered values.
The way I'm doing this it takes a very long time to fail before this can happen. Is there a way to quickly, or continually, determine if the SQL database is available so that I can avoid trying the stored procedure if it isn't?
Dim tblSteps As DataTable = New DataTable
Dim StepsBindingSource As New BindingSource
Private Sub cmdExecuteSproc(ByVal SO_Number As String, ByVal Prev_SO_Number As String)
[Code].....
I am currently writing a program and I have all the windows in three languages. Is there any way of quickly changing through the languages? I mean, I can do it manually but the list has like 500+ languages and I was wondering if there was any keyboard shortcut to switch between the used languages, or any way to put a buttom on the toolbar.
View 4 Repliesi have this code
Private Sub GetPrintFunction(ByVal printopt As Array)
Dim Print_Document As New System.Drawing.Printing.PrintDocument
AddHandler Print_Document.PrintPage, AddressOf PrintPage
[code]....
The web service returns 6 items per array. If the array return 2 sets of array (12 items), then i have to split it into 2 pages. how can i do it?
Example scenario:The web service should return at least 6 items(1 array)
example data
*redemption date
*reference number
[code]....
if i have two sets of these, then it should be printed on different pages.
I'm having a little trouble deleting multiple lines for a listbox. I know how to remove a single line, which is this: [code]If I change the value for IndexOf to SelectedItems, I get an error stating that -1 is not valid for index.I am guessing this needs to be done using an integer array and a for each but I don't know how to do that. I really never bothered to look much into arrays.
View 1 RepliesI'm dealing with the dreaded <Run/> in Silverlight 3 and having to programmatically create a <TextBlock> and its inlines:
Why dreaded? Because it doesn't work, I guess, the way you'd expect. Exhibit A, below, should produce BARN (with fancy colors for each character), but instead it produces: B A R N
EXHIBIT A
<TextBlock FontFamily="Comic Sans MS" FontSize="88">
<Run Foreground="#A200FF">B</Run>
<Run Foreground="#FF0000">A</Run>
[Code].....
How can I have multiple If Not conditions on one line?
Here are the combinations that I've tried, but they either don't work, or won't build.
If Not (txtDisplay.Text = "0") And If Not (txtDisplay.Text = "")
statement1
Else
[Code]....
I using Microsoft.Office.Interop.Excel I get returned a 2D array of type object[,] which contains double for elements. Note that the index lower bound is 1 instead of the default 0, but I can deal with that easily. How can nicely convert the array into double[,] using .NET 3.5. (by nicely I mean concise, or compact).
[Code]...
I am working on a application that stores videos, images and files. I would like to give the user the possibility to encrypt them. I am tying to use AES to encrypt them but the problem is that the decryption takes to long.I was hoping that the loading time from the hard disk of the encrypted file was far longer than the process of decryption of an image for example but i was wrong
So if i try to 1) load the image 2)decrypt it and 3)load it in a image control it takes 15 times more time that loading the original file not encrypted
I want to create my special full-text index using text files, without database.I saved records ids for every word in index, in text file..Now if I want to search for tow words together; I have to get ids that is shared between these words by comparing text files of these words ids; and saving the result in other text file.[code]But now the problem if the first word has 100,000 ids and also the second word same it; the loop will take too long time! It will loop 100,000 * 100,000 times!How can I find another way to compare these files quickly; or another idea for my full-text index with text files?
View 4 RepliesI am trying to read this XML document.
An excerpt:
<datafile xmlns:xs="[URL]" xmlns:xsi="[URL]" xsi:noNamespaceSchemaLocation="wiitdb.xsd">
<WiiTDB version="20100217113738" games="2368"/>
<game name=" Wanted: 50 Wacky Jobs (DEMO) (USA) (EN)">
<id>DHKE18</id><type/>
<region>NTSC-U</region>
[Code] .....
It just skips the "While iter.MoveNext" part of the code. I tries it with a simple XML file, and it works fine.
When I use the Debugger to to debug some code, I see a subrountine (or function) call.
How do I quickly locate the code for that subrountine (or function)?
Im have a form and an image. Imagine the form's backcolor to be black and the image to be a landscape. When you resize the form the image is also resized and streched towars all directions. The point is that as you resize the form the image delays to be resized so the background which is black is showed.
View 1 RepliesI am writing an import program to import data from an access database to a SQL database.The table structure in the SQL and Access are the exact same with the same field names.I was wondering if there was a quick way to get the data into the SQL table without have to loop through each record?Currently:1. User selects the file2. Use a oledb connection i load the data into a DataAdapter3. Datadapter is bound to the DatagridNormally i would loop through each record in the datagrid and insert it into the table but i was wondering seeing as the column names are the same if i could save the messing about with loops and insert statements using 30 column names.
Code to load the Data is below
ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & database & ";Jet OLEDB:Database Password=bekdemir"
[code]......
I'm pulling from a text box for recording scores like 2, 47080, 88 and for better aesthetic look on viewing results i wanted to format results like so:
00002
47080
00088
Only way i could format was to convert to number and use: Score.ToString("0000#") not worried about validation, this is just something for my rug rats.Is there a better way, as in not having to convert to number first?
How can I perform a very fast search in an array, that finds a substring of an entry in the array? As an example, let's say that I have an array containing these objects (as strings):
[Code]...
What I then want to do, is to find any matches matching (as an example) the letter "S". I want it to display all the entries with the letter "S" in it. I don't want to use loops of any kind, and I prefer using things such as the array's inbuilt BinarySearch function. However, it seems like the BinarySearch function only compares from the beginning of each item. I'm using very large arrays. So a fast method is really needed.
Is it possible to create a multiple line string in vb.net?
View 7 RepliesHow do I get selected line with multiple columns within a listbox and put the info into an excell worksheet with the data in distinct cells
View 2 Replies