Answer Questions
Hanspeter FileSystemWatcher in arraylist
Hi all, I'm trying to monitor changes in a number of folders using FileSystemWatcher. I have a procedure that accepts the path to monitor. A new FileSystemWatcher is created for that path, together with its event handlers, and added to an arraylist (watchList). This seems to work fine, however I would like to be able to modify the attributes of specific watchers at run-time. I'm doing something like this to stop the first watcher in the arraylist: Dim w As FileSystemWatcher w = watchList.Item(0) w.EnableRaisingEvents = False This causes a NullReferenceException at the last line. In break mode I see the arraylist has 3 elements of type Object, but adding a watch for watchList.Item(0).path (or any other watcher pro ...Show All
mrplatypus how to write a loop to access all labels on a form
I have more than 200 lables on a form. When a button on this form is clicked, I need to update the display of all these lables. How can I write a simple loop to do that Hi, the following code will loop through all controls, put directly on your form and assign a new text to all controls that are labels: Private Sub Button1_Click( ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click For Each control As Control In Me . Controls If TypeOf control Is Label Then Dim myLabel As Label = DirectCast (control, Labe ...Show All
davidgreen24 how to work in vb script
hi friends, can anybody say me how to write code in vb.net for vb script since i do a project in that narasiman wrote: hi friends, can anybody say me how to write code in vb.net for vb script since i do a project in that. Hi, Depends on what you want to do, just edit the vbscript or full HTML pages containing vbscript or other See the ASP ( Active Server Page ) pages at http://forums.asp.net/ where they talk of database driven websites etc using ASP.Net which may include stuff on VBscript. See also.>> http://www.w3schools.com/vbscript/default.asp and their home page at>> http://www.w3schools.com/ Regards, S_DS anybody can help this q ...Show All
mcmcom My SQL Update function isn't working in VB, can someone help?
My SQL statements are perfectly fine when I test them in the Query Builder, but I can not, for the life of me, figure out why they won't work in my application. Here is what I have as my SQL statement within my UpdateQuery function: UPDATE members SET id = @id, first_name = @first_name, last_name = @last_name, phone_number = @phone_number, date_joined = @date_joined WHERE (first_name LIKE @first_name and last_name LIKE @last_name) Here is how I am calling the function: Me.DsAllMembersBindingSource.EndEdit() Me.DsAllMembersTableAdapter.UpdateQuery(Me.IdTextBox.Text.Trim(), Me.First_nameTextBox.Text.Trim(), Me.Last_nameTextBox.Text.Trim(), Me.Phone_numberTextBox.Text.Trim(), Me.Dat ...Show All
Greg Van Mullem Call a vb.net form from a vb6 mdi Container
Am i overlooking something I followed the instructions and created a . net interopForm project. Referenced everything in VB6 A vb.net form expects the property MdiParent to be set ... This property is not available to set , will i get there by adjusting the interface of iiForm Any suggestions are appreciated. Thanks Steve, MDI support between .NET and VB6 Forms is not supported in the Toolkit. See Paul Y's response here: http://forums.microsoft.com/MSDN/ShowPost.aspx PostID=754775&SiteID=1 Bryan Can you be more specific about what you did I assume you are talking about the VB6 interopform toolkit. Can you explain in more detail the steps you did (a ...Show All
LastHope My.Settings overwritten during upgrade installations
Hello, Is there a way to keep the settings stored in My.Settings from being "reset" during an upgrade installation Every time I put out a new build of any application using My.Settings the settings in My.Settings are reset to whatever they are in the visual studio designer. Oh, MSI, sorry. Just using the basic MSI designer in Visual Studio. For anyone else dealing with this issue, here's how to resolve it: Add a "ShouldUpgrade" boolean setting to your Settings.Settings file in the designer and set its value to true. In your main Load event for your startup object, add: if (My.Settings.ShouldUpgrade) then My.Settings.Upgrade() ...Show All
BMcDowell Regular Expression help needed...
Is it possible to just capture the text before the (<number>) i tried few combination, but nothing works. for ex the following is the string : test string here (123456), test2 string here (987654), test3 string (2093849) I need to capture those maroon bold texts like : "test string here" and then "test2 string here" and "test3 string", ignoring the items inside brackets. \(( <number>[0-9]+)\)\, The above expression gets me the stuff within brackets. but I need to get the text as i mentioned above... thanks in adv. rgds If you changed from c# to vb, you might check that you update the strings. Unlike c#, vb does not do any escaping in ...Show All
regthesk8r Vista problem with handshaking on serial ports?
I am working on an application for a device that uses hardware handshaking on the serial port. Here is the code that I use to open the port... mscomm1 = MyPort.OpenSerialPort( "COM1" ) With mscomm1 .Close() .DataBits = 8 ' .BaudRate = 9600 .Parity = IO.Ports.Parity.None .StopBits = IO.Ports.StopBits.One .Handshake = IO.Ports.Handshake. RequestToSend .ReadBufferSize = 500 .DtrEnable = True .RtsEnable = True .ReceivedBytesThreshold = 2 .Open() End With This does not work under Vista. I have tried it under Vista Ultimate on two different test machines using the 'built in' serial port. It does work under XP on the same machines. I have also tried it under 98 and ME on othe ...Show All
denna69 VB code to convert xml file to .txt
Hi, I have a xml file that I generated with a SQL query. I need the info from that xml file converted to a .txt file. I can not export the sql information to plain text, because I need to modify the info into a certain way as well. The first thing I need to be able to do is to convert xml to .text and then I will get to converting in some format. Can someone please help me or point me to documentation or books to read. I really need to do this and would greatly appretiate the help. Thanks! S_DS, This was gret! Thank you so much! I can now start looking at the pages and teach myself what to do. I might post again if I get stuck. I really appretiate the help S_DS Thanks Hi, Could you not ouput a ...Show All
joseadolfo printing
i have a form with a header page and one or more information pages. I want to print it in VB ...my problem is that setting "ev.hasmorepages=true" doesnt seem to fire off the event again... Protected Sub DoPrinting( ByVal sender As Object , ByVal ev As System.Drawing.Printing.PrintPageEventArgs) If FirstPage Then PrintMainHeader(ev) 'print the first page / header FirstPage = False Else : PrintNewPageHeader(ev) ' subsequently print the information page End If If Not (AlreadyPrinting) Then PrintMyForm(ev) ' being printing on the page End Sub 'ThePrintDocument_PrintPage Private Sub PrintMyForm( ByVal eventE) Dim Tabs As Control For Each Tabs In Me ...Show All
DrJim [VB.NET] How to merge many GIF Files into one file
I need to create a software that it merge many GIF File into one file container. My application has this form I want that when i click "Add File" it shows an OpenFileDialog and that add file's path in the ListBox And when I click "Merge File" It merge all GIF file present in ListBox And when I click "Split File" it split all GIF File present in a File Container and that It save GIF Files in the same directory of the File Container I tried to write the code but it change any bytes of the GIF Files when I merge :( and i don't know how to use Split Function in VB.NET [Off-Topic]I'm new in VB.NET and i don't know fine this new programming language Best Regards Flash You mean so ...Show All
barkingdog Can I sum class values from diferent classes?
I have a Class like this Public Class Item Public Quantity1 As Integer Public Quantity2 As Integer ..... Public Quantity20 As Integer End Class And two object like: Dim Item1 As Item Dim Item2 As Item Now, I need to sum all the Quantity's, from 1 to 20. Can I do something like Dim ItemSum As Item ItemSum = Item1 + Item2 I know I can make a function to sum all "Item" variables, BUT, how can I sum any class variables Is there something like this code For Each ItemSum.Item"n" In { Item1, Item2, ... Item"n"} ItemSum = Item1 + Item2 + ... + Item"n" For this ...Show All
87jerome Inserting a record into a Gridview
I am using Visual Web Developer 2005 Express Edition, with VB and SQL Server 2005 (express). I want to have a gridview that will edit/update, delete, and insert records. It should be easy - editing and deleting are simply a matter of checking a box on the smart tag. But how do I insert a record I was expecting another check box option that would handle it all (perhaps with an empty row at the bottom, in the manner of Access and SQL), but I've not been able to find such an option. Do I have to create an event handler - if yes, what event, what do I write I haven't been able to find anything in the help, or in the forum. This is such a basic question - have I missed something obvious Regards, Robert ...Show All
Joe Kehnast I'm making a conversion program.
For those of you who know me, I've finally settled on an idea for a program. It converts (for starters) from anything that ends with meters (you know, centimeter, millimeter, kilometer) into anything else that ends with the word meters. You get the idea. I'm useing combo boxes, and I need to assign values to the names in the box, so they can be multiplied. Like, the selection (this is exactly what it looks like) "centimeter(cm)" needs to be assigned the value 0.01. How do I do that, and make it so that when one thing from one box is selected, and one thing from another box is selected, and a button is clicked, they get multiplied together Thanks. The above code i have posted does the matter: ...Show All
wuzzle ProgressBar colours.
I want to change the little blocks on a progressbar to red at a specific event, then back again to their original colour at another event. I also want to have them as blue, on another bar. Excellent, thanks. Nope, still the M$ green on white. Asday wrote: I'll try that and see what it does. Not too sure what you mean by the 'stripey effect' though. Thanks! EDIT: Nope, didn't work. Hi, I was thinking of a stripey progress bar like alternate colours like toothpaste or a candy bar. In one event Sub put one colour like.>> ProgressBar1.ForeColor = System.Drawing.Color.Blue In the other event Sub put.>> ProgressBar1.ForeColor = System.Drawing.Color.Red Does that not wo ...Show All
