|
Briga wrote: Dim dtD as DateTime = dtpDate.Value
Dim dtT as DateTime = dtpTime.Value
Dim dtC as DateTime = dtD.AdTicks(dtT.Ticks)
This isn't going to work Briga. Even though the user is only entering time into the "dtpTime" DateTimePicker, this object still internally stores a month/day/year and is included in the returned ticks. So, adding the ticks of both the time and date DateTimePickers will push the resulting DateTime beyond the year 4000. Unless of course you are initializing dtpTime to the beginning of time.
See my post below for a better solution.
|
|
|
|
|
Joshua Quick wrote: This isn't going to work Briga. Even though the user is only entering time into the "dtpTime" DateTimePicker, this object still internally stores a month/day/year and is included in the returned ticks. So, adding the ticks of both the time and date DateTimePickers will push the resulting DateTime beyond the year 4000. Unless of course you are initializing dtpTime to the beginning of time.
Yeah I believe you as I said I was going by heart. It did work something similar (the idea is by adding the two components).
Anyway your solution seems more elegant and efficient than mine.
|
|
|
|
|
The DateTime type is a Structure. Structures are value types which are typically immutable in the .NET framework, like the String type. The properties of an immutable types cannot be changed. Instead, the immutable object must be overwritten.
Why are they like this? Because Structures are passed by value (a copy of the original Structure). So, changing the properties of a returned structure would only change the copy and not the original.
Regarding your DateTimePicker handling, you need to overwrite your UserDate variable. Try something like this...
UserDate = New DateTime(pickDate.Value.Year, pickDate.Value.Month, pickDate.Value.Day, _
pickTime.Value.Hour, pickTime.Value.Minute, pickTime.Value.Second)
|
|
|
|
|
|
doh:hello guys...i'm into system development, i just want to ask some assitance or help you could give with my project. do you have some ideas or the code itself on how to send message from PC to a bluetooth enabled phone with a vb.net as its platform? please i really do badly need your help.
|
|
|
|
|
Hi,
I am using VS.NET2002, Cr 9.1.I created one Report in which i am using pie chart.The problem is that i am getting report on development m/c but when i am running same exe on client m/c it is showing all other text object except Chart (i.e date,page no etc.)
Do i need to put any particular dll or file related to chart on client m/c
any help will be appreciated......
Regards,
Ritesh
|
|
|
|
|
u may need to ad a merge module
Mapping.msm: This merge module is used to install the files required to support displaying geographic maps inside reports. This merge module is only required if geographic mapping is included in your reports.
for more details click here[^]
|
|
|
|
|
Hi,
Thanx for reply...i will try with ur solution
Regards,
Ritesh
|
|
|
|
|
Hi shabonaa,
I tried ur solution but again got the same result getting blank report without chart..............
do have any other saggestions or solution.........?
regards,
Ritesh
|
|
|
|
|
r u developing web application or windows application?
and r u deploying the project or just running exe on clint machine
|
|
|
|
|
Hi shabonaa,
I am developing windows application.................and i simply copied the exe form my machine to client's m/c
Regards,
Ritesh
|
|
|
|
|
ok .. try one of these
1- try to add this file sscsdk80.dll (charting DLL) to the bin folder it is work for web application but may be work in windows application
2- try to install redistribution package for Crystal Reports 9 and .NET u will find it here[^]
3- otherwise deploy your project and don't forget to add the merge modules
|
|
|
|
|
Hi Shabonaa,
thanx a looot........ur first solution did the trick........i copied the sscsdk80.dll file to bin folder of crystal decision folder and it work...........
I posted my query to many forum but didn't got even a single reply...........
once again thanx a lot.......
Regards,
Ritesh
|
|
|
|
|
U r Welcome anytime
tHe OnLy WiSdOm ThAt YoU KnOw YoU kNoW nOtHiNg
|
|
|
|
|
Does anyone know of a script or tool to remove comments from two types of files:
1. ASP file with embedded Javascript & HTML
2. XSL file with embedded Javascript & HTML
So basically it's removal of
// Javascript style comments
/* Javascript style comments */
' VBScript (ASP) style comments
A good script/tool would be one that strips all source code of comments. Then another script/tool that reapplies the comments. So that means storing the comments and line numbers in another file possibly.
|
|
|
|
|
I can't see this being all that hard to make.
I'd do something like...
If (System.IO.File.Exists(filepath)) Then
Dim sr As New System.IO.StreamReader(filepath)
Dim line, output As String
output = String.Empty
Dim c() As Char
Do
line = sr.ReadLine()
c = line.ToCharArray()
Select Case (c(0))
Case "<"
'This section will be hit the hardest as most tags begin with the less than symbol
'Look at the next position
If (String.Compare(c(1), "!") = 0) Then
'The -1)
Else
Console.WriteLine("File not found.")
End If
Thats an idea anyway, of course you will have to write the output to a file.
|
|
|
|
|
Hi all,
in VB6, is there any way to initialize a typed variable without the need to initialize each var that it's composed of? I want to reset the var but without reseting each member that composes it...
Thanks in advance,
Marc Soleda
... she said you are the perfect stranger she said baby let's keep it like this... Dire Straits
|
|
|
|
|
No, there isn't. If you want to encapsulte that code into the type, cosider changing your type into a class and providing the reset code in a public method.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Ok. thanks!!
... she said you are the perfect stranger she said baby let's keep it like this... Dire Straits
|
|
|
|
|
Hello,
My question is about memory leak in .NET. Let's say that i have form that loads another form that contains a number of controls(eg datagrids). Form2 does nothing. No data are bound to controls. When i run the program i observe the memory usage in the taskbar and i can see that memory increases when form2 is shown and that is acceptable. when i close the form memory remains the same and when i reopen it memory increases. as you can understand if i have a large app with many forms which using data the memory leak is huge and the app crashes after a while.
Is there a way to implement GC when the form is about to close? Is there a way to reduce memory leak?
Thank you
|
|
|
|
|
mayandi wrote: Is there a way to reduce memory leak?
This question seems to be getting asked a lot - it isn't hard to search the forums. There is a search button at the top.
Here is a link from a thread on this very topic from yesterday[^]
ColinMackay.net
"Man who stand on hill with mouth open will wait long time for roast duck to drop in." -- Confucius
"If a man empties his purse into his head, no man can take it away from him, for an investment in knowledge pays the best interest." -- Joseph E. O'Donnell
|
|
|
|
|
See this thread previous discussion[^] for a discussion on GC and complex apps with memory leaks.
...Steve
"Give a man a fish and you've fed him for a day. Teach him how to fish and you've fed him for life." (Translation: I'll show you the way, but not write the code for you.) I read that somewhere once
|
|
|
|
|
Hi everybody
I have a vb program that send instructions via OLE to an EXCEL instance to do some operations with workbooks. My question is: is there a way to attach a VB Module(but not a Class Module, just a simple module) to an open workbook @ runtime?? And if it's possilble, can I call a function contained in that module??
Thanks
TK
|
|
|
|
|
Hi Guys,
In VB.Net, how do you make a connection to an access database and use this connnection throughout the application. Also, when making the connection if we fix the path to the database(i.e. drive, folder..), then when the application is deployed on a different machine on a different drive, will this cause an issue.
With Best Regards,
Mayur
|
|
|
|
|
hi,
To connect to access database use the namespace as OLEDB instead of SQLCLIENT.
And then goahead as other connection in >net.
Oh Yes dont ever fix the drive or dir for the connection.
Rather make a string in your config file (that is provided with vb.net application) and read the path from the config file.
Config file gives you the liberty to change the settings and configuration at any time.
DD
Debasish Das(MBA), is a hardcore software solution provider, working in ESSPL (INDIA). Got 5 years of experience on various client server technologies like Visual Basic,.NET framework, Power Builder, Message Queue Server. And also posses sound knowledge in Quality Processes applied to software engineering. Quite often travels overseas to provide solutions to some fortune 100 clients.
He can be reached with mr_debasishdas@hotmail.com or debasishd@esspl.com
|
|
|
|