|
But that is what you wanted, right? Round to nearest 10th?
Btw, my name is Chandra
|
|
|
|
|
i think my first message was right except i said 10th which gave a confusion.
basically i need decimal rounded down or up to nearest decimal
e.g 1.20 ,1.21,1.22 should be $1.20
1.23,1.24,1.25 should be $1.25
1.26,1.27 should be $1.25 (round down here)
1.27,1.28,1.29 should be $1.30
btw. i know your name is Chandra was just giving you a short nick thats all.
sorry if that offended you.
Robbo
|
|
|
|
|
My bad - I did not study the examples, just went by your statement
What you want is round to nearest 5 cents...
Ok, try this then:
x = round(x * 20) / 20
|
|
|
|
|
Thank you Chandra.. as soon as i posted my last msg .. YOU HAD MY FIX READY..
your a champ. thankyou so much champ..
just what i needed.
Robby
|
|
|
|
|
You are welcome
Glad I could help
|
|
|
|
|
Hi Folks
I enabled audit logging on a particual folder. The transactions happening on that folder will be logged in Security event logger. I want to generate an excel report with the details (User name, File Opened/Deleted/Created, DataTime).
Thanks in Advance
Regards
Hari
|
|
|
|
|
So what's the question? You haven't asked anything, other than implied your looking for permission to do this, in that case permission granted!
What part of this are you having a problem with?
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
Hi Dave
I need help in reading Security log in .Net and generate an Excel report.
Excel report will have following columns
File Name | Date&Time | Action Performed | User
e.g.
D:\Temp\1.doc | 20-12-2006 07:10:10 AM | Updated | Hari
Thanks in advance
Regards
Hari
|
|
|
|
|
The question still stands. What part of this are you having a problem with??
Is it reading event logs? Writing to a .CSV file? Interpreting the Security events?
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
Hi
I am unable to Interpreting the Security events?
Can you help me in how to Interpreting the Security events? and generate a CSV file. That CSV file should contain the log entries of only Audit folders.
E.g. if i enable audit logging on a folder in my machine "D:\Temp", then i want a report which should contain the information abt the activities performed in that folder like Creation of file,Deletion of file,Renaming a File and updating a file/Folder.
Format of the CSV/Excel file should be as follows
File | User | Date & Time | Action
D:\Temp\1.txt| Hari | 27-12-2006 | Deleted
Thanks in advance
Reghards
Hari
|
|
|
|
|
Sir/Madam,
I am openning a form on the button click.Now the problem is before creating the object of the form to be opened i want to check the form is already opened or not.
Thanks and Regards
Pankaj
|
|
|
|
|
What are you using to trigger the creation of your second form? What are you using to show your form? Are you calling .Show() or are you calling .ShowDialog() ??
If you're using .Show , you'll have to keep track of the instance of the form that you created. When you go to attempt to create the second instance of that form, check the variable you're using to track the new form. If it's not Nothing, then you can create a new instance of the form.
The problem comes when the new form closes. You have to listen for the form's FormClosing event so you can track that the form is in the process of closing. You can use this opportunity to retrieve any data you need off of that form before it dies completely.
Public Class Form1
Private OpenForm As Form2
Private Sub Button1_Click(blah, blah) Handles Button1.Click
If OpenForm Is Nothing Then
OpenForm = New Form2
AddHandler OpenForm.FormClosing, AddressOf OpenForm_FormClosing
OpenForm.Show()
End If
End Sub
Private Sub OpenForm_FormClosing(ByVal sender As Object, ByVal e As System.Windows.Forms.FormClosingEventArgs)
RemoveHandler OpenForm.FormClosing, AddressOf OpenForm_FormClosing
'
' Get any data you need from the form here...
'
OpenForm = Nothing
End Sub
End Class
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
mind if i suggest some VB6 alternative - i've yet to master .net so i don't really know if this works, but...
in vb6 i would do this
If formWhatever.Visible = True Then
Msgbox "Form already visible!"
Else
formWhatever.Show
End If
|
|
|
|
|
That won't work in VB.NET because Forms work VERY differently than they did in VB6. In VB6, every form was already instantiated and visible from anywhere in your code. This is no longer the case in VB.NET since forms are actually classes and you have to instantiate them yourself.
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
Sir/Madam
Thanks a lot .It is working very fine.
Thanks and regards
Pankaj(India)
|
|
|
|
|
Sir/Madam,
I am trying to make a program using crystal reports in vb.net 2005.
The format of the crystal reports will be displayed in three rows for the particular employee (First row will denote the login in time , Second row will denote the logout time , and the third row will denote the total hours worked.) all these details will come under the days of selected month.The crystal reports will contain columns from 1 to 30 or 1 to 29 or 1 to 28 according to the no of days in the selected month.
Like in first column named 1 (1 is the first day of the month will describe the log in details , log out details in the second row and total hours in the thirs row.)
If somebody may please send any link .I am in urgent need of the code.
Please help.
Thanks and Regards
Pankaj Garg
(India)
Urgent answers will be appreciated.
|
|
|
|
|
amaneet wrote: Urgent answers will be appreciated.
Don't say "urgent". It's just plain rude. Notice how no one replied for over a year. Urgent doesn't work well around here.
"The clue train passed his station without stopping." - John Simmons / outlaw programmer
|
|
|
|
|
How would I declare and array of structure so that it's visible in my class.
This is in my declaration section
Structure passenger
Public passName As String
Public passAdd As String
Public passPhone As String
Public SeatNum As String
End Structure
Public passengers(15) As passenger
When I try to access passengers(0).passName in a sub, I get an error that says "Object reference not set to an instance of an object."
So how do I declare it so that my whole class can see it?
Thanks
Tom Wright
tawright915@gmail.com
|
|
|
|
|
When you create an array of structures, they are all initalized to zero. That means that all the string references in the structure are null (Nohting in VB). If you try to use a string that doesn't exist, you get that error message.
---
It's amazing to see how much work some people will go through just to avoid a little bit of work.
|
|
|
|
|
Okay, I think I was trying to do
private mypassenger(15) as new passenger
in my declaration section. However I get a compile error that says you cannot use te new operator on an array.
BBBBUUUTTT now I see what I am doing wrong.
I'll try it out and see what happens.
Thanks
Tom
Tom Wright
tawright915@gmail.com
|
|
|
|
|
See this[^] thread for an explanation of what's going on.
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
Dave Kreskowiak wrote: See this[^] thread for an explanation of what's going on.
I thought I saw the same kind of problem going on earlier
If you try to write that in English, I might be able to understand more than a fraction of it. - Guffa
|
|
|
|
|
I have a form that is TransparencyKey is set to White and the background is set to white and it comes out transparent, but then I have 2 pictureboxes that have a transparent image(an image with a transparent background), but it takes the background of the form, instead of the desktop. And I do have the me.allowtransparency = true. Does anyone have an Idea as to how just get the image to show and just the image no background color? I would appreciate any suggestions. Thank You!
|
|
|
|
|
hi,
try to set picture's backcolor = transparent...
Thanks & Regards...
Amit
|
|
|
|
|
I have already have it set that way! But Thank You for you time.
|
|
|
|