i was told i need to use invoke to marshal to fix this exception : Control 'TxtFolderActivity' accessed from a thread other than the thread it was created on. i cant seem to figure it out. here is the snippet of code where i need the invoke. Private Sub logchange(ByVal source As Object, ByVal e As _ System.IO.FileSystemEventArgs) If e.ChangeType = IO.WatcherChangeTypes.Changed Then TxtFolderActivity.Text &= "File " & e.FullPath & _ " has been modified" & vbCrLf End If If e.ChangeType = IO.WatcherChangeTypes.Created Then TxtFolderActivity.Text &= "File " & e.FullPath & _ " has been created" & vbCrLf End If If e.ChangeType = IO.WatcherChangeTypes.Deleted Then TxtFolderActivity.Text &= "File " & e.FullPath & _ " has been deleted" & vbCrLf End If End Sub
Makniteasy
Makniteasy
Posts
-
invoke to marshal -
textboxesvb.net Makniteasy
-
textboxescan anyone help me correctly validate some textboxes? Makniteasy
-
current row edit ?c is the variable for my datagrid current row index. when c is gotten by the dataset it is shown in textboxes. if i edit this row how do i get the datagrid/ table to accept the changes to that row? Makniteasy
-
text fileI have a problem with data in a text file. my data is a row in a data grid, but when i write my data to the file it writes it like this: 101405johnsmith050605. when it writes the data row like this, how do i get certain things to certain places? like 10 would be the record number and john smith would be the payee and 050605 would be the date. since it is not writen like this I cannot get john smith to textbox2 on form2 and i cant specify that i want 050605 to textbox3 form 2. how do i write the datarow so i can have certain pieces of it go to certain textboxes? Makniteasy
-
textbox to loop?I have a loop for a datagrid that shows all the amount rows added together in the caption.text of the datagrid. now i am going to change the loop because i dont need to add the rows, i need to subtract them. i know how to do that, but my question is that i have a textbox(textbox6) for which the user will need to enter a balance to show in the caption.text before the loop can subtract anything. any tips will be greatly appreciated. this is what i have.
Dim t6 As Object t6 = TextBox6.Text For Each t As String In TextBox6.Text Amount += t Next Me.DataGrid1.CaptionText = "Current balance $" & t6.ToString()
it is acting wierd. if i input 7 in the textbox then the data grid recieves only an addition of 1. if i input 9 it gets an addition of 4.why Makniteasy -
Loop Questionthanks for the help. The help you provided was exactly what i needed. i was trying to get the amount column of a datagrid, for which the user enters the amount they paid, to show in the datagrid caption text when entered. I am going to post another question so that you wont have to keep to returning this one. thanks Makniteasy
-
Loop Questionthanks that fixed that problem but now i have another:
Dim Amount As Double = 0 For Each dr As DataRow In ds.Tables(0).Rows dr = dr + ds.Tables(0).item("Amount") Next Me.Text = ("My Balance $") & ("Amount").ToString
now this is underlined. i think im lost in the loop now.any more suggestions? Makniteasy -
Loop Questioni need to loop some rows in my datagrid to add them and show the total. i am using:
Dim dr As DataRow Dim Amount As Double = 0 For Each dr As System.Data.DataRow _ In ds.Tables(0) dr = dr + ds.Tables(0).Rows.Item("Amount") Next Me.Text = ("My Balance $") & Amount.ToString
everything is fine except the underlined part. it keeps saying that it is a member of system.data.datatable which is not a collection type. does anyone know what i am doing wrong? Makniteasy -
datasetthanx
-
dataseti have create datasets before and now when i apply:
Imports system.data
it says this namespace cannot be found. why is that? -
fill datagridwhat type of file is your data in? if it is xml then you can try:
Dim DS As DataSet DS.ReadXml("C:\the file path")
-
question2would it be hard for a beginner to write a program that would text message my phone when my computer is messed with. such as if i leave my house and my screen saver goes off because someone moves my mouse or if my computer is on stand by and someone causes it to return from standby mode the program will text my phone. or if my computer is off and someone turns it on then i need it to text me. any suggestions will be helpful I have no idea where to start.
-
questionwould it be complicated for a beginner to write a program that would text message my cell phone about recieving a new email. I want it to tell me if i have new mail. any suggestions or tips would be greatly appreciated. THANX
-
help transferingI have visual basic 2005 express on my pc. When I save a project it saves it to c:\mydocuments(visualstudio/projects). lets say i have a project called windows application 1. as you already know in this file will be the bin the resources and everything else pertaining to the project.I have a small memory stick that attaches to the usb port with 256 mb.I can copy the file windows application 1 to it. But then when I try to open the project again on my pc it says it has been moved or deleted,but it hasnt it is still there. I only copied it. why is that. I am copying to this memory stick so I can use another pc to work on this project as well. But I keep losing it on my pc. i am tired of recreating it. any suggestions? thanx
-
date showI need to get the date to show in something such as a textbox or whatever. But everything I try doesn't show the date. I set the textbox to read only and everything. i am using ;
Dim D As Date D = Today TextBox7.Show()
can anyone help me? thanx -
row additionummm... I dont understand why count is underlined as wrong and datagrid.rows is wrong?? any suggestions? thanx
-
row additionI have a datagrid with 6 columns. column 6 is the balance column and column 4 is the amount payed.I need column4 row1 to subtract from column6 row1 and show in row2 column6.then I need column4 row2 to subtract from column6 row2 and show in column6 row3. I need this to loop or something. any suggestions?
-
DataGrid RowsIm confused because when I entered this the whole thing was underlined.you already know what that means im sure. should I be entering it elsewhere or what. I greatly appreciate the time you are sparing to help me.
-
deleteI want the user to be able to delete any row selected. Yes the data is displayed in a datagrid. how do I capture the ID? And just as a little memory refresher its Remove. thanks for the help.