Check If 24hours Has Passed?
Feb 1, 2012
Ok so I tried to make an application that will open a URL ONLY if 24hours has passed since it had previously opened. My idea is that it will save the time/date to a .txt (unless there another way which im completely missing?) when it is opened (only open if the current time is the saved time/date + 24hours) and rewrite it after every time.
When I say I tried, I mean I opened a project, realised I had no idea what to do and stared at the Form for 10minutes.
View 3 Replies
ADVERTISEMENT
Mar 23, 2012
I want to pass a List of T where T is an object I've created that has about ten properties (strings, dates and integers).The lst passes to the function successfully. I am also passing an New T of the Object (itm as T).I can see all the values (see image below), but because it's generic I cannot seem to retrieve the property values and I cannot figure out how to iterate through the properties of each itm as they are retrieved in the For Each.[code]
View 10 Replies
Dec 5, 2009
How to get list of all resolution of client monitor and check with resolution passed by application
View 2 Replies
Dec 16, 2011
I have a DB table with the following columns
PolicyNumber
NextPremiumDate
PremiumNumber
Example For each PolicyNumber i have 5 NextPremiumDates.I want to display the 1st NextPremiumDate which is easy ...but i want to show the next NextPremiumDate only after the last NextPremiumDate has passed...How do i check if the last date has passed?I mean if i have 5 dates in the table given above...how do i check if the 1st date has passed then show 2nd date ...if 2nd has passed show 3rd and so on.
View 1 Replies
Jun 7, 2011
I'm very new to vbs scripting and am trying to set a System envinonment variable which will be used by a subsequent cmd file which is called by the VBS script which created the ENV varible.The vbs script creates the varibale correctly but the called CMD file does not find it. I thought a child process inherited its parent env settings. I understand the child can not change the parents env. why the cmd file does not see the variable, am I using the wrong shell command in vbs to call the cmd file or something?Here is the VBS script that simply sets a System varibale and the CMD file below which attempts to log it.on error resume next
Dim objShell
Dim objEnv
Dim usbDrive
Set objShell = WScript.CreateObject("WScript.Shell")
[code]....
View 2 Replies
Jan 27, 2009
Arrays Passed to Functions
View 1 Replies
Jun 7, 2011
I have kind of a problem in a database well its suppose to save a date but like a string, well more like a char type, and i need it that way to do reports.So there to tables Ventas and VentasDD so they have the same information what ever is introduced in the form both those tables have the information, the information is introduced simultaneously.So this is how its supposed to be save like VENTAS image the VENTAS date is saved correctly But the when its saved on VENTASDD table the format for some reason changes even if its the same type and text and everything, like the image shows, the first record i modified it manually but it is displayed like the other 3 records
View 1 Replies
Jan 18, 2011
I am working on a ASP.NET MVC2 website. For learning. I am working with the Visual Basic language.
In a view I would like to do this:
<%: Html.EditorForEnumeracion(Function(v) v.combustible%>
So, I created an HtmlHelper extension method:
Imports System.Runtime.CompilerServices
Imports System.Linq.Expressions
Imports System.Reflection
[Code]....
View 2 Replies
Oct 19, 2011
I need to pass in parameters to my sub/function. When the parameter is passed, the value in the string, I would like to get the value evaluated and sent as:
Dim strParams As String = drRow(0)
' drRow is a row from DB Table. the value in drRow(0) =
' "@FromDate=""" & Now.AddDays(-10).ToShortDateString & """&@ToDate=""" &
[code].....
View 2 Replies
Apr 15, 2012
I'm trying to make a sub that will highlight the text of a RTB that is passed.
Here is the code:
Private Sub SearchAll(ByVal selectedRichTextBox As RichTextBox)
Dim startPos As Int16 = 0
Dim matchPos As Integer = selectedRichTextBox.Find(TextBoxSearchFor.Text, startPos, selectedRichTextBox.Text.Length, RichTextBoxFinds.None)
selectedRichTextBox.SelectionBackColor = Color.Yellow
[Code] .....
View 4 Replies
Jul 19, 2011
I have a form with its method being "get" that passes the variables and their values to the query string, respectively. However, it also passes the viewstate variable in the query string. Now, I have a very long viewstate value on the given page, and if passed in the query string, the viewstate variable will cause the page to error out, due to "too long of a query string" which happens to also be too long of a url.
I cannot merely remove the viewstate variable - I need it. But I need to pass the viewstate variable along via some method other than get when the form is submitted, while the other inputs of the form (the non-hidden inputs) are appended to the query string.
View 1 Replies
Aug 12, 2011
I am in the process of switching over a control from a GridView to a ListView, but am stuck on accessing the new ListViews DataKeys. My ListView is setup as follows[code]...
View 1 Replies
Sep 25, 2011
i am passing paramters from one page to another all witht he same name...how do i look through them?
dim sHtmlBody
sHtmlBody = ""
for i=0 to Request.QueryString("name").Count
[Code]....
this is what i am doing and it works. But how do i access the individual name
Dim Name = Request.QueryString("Name")(i)
View 2 Replies
Aug 31, 2011
While creating instance of a Delegetae there comes a intellicence AddressOf , Sub and Function .
AddressOf signifies the address of the function or Sub , what does Sub or Function signifies ?
View 5 Replies
Apr 2, 2009
I need to see if a passed uielement (control) has a particular property like borderthickness, itemsdources, backgroundcolor and so on
View 2 Replies
Nov 27, 2009
The parameter to a sub is being passed a value like 501/500, of coarse this value should be converted to 1.002. Unfortunately, the actual value being passed to the parameter is 1.0.
[Code]...
View 2 Replies
Oct 28, 2011
I am working on a little program (game) is called Pig latin. I created a sub procedure and I passed the word to be converted by value and the piglatin word byref.Now when I call the procedure in the button click event I get the wavy green line under the variable passed by reference but the program works ok. Call Convert_to_Pig_Latin(strOriginalWord, trPigLatinThe error message when I hover my mouse over the green line says " Variable strPigLatin' is passed by reference before it has been assigned a value. A null reference exception could result at runtime."
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
[code].....
View 4 Replies
Apr 9, 2009
The code in my function looks like
FunctionMain(Product,var2,var3)
Call Function1
Call Function2
[code]....
View 11 Replies
Dec 6, 2011
I'm sure there are better ways to do this and i am open to suggestions. I'm not worried about speed i figured get it to work then i could improve it but my problem is mynewstr2 is not being set to the last value of mynewstr for some reason.(probably something silly im overlooking right now). at this point just converting the image to a string i can work with for my very basic ocr.
Public mynewstr2 As String
Public Sub pictostr(ByVal image As System.Drawing.Bitmap, Optional ByVal Mode As BWMode = BWMode.By_Lightness, Optional ByVal tolerance As Single = 0)
[Code]....
View 7 Replies
Feb 9, 2011
I'm having a heck of a time getting this to work....on other forums there isn't a problem with passing text to the websites but this site is driving me nuts.
[Code]...
View 2 Replies
Dec 21, 2011
I've got three forms, one is a search form where you use textboxes to filter the datagridview to find the Client you wish to work on.The second form is basic data entry, their personal details, assets, liabilities, etc is entered on this form.The third form calculates all sorts of reports about the particular client.I filter the binding sources each time to get the appropriate clients data on the form when the particular client is chosen in the first form.When I go to print the word document I create at the button.click event, it comes up with an error saying "Conversion from string "" to type 'Integer' is not valid. I've checked countless times, tabbed in and out of the textbox, named ClientIDTextbox, but it still wont accept that there is a value in that textbox - the error is appearing on the line where I use the textbox to query data from the database using the ID in the textbox.The third form holds the print button, and the second form holds the ClientIDTextbox which is causing this error.
I'm about to try querying the binding source, instead of applying a filter, using ClientBindingSource.DataSource = dt where dt is a datatable. I'll let you know how this goes! But in the meantime, is it because I've filtered the binding source multiple times across forms that the error is appearing?
View 3 Replies
May 19, 2009
I am still developing this function, but here is what I am intending it to do. This function will accept an Object, then try to determine its type. There are a specific set of types I am looking for: Integer, Boolean, Date, String. What I have so far is pretty privative, but it seems to be working so far:
Private Function DataType(ByVal entry As Object) As ValueType
Try
If IsNumeric(entry) Then
[Code].....
View 3 Replies
Feb 9, 2011
I have created a control, similar to an image combo, but a bit different. Any how, each of the labels that contians text to be clicked has an ID in their tag, that i wish to read. I have a sub routine called CBO_Click() which has the same arguments as a normal label click. How can i add the argument for the ID in the labels tag to be passed to this sub.
View 2 Replies
Aug 6, 2010
I've searched a lot on both google and here but sorry, couldn't find.Maybe I'm just asking the wrong question, so I'll try to explain it here to see if someone can help me:
what I'm trying to do is what in C would be as simple as int varptr = &var I have a form that is just a communication watcher/logger. It's just a blank text box with a Pause/Play button and a copy to clipboard button and every new activity on my serial communication is logged. At the moment the form have a timer that once a second do textbox.text = serial1.log ...
but the problem is that I also have serial2; serial3; sql1 that I would like to keep an eye on them, and considering my work here I'm sure I would be re-using this form a lot if I could make it portable. Create one form for each is just stupid, as you'll all agree.
Then I would like to have an sub initialise(byref log as string) that would store this reference into an local variable within the form; so that every new instance of my form could be initialised with whatever log they'll be looking for and the timer just make textbox.text = LogPointer to the actual value of the log string.So, as I said I really wanted a int varptr = &var
View 4 Replies
May 22, 2012
[code]Is j passed as value ByVal or by reference ByRef?Or does it depends of the data type? What if I have a complex object passed as the value?
View 2 Replies
Aug 20, 2009
How would I go about passing parameters to a method? I would want to do the following:
Private Sub Form1_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
ReceivingUdpClient = New System.Net.Sockets.UdpClient(6767)
Dim receiveBytes As [Byte]() = ReceivingUdpClient.Receive(RemoteIpEndPoint)
Dim ThreadReceive As New System.Threading.Thread(AddressOf receiveMessages(receiveBytes))
ThreadReceive.Start()
End Sub
Private Sub receiveMessages(ByVal receiveBytes As Byte())
'INSERT CODE
<br/>
End Sub
View 3 Replies
Nov 12, 2009
I'm not having any errors from these pieces of code, they're just empty everytime. I'm wondering if I perhaps have created them incorrectly.
Dim l As New Log()
l.Log = "Attempted staff login with username [" & txtUsername.Text & "]"
l.LogId = 0
l.StaffId = 4
l.LogDate = Date.Now()
l.Insert()
.Insert() is picked up in my BLL layer by these two functions;
[Code] ......
View 2 Replies
Oct 31, 2011
If I send a String set to Nothing as an input parameter to a SQL stored procedure, and in the sproc it's like this @MyString Char(9) = NULL, what does it turn NULL into? Because I'm firing the sproc and it's not firing the statement that says IF @MyString = NULL... So I don't know what it is... Or how can I pass the string as a NULL if nothing is passed as a parameter to my calling function?
View 4 Replies
Jun 10, 2011
I am new to VB2010 and writing a MDI child form to open another form as dialogbox, then pass a value back to the MDI child form, the value is successfully passed back to the MDI child form but it can't be shown on a text box [Code]
View 19 Replies
Nov 3, 2009
I'm wanting to pass arguments to my application, I believe there is an property called arguments in the ProcessStartInfo class, however how does my application interpret them?
View 2 Replies