|
Hi thanks, i needed VB equivalent of that. Came orite though
|
|
|
|
|
Ok i got it.
Dim testTime1 as variant
testTime1 = DateDiff("n", Now, "2009/05/25 11:00:00 AM")
Thanks
|
|
|
|
|
use the substring function
example
time = 2009/05/25 10:00:00AM and time2 = 2009/05/25 11:00:00AM
thus
subtring.time(11,1) this captures the value of 10 and also do the same to time2
just subtract the two substring you will always get the correct hour.
hope you will get the picture
|
|
|
|
|
Tiyani Miyambo wrote: subtring.time(11,1) this captures the value of 10 and also do the same to time2
Not really that will give you 1 (you have length at 1)
Also consider the following:
time1: 12AM
time2: 1PM
difference = -11 hours ???
Using substrings for calculating date differences is a very bad method. There will always be a case that doesn't work.
|
|
|
|
|
This is the worst answer ever, not only is it a really bad way of doing it but you also did it wrong.
|
|
|
|
|
Ditto. Why make life hard when the functionality is already built into the framework?
Any suggestions, ideas, or 'constructive criticism' are always welcome.
"There's no such thing as a stupid question, only stupid people." - Mr. Garrison
|
|
|
|
|
Hi Try This One..
Dim FirstDate As Date = System.DateTime.Now<br />
Dim SecondDate As Date = System.DateTime.Now.AddHours(2)<br />
Dim ts As TimeSpan = SecondDate.Subtract(FirstDate)<br />
Dim DiffHour As Double = ts.TotalHours<br />
MessageBox.Show(DiffHour)
|
|
|
|
|
In the future, specify in your questions that you're using VB6. If you don't, VB6 is so old that everyone will assume that you're using VB.NET. It's code is so vastly different from VB6, it's useless to you.
|
|
|
|
|
Hi All,
I am creating Forms and Control at Runtime and I want to save this status of Exe. Is it possible to Update EXE directoly.
I wana create application according to user choice without using any database.
If you can think then I Can.
|
|
|
|
|
Search for applicationsettings vb.net or user settings vb.net.
Those should set you on the right path.
Henry Minute
Do not read medical books! You could die of a misprint. - Mark Twain
Girl: (staring) "Why do you need an icy cucumber?"
“I want to report a fraud. The government is lying to us all.”
|
|
|
|
|
You cannot modify the .EXE. You're going to have to alter your design to save the information required to recreate these forms/controls. Later, your app would have to load this information, parse it, and use the data to recreate the forms/controls as you're doing now.
|
|
|
|
|
I have a datagrid that I want to group by dragging the column headers to a space above the grid. How do I go about doing that.
I am using VB 2008 express edition and it is a Windows forms application.
Thanks for any help.
|
|
|
|
|
What are you trying to achieve that is different from toggling the "AllowUserToOrderColumns" property?
Any suggestions, ideas, or 'constructive criticism' are always welcome.
"There's no such thing as a stupid question, only stupid people." - Mr. Garrison
|
|
|
|
|
Say for example you have a datagrid with fields Name,Country,etc.
If I drag the Country column to an area above the grid it will group all the Records that have the same value in Country field together.
|
|
|
|
|
ok, so if the column is "sortable", can't you do this already by double clicking the column header for Country?
If you really want to drag and drop the column header and then sort, then you need to manually code for the sort event to occur.
Any suggestions, ideas, or 'constructive criticism' are always welcome.
"There's no such thing as a stupid question, only stupid people." - Mr. Garrison
|
|
|
|
|
Hi all,
i have a WinForm Project with DataGridView bound to any DataSource.
In the DataGridView i have a checkboxcolumn which i like to bind to an non boolean column in the DataSource object.
In the DataSource the corresponsing column is a textcolumn with for example Codes A and B representig CHECKED or UNCHECKED state.
The mapping from A/B to/from CHECKED/UNCHECKED is done in the CellParsing and CellFormatting Events of the DataGridView.
Is this solution ok ("best practice") or exists a better solution?
regards,
bauer
|
|
|
|
|
Hi All,
I am trying to Use SendKeys("{Tab}") in my project. But antivirus shows it in Virus category.
Please help for resolving these issue.
Thanks
If you can think then I Can.
|
|
|
|
|
What is the general purpose of your application.
|
|
|
|
|
My application is simple Accounting Package. In which Enter is used for tab.
if Sendkeys is Virus Category program then why it is built for.
If you can think then I Can.
|
|
|
|
|
If you want your app to pass that virus scanner, you simply cannot use SendKeys.
|
|
|
|
|
Hi Dave,
Dave Kreskowiak wrote: If you want your app to pass that virus scanner, you simply cannot use SendKeys.
I hope that isn't true in general.
I have an app that needs and uses SendKeys, it works fine with McAfee.
What you say makes switching AV a risky business.
Is there a list of AV that allow/disallow SendKeys?
Luc Pattyn [Forum Guidelines] [My Articles]
The quality and detail of your question reflects on the effectiveness of the help you are likely to get.
Show formatted code inside PRE tags, and give clear symptoms when describing a problem.
|
|
|
|
|
Not every virus scanner will tag it as a bad app. It's just his that does it. Things have also changed a bit. McAfee used to tag applications like that as a "Potentially Unwanted Program". It did the same thing with PSEXEC. Now, it doesn't tag it such after about a year of bitching about it.
|
|
|
|
|
Thanks for the info, Dave.
Do you by any chance know a site that holds such information, also for other AV (Norton, Avast, ...)?
Luc Pattyn [Forum Guidelines] [My Articles]
The quality and detail of your question reflects on the effectiveness of the help you are likely to get.
Show formatted code inside PRE tags, and give clear symptoms when describing a problem.
|
|
|
|
|
|
Luc Pattyn [Forum Guidelines] [My Articles]
The quality and detail of your question reflects on the effectiveness of the help you are likely to get.
Show formatted code inside PRE tags, and give clear symptoms when describing a problem.
|
|
|
|