I am new to VB.Net and am just learning.. I have a DataGridView in a winform project and have two columns "PO_Created", "PO_Date" (PO_Date being a check box) I would like to know how to have PO_Date populate a date when the check box is ticked.Dragging a check box and a text box on the form and placing the code below in the checkbox control
If CheckEdit1.Checked = True Then TextBox1.Text = System.DateTime.Today.ToShortDateString Else TextBox1.Text = " " End If
is what I want but I don't know how to do this in a datagrid if someone could give me a hand on this topic that would great.
I'm Currently working with a payroll system with daily time record.. I'm having troubles with their time records, what i did is this, i created 6 textboxes on the form the 1st textbox is for the AM IN 2nd is for the Lunch OUT the 3rd Is for the total hours worked for the half day, and the same for the 4th to 6th textboxes. I actually get the difference of 2nd and 1st textboxes and show the result at 3rd textbox and same for the 4th-6th textboxes using this code that I also get in this site
Dim TimeA As Date Dim TimeB As Date Dim hh As Integer
[Code].....
but i really didn't understand it so right now I don't know how to add the value of textbox3 and textbox6 so I could get the total hours worked of the employee..
I Was trying to make a program in vb.net, its idea like that
1) Check site titles name in every web browser that opened in the computer
2) find a specified word in the site titles
3) if the program found it , it Msgbox the site URL
I have tried this to check site titles name in every browser For Each a As Process In Process.GetProcesses
Dim x As String = a.MainWindowTitle x = x.ToLower If x.Contains("microsoft") Then MsgBox("microsoft website is opened")
[code]....
but the problem in this code that if i'm opening some tabs and specified title in site is opened but i'm in another tab (another site) it does not work !
I Was trying to make a program in vb.net, its idea like that
1) Check site titles name in every web browser that opened in the computer
2) find a specified word in the site titles
3) if the program found it , it Msgbox the site URL
I have tried this to check site titles name in every browser [code]but the problem in this code that if i'm opening some tabs and specified title in site is opened but i'm in another tab (another site) it does not work !so how can i fix it ? and how can I make the program gives me the URL if specified word in title is found in IE and Firefox?
My question title says all. Suppose the given date is 7th july 2011. So what I want to get in result is 6th July 2011. And leap years aren't to be counted. The day number always should be one less than today. I did this:Dim year As Date = "1/15/2009"''adds 1 years to current dateMessageBox.Show(year.AddYears(1))
I only need to subtract 08800000 from whats in bold, the rest will stay the same. The value in textbox1 will always begin with 0x0880xxxx I need to convert that to 0x00000000 so basically I need to subtract 08800000 from textbox1 and place the output in textbox2.
I am waiting for a confirmation email to arrive within the web browser I am using I do not need to click any buttons to open this mail I just need some help figuring out how I can check whether it has arrived or not I already have the code to find the link and navigate to it (I had to navigate rather then invoke due to it trying to open in a new window outside of web browser and out of my control)
How can I keep checking for my specified element and when found carry out the rest of my code or is there another way I should be doing this the code I am using to find the verification link and navigate to it is as follows
[Code]...
I really am desperate for help on this one I have been reading about loops but cannot seem to find any example which I can use and change to my needs I have done so well in learning up until now and I have really hit a brick wall for something which seems so simple
I need my program to check if a program is running. The program i'm talking about is Need For Speed World. (NFSW).If the program is running then, I want Label1 to say "Running". And if not: "Not Running".
Im trying to make a program that can tell me if a program for exemple notepad, start running, keep running and stop running and the result appear in a label.for this im based on this program: [URL]..But when i try to change the:MsgBox("Process started: " & e.NewEvent.Properties("ProcessName").Value)to
label1.text = "Process started: " & e.NewEvent.Properties("ProcessName").Value gives a error.
i want to make crystal report of profit and loss statement i have a column of "vr_type" and there are 4 types in it "sale invoice", purchase invoice" now i want that put a 4 formula s where i select that "sum (vr_detail.debit) where vr_detail.vr_type} sale invoice it make Sum of al these types so kindly tell me what formula i should use to get the result in simply i want sum of sale,sum of purchase,sum of expense?
I have an access DB with 3 columns, ID#(Primary Key), Minutes, and Profit/Loss. I'm using the Total feature in access which adds a Row 'Total' to the bottom and shows the sums. How would I get the sum from the 'Minutes' column, 'Total' row, and get that to show in a text box (txt002004Min) ?
Imports System.Data.OleDb Public Class Form13 Dim cn As OleDbConnection
I have an app that adds ammount to gether and i am trrying to do some error checking. This is the code i Have so far
CODE:
I would like to turn this into a select case so that it calls all the code need to check before running. I have tried to do it my self but has been ages since i coded and even then it was in VB6. I know there is a way to do the case in a module and then call it into the form where i need it. i have 3 radio buttons that if they are not selected it pops up a message to say so.
I want the program to check the number of items in a list box, then send use that number to form a FOR loop and send each to the serial port individually. It actually sends everything, but the program always crashes after the last one saying that the sdprintcount variable is an invalid number for the index. I don't get it as this happens no matter how many items are in the list, and it always crashes on the last one. It sends it, but then it says the index number is invalid.
********************************* Dim sdmods As Integer Dim sdmodsp As String sdmods = sandwichmodlist.Items.Count
I feel like the answers I seek are rather obvious so I feel silly for having to ask, but I just can't seem to figure this out (I'm new to threads, and am really only comfortable using them in Java at the moment). I have an Excel Addin application created with VB.NET, and I've noticed that occasionally while it's running some code (it's no one specific block of code) the program execution will just stop. This is especially problematic when I've set ScreenUpdating to False for Excel because the users then have to completely close out of Excel to get ScreenUpdating to true.
I have a program that uses the mouse to find window captions. I made a test program that just does that and it works fine. I copied and pasted the code into my other program and it doesn't work. The mouse position changes, but it will only get the caption of a window if it is at the top of the screen. It seems that only the Mouse.X position is changing, but I put the MousePosition.X and Y in a label and they are both changing. Can anyone explain why this is happening?
Boss wants us to start adding uniform comment headings to Functions and Files, so I tried to write some snippets to do it, but I can't get it to work.[code]...
is there anybody know how to indicate the checkedbox inside the datagrid is ticked. should i put all the code inside the control something like DataGridView1.CellValueChanged or any other control?
I have a VB windows form for users to put in their payment amount and credit card information for direct payment. I have downloaded the .NET and Java code snippet from paypal for direct payment.How do I integrate the .NET or Java code into the VB form. Finally, how do I pass the parameters from the form to the snippet code.
I have created a simply Pizza program (for a summer project not education related) that uses check boxes to determine what the customer wants. Basically a simple pizza ordering program.I was wondering as I have used the If statement over and other again for different parameters and variables, is it possible to use multiply arrays to simply the VB Code...I was advised to use Constructors in VB.Net Or is there a more simpler way to go about creating this program...or a better way of programing?What about decreasing the repetition in the code?
I made a simple code that changes the background color for my program and then save it. But for some reason, it will not work if the RGB code has 255 in it.
Public Class Form1 Dim R, G, B As Integer Private Sub Button1_Click(sender As System.Object, e As System.EventArgs) Handles Button1.Click R = TextBoxR.Text
I have a datagrid which has a column called "tick". There is a button which will "ticked" all the the records in the datagrid so the user don't need to do it one by one.I have been reading MDSN but I am more confuse that before.my old vb6 code was:
On Error GoTo cmdTickAll_Click_Error Me.MousePointer = vbHourglass 'Loop Through and Set all Ticks the Not Ticked[code].....
Ok i know your all denying knowledge of VB6 here but it still exists and people are still stuck with it for now! Plus youre a brainy bunch so i hope you can help, it is more .Net related anyway i think.Ok ive inherited an old VB6 app that needs to access a VB.Net dll and im having issues with it!Ive compiled the DLL and made sure all the Com boxes are ticked so ive now got a .DLL and a .TLB file.
Now when i load up the VB6 app and go to add a reference to the TLB file it makes the reference ok but when i run the app i get a "xxxxx.dll cannot be loaded" error when it hits code trying to use it.What ive tried is running Regasm against the DLL with the regfile option to generate a registry file that i can load onto my machine but it still gives that error.
im not sure exactly how to get a .Net dll into vb6 tbh so im just fumbling my way with it. What i think has happened is a previous version of the DLL was registered on the machine, has since been deleted but the system is still trying to use the earlier one, reference pointers still around?
So my questions are 1. how can i clean the machine out , apart from formatting it!, so i can register the new DLL properly and cleanly on it. 2. What exactly is the right way to get a .Net component into an old VB6 app? I was assuming it was by using the TLB and making a reference to that, it wont let me add a reference stright to the DLL itself.
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Dim StreamReader1 As New IO.StreamReader("L:\Glossary\Glossary.txt")