List All Locales In Specific Manner?

Aug 8, 2009

I want a list of all locales which I need to show in the combo box. I get all cultures as :

View 5 Replies


ADVERTISEMENT

Regions / Locales - String Not Recognized As Valid DateTime

Feb 5, 2012

I've been having several problems lately with clients that are using a different Windows Region setting than I am. The error is as follows:
The type initializer for 'InventoryDataTable' threw an exception. ---> System.TypeInitializationException: The type initializer for 'InventoryDataTable' threw an exception. ---> System.FormatException: String was not recognized as a valid DateTime.

The error occurs when users load the application and their region settings do not match my own. The application loads up a dataset and attempts to receive a small amount of data before allowing the user to log in. When this is removed, the problem occurs immediately after the user logs in to the app. I cannot seem to find the proper settings to force the user to use either my Region, or to allow the application to figure it out on it's own...

View 1 Replies

Get List Of Specific Files In Specific Folder?

Dec 19, 2011

So im trying to get evything that has ends with .iso into a list box, tryed a couple of things but not getting anywhere as yeat

Here is code.

Dim Locate As String = Application.StartupPath & "\Games\"
ListBox1.Items.Add(Locate.EndsWith("*.iso"))

The Locate String is there because thats the location where the iso files are but the application is in the root of the drive. The ListBox1 command is fairly easy to understand

View 14 Replies

Round The Prices In This Manner: If It's 12.48 Should Be 12.99?

Aug 12, 2009

I want to round the prices in the following manner: if it's 12.48 should be 12.99, if it's 12.98 it should be 12.99, if it's 12.10 should be 11.99 and so on.

View 39 Replies

Lock A Folder In Professional Manner (without Using Encryption)?

Jun 18, 2011

I want to lock (or completely hide without allowing to see with show hidden folder check) a folder with C# for windows platforms. This should be work for both FAT and NTFS file systems. I do not wont to use encryption since it is slow.

Also I need this as a robust solution so changing CLSIDs is not working.

Also removing permission with FileSystemAccessRule with AccessControlType.Deny also not working for me. Because that only work on NTFS and also if it is worked then user can right click the folder and remove deny AccessControlType.

View 3 Replies

Programmatically Utilize Textboxes In A Serial Manner?

May 13, 2012

let's say I create a basic windows form with 100 textboxes, and create a variable that starts at 0, and counts up to 100. How could I pseudo-effortlessly have, for example, textbox7, when the variable is at 7, display a piece of text, instead of writing 100 lines of code such as

if vara = 7 then textbox7.text = "hello"

is there a way to utilize something in the nature of LINQ, where you could somehow say,

if vara = 7 then textbox & varA & .text = "hello"

this is just an example, I know it will not work, after paying a small bit of attention to the likeliness and possibility.....

View 5 Replies

Parallel.For Listview Items In A Thread Safe Manner?

Feb 22, 2011

I have a small program that checks webpages for certain strings. I am using VB express 2010 .net version 4.I have the list of URLs in a listview, and loop through all the urls, perform a webrequest, check if the source contains certain strings and then add a subitem to the current listview with text to indicate the result I am attempting to speed the application up using a parallel.for loop, but this causes a cross threading exception.This is the code for single threaded:

For i As Integer = 0 to lvUrls.Items.Count - 1
Dim lv As ListViewItem = lvUrls.Items(i)
lv.UseItemStyleForSubItems = False

[code]....

View 2 Replies

Place A Video On An ASP.NET Page And Make It So That It Will Load In A Timely Manner?

Sep 28, 2010

I have an .avi video (500 MB-50 minutes) that I embedded using the following code in VB.NET:

<OBJECT width="360px" height="360px" CLASSID="CLSID:6BF52A52-394A-11d3-B153-00C04F79FAA6" VIEWASTEXT>
<PARAM name="autoStart" value="False">

[Code]....

Worked fine except that it took approx 5 minutes to load. Converted it to a wmv file (cutting it down to 300 MB) and it started playing instantly while it download. Unfortunately there are some computers that will not play it for some reason. It will load and the timer starts up as if the video is playing but there is just a black screen. I ran some tests and determined that it's not a browser issue.

How can I upload a video that instantly plays on all computers?

View 1 Replies

Can Get A Specific Object Out Of List

May 23, 2010

I have a number of custom objects of type X. X has a number of parameters and must be unique in the collection. (I created my own equals method based on the custom parameters to examine this) In each object of type x, I have a list of objects y.I want to add/remove/modify easily an object y. To write the add method, it would be something like add(objTypeX, objTypeY)I would check or the collections already has a objTypeX.If so: i would add the objTypeY to the already existing objTypeX else: i would create objTypeX and add objTypeY to this object. [code] Which collections should I use? I tried with hashset but i can get a specific object out of the list, without run down the list till I find that object.

View 1 Replies

Add Image To Its List With Specific Size For Each One?

Apr 18, 2010

In image list all image use unique size.

How add image to image list with specefic size for each image?

View 10 Replies

How To Select Specific Items From A List

Sep 28, 2010

I am working with a list of points. It is declared as a global in my form.[code]the only issue is that instead of New Point(100,100) i need to be able to navigate to the previous 4 records in the list. pull out the 4 x vals the 4 y vals and boom there you go. In the old days id make a simple loop and get r done but im not sure the syntax to step through the list that way.

View 8 Replies

List Of Specific Files To Array?

Sep 22, 2010

I have a question about putting a list of files into an array. First of all I don't know if using an array is the best method to do this.[code]...

Now I want to put them into an array because I have to do something with each file (each file has to be converted to an XML, the code for that I have already written).[code]...

View 14 Replies

Structures - Need Specific Item From The List

Jul 13, 2011

for example i have a structure class and obviously created a new list as so. My UserControl creates the new car.

[Code]...

View 2 Replies

How To Write An LDAP Query To List All Of The PCs In A Specific OU?

Sep 14, 2010

Im just trying to figure out how to write an LDAP query to list all of the PCs in a specific OU.

View 3 Replies

List Box : Load Only Those Lines That Contain Specific Word?

Jun 5, 2011

I'm using this code to load a text file into list box.

r = New IO.StreamReader(str)
While (r.Peek() > -1)
ListBox1.Items.Add(r.ReadLine)
End While
r.Close()

But it loads the whole file into list box. I only want to load those lines of text that contain following number: 2008. It doesn't matter if the "2008" is at the beginning, middle or the end of a line.

View 1 Replies

Use List Box Selection To Add Specific Language To String?

Jun 19, 2010

I'm using a list box with multiple selections to add to my string -- I can't figure why my conditional doesn't seem to work. Every selection in the list box is intended to add specific literal to the string I'm building. What am I doing wrong See my code:

'special conditions
strScopeParagraph &= "Some special conditions which will require specific attention are:"
'strScopeParagraph &= ControlChars.Cr

[code].....

View 5 Replies

VS 2010 List Folders Under A Specific Share?

Feb 29, 2012

I am trying to list folders under a specific share example: \servernameshare I want the list to display in a listbox named folderlistBx I do not want to see file names or subfolders, just a list of folders

Private Sub ListBtn_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ListBtn.Click
Dim FS As New FileSystemObject

[Code].....

View 1 Replies

Populating A Font List And Removing Specific Items?

Sep 23, 2009

I've gotten a listbox control to populate with a list of installed fonts, but I need to be able to click a button and remove the selected item from the listbox. How do I do this? Every time I try, an exception is thrown.

Here is the code:

Public Class Form1
Dim fonts as New Drawing.Text.InstalledFontCollection
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load

[code]....

View 2 Replies

Programmatically Add A Drop Down List In Asp.net With Specific Pre-selected Item?

Nov 30, 2011

I've worked out how to create a DropDownList using the following code: <select id="salesPersonDropList" runat="server"></select> In my .aspx page, then my code behind loops through database output running:

Dim newListItem As ListItem
newListItem = New ListItem("Title", "Value")
salesPersonDropList.Items.Add(newListItem )

What I can't figure out is how to programatically set which of the List Items created is the one to be pre-selected in the rendered DropDownList, ie, how to create what I'd write in HTML as:

[Code]...

View 3 Replies

Ranking Of List Items Based On Specific Property?

Feb 17, 2012

I need to determine the ranking of the List items specified by one specific property of the items.

I have the following Class:
Public Class LevelA
Property items as New List(Of LevelB)
Public Class LevelB
Property factor as Double
ReadOnly Property rank as Integer
End Class
End Class

For example, let's say I have three items in the List. I have set the factor property for the first item as 5.50, the second item as 6.60 and the third item as 3.30.Now I should be able to get the rank property of each item (the highest value should be ranked as 1). Here the first item in the list should have the rank as 2, the second item as 1 and the third item as 3.

What kind of procedure is needed for the "ReadOnly Property rank as Integer" for returning such values? It should somehow be able to access the list in the parent class probably?

View 3 Replies

VS 2010 List(of T) Update Data Of A Specific Member

May 2, 2011

I have a List "MyList(of MyStruct)"

[vbcode]
Public Structure MyStruct
Public ID as Integer
Public Value as Integer
End Structure
[/vbcode]

At some point I need to update the Value of the member with ID=X, but I'm stuck.

Do I need to search for the index of that member using FindIndex and then set the value like MyList(index).Value=Something?

Or

Find the member itself by using Find, but how would I then set the new value?

View 3 Replies

VS 2010 List(of T) Update Data Of A Specific Member?

Apr 25, 2010

VS 2010 [RESOLVED] List(of T) update data of a specific member

View 6 Replies

Get List Of All Users That Belong To Specific Department From Active Directory?

Mar 18, 2010

I want to get a list of all users and groups that belong to a specific department (entered by the user) from Active Directory using VB.Net and DirectoryServices.

View 2 Replies

VS 2008 Read Specific Lines From Text File Into List Box

Nov 15, 2009

I am trying to read from a file that was created with a stream writer the names line from the text file that contains data for name, phone number, pager number, cell number, voice mail, and email.What I need to do is read and load the names from the file into a list box, and then from the list box be able to choose each name and have the information (phone, pager, cell, etc.) show up in text boxes that goes with the specific name.

View 4 Replies

Find Specific Characters (items) In String Array (or List) And Then Merge Them?

Mar 8, 2012

I'm having a problem recently, a logical issue so hard to determine various examples.I need the text that is inserted in textbox, which has been altered or modified or twisted to have a proper format through line accordance and constant white spaces etc. And some cases I stuck at defining the If statement within the loop. Here's an example of a text I'm trying to reformat.[code]I'm using Microsoft Visual Studio 2010 Ultimate version with Microsoft SQL Server Management Studio. This code is being fired on mouse click event of a button control. This is a snippet of my code there are more filtering after but here is what should be changed.

View 11 Replies

Add A String Item, Returned From Another Form To A List Box At A Specific Spot In Place Of Another?

Nov 22, 2010

there's a list-box with items, and say you want to modify an item in the middle of the list. You select that item and click "Modify" button and a new form appears with the previously selected item data from first form ready to be modified in a text-box. After modifying and clicking Ok the second form suppose to return that modified string to the first form and insert the modified string into the same spot instead of the originally selected item, so it looks like it was edited to the user.

View 2 Replies

VS 2008 Finding A Specific Row And Specific Columns In Data Base File (Access)?

Jul 24, 2011

I wonder if it is possible to find a specific row and specific columns in data base file (Access) . You see , I am using a DataGridView control to show only SOME of the columns (fields) of a table from an Access file . For example , lets say that in the DataGridView control I only show the following fields :Field1 , Field2 and Field3 .Now , when the user selects an entry in the DataGridView control , I want to insert the text from Field4 into a text box on the form .

The problem , however , is that I don't know how to get the specific row in the data base file and also I don't know how to get the text in column (field) Field4 of that row .One thing that might be important is that the index of the row in the data base file is not necessarily the same with the index of the current row in the DataGridView control . This is because in the DataGridView control the rows are order by the contents in the ID Field .ol .

View 2 Replies

Count Occurance Of A Specific Number & Specific String In Text File Using Vb8?

Dec 13, 2010

i am a beginner in vb8 i have a text file named alarm.txt,sample alarm.txt file is shown below

can someone help me to read the alarm.txt file and extract data.for eg

[Code]...

View 1 Replies

Searches Specific Folder For Text Files Which Contain Specific Word

Jun 14, 2009

I have search system that works like charm: 1> Searches specific folder for text files which contain specific word 2> Puts those text file names and/or paths to listbox However i want it to put (instead of InputStr) the specific line where word is found in text file to listbox.

[Code]...

View 8 Replies

Use ToolTip To Show Some Specific Information About Specific Locations Of A Drawing?

Oct 27, 2009

The below picture is generated by the following code:

Public Class Form1
Private Sub Form1_Paint(ByVal sender As Object , ByVal e As System.Windows.Forms.PaintEventArgs) Handles Me .Paint

[Code]....

What I want to do is when I click on each grid on the form (Touch Screen), a tooltip of some stored information about the grid appears on screen. For example, if I click my mouse on square 6,8 then some stored information such as grid number, grid name, level...etc appears on the tooltip on the screen.

View 5 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved