VS 2010 Finding Built-In Classes?
Feb 24, 2011
What are the best ways you guys recommend to search the MSDN Code Library. I know there have been several instances in searching for ways to do something, doing a long workaround, and finding out later that there was a built in class that handled the problem that I was working on much simpler.
So what are some of the ways you guys use to find tools, classes, etc. when coding. Or are you just that awesome already.This is kindve just a general tips and tricks question. Sorry if Im in the wrong forum mods.
View 2 Replies
ADVERTISEMENT
Feb 9, 2009
How to use built-in classes in VB.net for sorting the following number in the desired order?
Number: 5,10,24,9
Desired order: 5, 9, 10, 24
View 1 Replies
Jun 13, 2012
How can I structure my classes so that the user interfaces though a single class while the supporting classes are hidden from their view? I think its best understood in an example:
Public Class MyInterface
Public Economic as EconomicClass
Public Sub New()
MyBase.New()
[code].....
So you might ask why am I even separating them? It's strictly for others who will be working with this interface. I need to funnel them though a logical structure:
interface.Economic.MyMethod
interface.Currency.MyMethod
etc
This way everything is already handled for them in the background and they only need to run the method they need. I don't know if I can have it both ways in VB.NET.
View 23 Replies
Oct 24, 2009
Here is some example code of what I mean:
vb
Public Class Form1
Private Sub Button1_Click(ByVal sender as Object, e as systemEventArgs) Handles Button1.Click
[Code]....
View 5 Replies
Jun 29, 2010
Is it possible to immediately use code that is built in a dynamically built assembly?I would like to create an instance of an ENUM built using.http:[url]......
View 4 Replies
Jan 27, 2011
Is there a built-in method for stepping back through folder paths? Or a better way then what I'm doing? To go back two folder paths I'm doing it like this...
[Code]...
View 5 Replies
Dec 11, 2011
For the time being I have been using a Structure to store "people" (their name, gender, age, etc...), because I really love to refer to something like Mike.name or Caroline.age, so I could simply put Caroline.age += 1 anywhere in the code and here you go, Caroline is one year older. No more simpler.But because of how inflexible (compared to Classes) Structures appear to be, when I needed to iterate through all the instances I was forced to use a list or dictionary so I could use a FOR EACH ... NEXT block. That was resolved by you people in the previous post, but I'm having the problem that I couldn't use the elements of the list to change the original instance of the Structure proper... I mean, if I code something like this...
For Each thisperson As Person In peoplelist
If thisperson.name = person_selected Then
'person_selected is the SelectedItem.ToString of a listbox[code]....
Well, I thought that thisperson.teamleader and Mike.teamleader were going to be equivalent (when the IF statement was true, that is) but that doesn't appear to be the case. So right now I'm really hating Structures...But when I look into Classes... well, they have more flexibility, yes. You could construct a FOR EACH block without any other trick like the "on-top" list, and that it's very useful indeed, but (a big "but" IMHO) I lose that NICE feature that makes possible to write the name of one of them instances like Mike.age or Caroline. kills
I mean, if I wanted to add a year to Mike, well... there is no "Mike" in the first place. A "Mike" string could be a property for the class, but I cannot (or know) magically refer to him with the ease of a Structure, so when I want something so simple as Mike.age +=1 ...well, with a Class I'm simply clueless to how locate him and change ANOTHER property of him.I suppose I am doing something very wrong, because I cannot believe VBasic could force on you those two extreme philosophies...:
Classes = +flexibility -usability ???
Structures = -flexibility +usability ???
What I want to do is SO simple that I cannot believe I need to choose between the two.
View 25 Replies
Jun 28, 2011
I need some help with how to organize classes in VB.NET. I have a class called parent with methods for adding, deleting etc. But I also need a method that returns a list of all the parents, a list with parent objects. Where do I put this method? Do I put it in the parent class or do I need to make another class called parents?
View 1 Replies
Oct 16, 2011
I've seen people discourage other from using nested classes, because the make things more complicated and are evil and whatnot.But I want to know what possible justification there would be for using a nested class and if there are any possible benefits for using them(or structures for that matter).
View 10 Replies
Oct 21, 2010
Public Class Form1 Dim CharList As ArrayList Private Sub btnAdd_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnAdd.Click CharList.Add(TextBox1.Text.ToUpper)End Sub Private Sub btnClear_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnClear.Click
[Code]...
View 2 Replies
Jan 23, 2012
I have two classes, one nested in the other. [code]Neither "Name" or "ID" are unique between operations and records.I wish to construct a dictionary using LINQ = Dictionary(Of String, Of List(Of Integer), whereby the keys are uniqe examples of Names in my collection and the values are the collective set of distinct IDs that are associated with those names.
View 2 Replies
Sep 6, 2010
Im having a hard time finding tutorials for the HtmlAgilityPack, all of them are for c#, so im having to use c# code and convert it to vb.Here is the my code, im still getting errors with the 3rd line:[code].......
View 4 Replies
Jan 8, 2010
I'm obtaining data from a StreamReader.My StreamReader is called "reader" and I'm reading the stream with "responseOutput" like this "responseOutput = reader.ReadToEnd()" And in that bunch of text that I receive I want to FIND and EXTRACT a piece of text and then STORE that extraction in a variable of String type.Here is part of the code I'm referring to:
Dim response = request.GetResponse
Dim responseOutput As String
Dim reader As StreamReader
reader = New StreamReader(response.GetResponseStream())
responseOutput = reader.ReadToEnd()
And here is the text or data that I'm receiving (what I'm about to show you is the result of a "MessageBox.Show(responseOutput)":
<TweetPhotoResponse xmlns="http://tweetphotoapi.com" xmlns:i="http://www.w3.org/2001/XMLSchema-instance"><Large>http://cdn.cloudfiles.mosso.com/c54092/x2_7e143b</Large><MediaId>7e143b</MediaId><MediaUrl>http://tweetphoto.com/8262715</MediaUrl><Medium>http://cdn.cloudfiles.mosso.com/c54102/x2_7e143b</Medium><Original>http://cdn.cloudfiles.mosso.com/c61132/x2_7e143b</Original><PhotoId>8262715</PhotoId><SessionKeyResponse/><Status>OK</Status><Thumbnail>http://cdn.cloudfiles.mosso.com/c54112/x2_7e143b</Thumbnail><UserId>2268670</UserId></TweetPhotoResponse>
And all I want to do, is to extract a specific part of that text, which is the "PhotoId" value (I highlighted it in red), in this case the value is "8262715", and then store it in a variable (I know how to do that I just need the value).The text or data I'm receiving changes only the PhotoId everytime it's requested.
View 3 Replies
Sep 18, 2010
I loaded a text file to a text box, and I want the program to find a certain line containing only the strings I specify. But the text file will likely contain many of them, so I want it to pause scanning at the first line I'm looking for until I tell it to continue, then the second line, and so on. So the questions are:
1. What's the method for finding the exact line I want in a text file?
2. How do you start, pause, and resume scanning a text file line by line?
View 5 Replies
Dec 5, 2011
I have 2 images. One image is a large image and the second one is a small one. The small image has a copy of itself within the large image. I am wanting to find the coordinates of where the second image is located within the large image, a 'find feature' in other words. e.g, I might have an image with the word "Test" in it. And I want to find the coordinates of the letter 'e'...
View 8 Replies
Aug 16, 2010
I am downloading a JPEG image from a site and then I need to find the darkest pixel of that image. It also needs to be very fast since speed DOES count here, majorly. (probably has to use an API)
View 4 Replies
Jul 16, 2011
in the old days i could so something like
GWBasic
10 A$="ReallyLongStringInSmallSpace": B$="tiny"
20 PRINT USING" ASDFASDFASDF ASDFASDF"; A$; B$
Output:
"Re ASDFASDFASDF tiny ASDFASDF"
it would automatically truncate large strings to fit in a small assigned space, and it would use empty spaces for strings too short. it made it VERY easy to print fixed front text tables in aligned columns by automatically truncating long lines and expanding using spaces (chr 32) where needed.i've already looked at .Format but it seems just for dates, times, currencies, and various byte/hex formats.
View 3 Replies
Oct 25, 2011
I have a form, that when opened, displays the image from the webcam onto it.
It's a test, to ensure the webcam is working. A prompt appears that asks if the webcam is working. However, some testers are lying and I need to find a method to make sure they can't lie.
My team wants to use a large bar code that the tester has to hold in front of the camera.
So I need to figure out how to either read the bar code, or just read the text in the bar code, which reads, "* C A M *."
It looks like the image below, but much larger.
Does anyone know where I should begin? I was thinking about using GetPixel, but I'm not sure I could or if that would be reliable enough.
View 1 Replies
Feb 2, 2012
I am loading a webpage within WebBrowser1 and trying to check the page for text. I just want it to find whether or not the text on the page says "No jobs are available at this time." and if those words are not found then I am going to have the program alert me. When I run this code..
[Code]...
View 21 Replies
Jul 18, 2010
I need to have the webbrowser on the selected tab dimmed, so like Dim foundbrowser = TabControl1.SelectedTab.Controls.Find("WebBrowser", False)i know thats totally wrong but its just to show you what i kind of need, how do i do this? The only control on the selected tab is a webbrowser if that helps?
View 2 Replies
Nov 16, 2011
For a class project (online course, no instructor handy to get a quick reply from -_-) we are to write a short program using classes and OOP to roll a pair of 6-sided dice 1000 times and count the number of times the total of the two dice is 7. Easy enough, and I've read over a few examples that people have written, but they don't seem to use OOP. I'm not asking you guys to do my homework for me, but I am terribly lost when it comes to using OOP. So far I understand that I should be using a Random() class object to determine the roll itself, and then maybe load each roll into an array and use a loop to check if each element is 7 or not, and then increment a counter? How do I set the range of Random() so my dice rolls are representative of a 6 sided die? It's all a bit overwhelming and I'm not sure what I should do next.
[Code]...
View 28 Replies
Oct 26, 2011
Is it possible to have multiple classes in a namespace and be able to reference the functions within the clases if the Major class is instaniatated from another class?? for instacnce:
Namespace Database
Public Class Data
Public Class Prepare
[code]....
View 1 Replies
Mar 30, 2011
I have a MDI application and a very complicated class there which populates its properties from a dataset derived from an external database. Each form, including child forms have to be able to access that class and use its properties thorughout the whole session.I don't know where to 'preserve' these property values within the application. I kmow many books etc. suggest not to use public variables but I really can't find a way to solve this other than to use a public variable (which is a list(of my custom class) in this case.
I have a separate class called PublicItems.vb and declared there my public variable as
Public Shared secuniverse As List(Of myCustomClass)Is there something wrong with the syntax because if I try to use the variable secuniverse in my main application class, I get the following exception:'sectoruniverse' is not declared. It may be inaccessible due to its protection level.
View 7 Replies
Dec 5, 2010
I've been trying to do this for a while now.What I intend to do is that when I load a webpage in a class, i raise event to my form that the data is recieved.
[Code]...
View 8 Replies
Sep 1, 2011
I am working on a MSDN project from 2007 it calls for a Common Dialog Control but I can not find it. Has this been deprecated and/or is there something to replace it? If not how can I access this in VS 2010 for a VB project?
View 16 Replies
Nov 10, 2010
I couldn't get the SO text editor to mark parts of the post correctly so if you can trick SO into properly formatting the exception text and the code
[Code]...
View 1 Replies
Feb 27, 2011
how to find the row position/index in a data table, using a value from another table. For example, I use the row position from Linkingtable1 to get my value for CustomerID, but i want to use the CustomerID to search the CustomerTable for its row position, in order to show the Customers Name in a text box, As currently when loading the textbox shows the customerID. I understand the code to get the names from the rows in the datatable, its just finding the row position of the customerID.
View 9 Replies
May 27, 2012
I have an assignment due tomorrow, and I thought I had it all figured out but there is one question I don't know how to program. The assignment consists of a form with textboxes in which the user types info about a book (author, title, genre, etc.), which he can save to a textfile by clicking the save button. (At the moment it's not saving it to a textfile but just a 'file', which can be opened with notepad but is of no specific datatype, not sure how I do that, but is less important). There is also a button with which the user can display information from a different, earlier created textfile.[code]
View 1 Replies
Jul 13, 2011
I have put together the following code to illustrate the problems I've been struggling with:
Public Class OuterClass
Private _OuterProp1 As Boolean = False
Public Property OuterProp1 As Boolean
[code]....
I need to be able to refer to outer class properties and variables in an inner class, and I need to have a variable in one inner class set in a different class. I've tried Public, Private, Protected, Friend and all kinds of combinations of them, and I can't figure it out.
View 4 Replies
Nov 13, 2010
txtSubject1Info.SelectionStart = txtSubject1Info.Find("Hey!")
I am finding specific words in the RichTextBox (in this case, "Hey!") and selecting them by getting their initial position through the "Find" command. Unfortunately, this does not work when I have multiple instances of "Hey!" in the RichTextBox. Here's an example:
Text in RichTextBox:
Hey! This is cool!
The Find command would return a value of 0 in this case. However, let's take a look at another scenario:
Text in RichTextBox:
In this case, the Find command would return a value of 0 again, but I want it to get the initial position of the second "Hey!" statement. I'm wondering how I can do this.
View 4 Replies