|
Why have you created a UDT? You can just use the datetime data type.
Paul Marfleet
"No, his mind is not for rent
To any God or government"
Tom Sawyer - Rush
|
|
|
|
|
Hello
Thought I turn off option Type inference , I still has problem
Shared Sub Abc(Of T)(ByVal def As T)
End Sub
Shared Sub Abc(ByVal def As Object)
End Sub
Shared Sub New()
Abc("a string") '---> this line always calls Abc(Of String)(ByVal def As String)
'I really don't want to change existing code to Abc(CObj(""))
End Sub
|
|
|
|
|
You don't have a choice. Think of it this way... The compiler is going to automatically generate code specific to each type that uses this method. If you leave this setup the way it is, the method defined as ByVal def As Object will only be called when you pass something boxed in an Object type. Every other type will go to the generic version of the method.
|
|
|
|
|
I'm working on small desktop application and I need to create a Help file. Like every application made on Windows, that opens help/help file on F1 hit. But unfortunately I have never done this before!! Can anyone tell me how can I create (.chm) Help Module/file?
- Stop thinking in terms of limitations and start thinking in terms of possibilities -
|
|
|
|
|
Download HTML Help Workshop
"I love deadlines. I like the whooshing sound they make as they fly by." (DNA)
|
|
|
|
|
Thanks! Just downloaded it. A bit confusing but will get used to it. Thanks again.
- Stop thinking in terms of limitations and start thinking in terms of possibilities -
|
|
|
|
|
After then read this article i think since you have not done this before would be helpful
eager to learn
|
|
|
|
|
Thanks
- Stop thinking in terms of limitations and start thinking in terms of possibilities -
|
|
|
|
|
hello.
it is necessary to create DSN for using crystal report.
without using DSN we can create a crystal report.
i want to generate a dynamic crystal report from visual basic 6.0 and backend used is oracle.
i tried it but giving error like 'server not yet been started'.
i don't know TNSname for oracle.
give me reply.
if possible then a code for generating dyanamic report. with backend oracle.
|
|
|
|
|
Hi all
i have created a new projected in vs2005.
added the cystal report designer to the form.
when i insert a new report, i get the following error....
"Crytal Reports Active X Designer" - msg header
"Failed to open document" - error msg.
2nd error box says
"Microsoft Visual Studio" - header
"Failed to create crystal query engine" - error msg.
i have created reports successfully before and dont know why i am getting this error.
i have unintalled crystal and re-installed, still did not work...even tried this = "C:\Program Files\Microsoft Visual Studio 8\SDK\v2.0\BootStrapper\Packages\CrystalReports\CRRedist2005_x86.msi"
no luck...
could you help..please as i need to get my projects out!!!!!
thanks
|
|
|
|
|
1 . tell me which Crystal Report Version you have to impliment with your project ?
2. Embeded Crystal Report or external ?
mitesh
|
|
|
|
|
hi, thanks for the reply....
problem has been sorted out,
was using vs2005..
|
|
|
|
|
Can you post your solution here, I am having the same issue.
Thank You
|
|
|
|
|
hi,
This is what caused my problem.
i un installed a program that was using crystal reports.
the uninstallation removed all components for crystal in the program files/common files directory.
this is why i was getting the error.
Solution....well kinda solution...
i re-installed that software which put back all the modules and now it works fine.
i dont know why the uninstallation removed the components, but it did,
i will have to live to the software installed even though i am not using it... i dont mind!
hope this helps!!!
|
|
|
|
|
I have a line of code that I am not sure why I am getting the blue underline when I have option strict on.
The error I get is the following:
Option Strict on dissalows implicit conversion from date to string.
I know that I can use the code Convert.ToDataType() to convert variables and/or objects.
Here is the line of code I am having troubles with.
startTime += startTime.Add(timeInterval)
The startTime in previous lines of code is converted from a dataRow object to dateTime. The timeInterval variable is a timeInterval dataType.
Does anyone know what I am getting the conversion error? Does the Add function convert startTime to a String?
|
|
|
|
|
AAGTHosting wrote: startTime += startTime.Add(timeInterval)
Shouldn't this be
startTime = startTime.Add(timeInterval)
Assuming that you want to add startTime and timeInterval and assign the result to startTime .
Paul Marfleet
"No, his mind is not for rent
To any God or government"
Tom Sawyer - Rush
|
|
|
|
|
AAGTHosting wrote: startTime += startTime.Add(timeInterval)
That is the same as:
startTime = startTime + startTime.Add(timeInterval)
There is no operator overload for adding two DateTime values. Then only implicit convertion that allows adding, is turning both values to strings, so the compiler assumes that you mean:
startTime = startTime.ToString() + startTime.Add(timeInterval).ToString()
However, the result is a string, and can not be implicitly converted to a DateTime value, that is why you get that error message.
Despite everything, the person most likely to be fooling you next is yourself.
|
|
|
|
|
Can anyone lend me a hand on properly coding the below IF, Then, Else statements to do a few things:
+ If my ExemptStatus = "Exempt", the text box txtCTOused1.Text should be disabled,
+ If my ExemptStatus = "Exempt", and TotalWeek1 >workWeek1, then CompTime1 = 0
However, If my ExemptStatus = "NonExempt", the text box txtCTOused1.Text should be Enabled,
And If my ExemptStatus = "Exempt", and TotalWeek1 >workWeek1, then CompTime1 is calc as
CompTime1 = (TotalWeek1 - WorkWeek1) * 1.5
If strExempt = "Exempt" Then
Me.txtCTOused1.Enabled = False
ElseIf TotalWeek1 >= WorkWeek1 Then
CompTime1 = 0
Else
Me.txtCTOused1.Enabled = True
CompTime1 = (TotalWeek1 - WorkWeek1) * 1.5
End If
lblCompTime1.Text = CompTime1
'calculate PTO used when timeworked is less than 40 hours per week
Dim PTOweek1 As Double
Dim CTOused1 = Convert.ToDouble(txtCTOused1.Text)
If TotalWeek1 >= WorkWeek1 Then
PTOweek1 = 0
ElseIf TotalWeek1 < WorkWeek1 Then
PTOweek1 = WorkWeek1 - TotalWeek1 - CTOused1
End If
lblPTOused1.Text = PTOweek1
|
|
|
|
|
Well, I wouldn't really use hard-coded strings to check for Exemption status. It's not culturally independant. I'd use some other data type to represent status information in the schema.
You've already got the logic layed out in your post, but it's messed up. You've got conflicting expressions for the same condition. I think I've fixed it, but it's your requirements, so double check the logic.
Also, to keep it simple, I'd avoid using ElseIf statements until you're more proficient at this.
These are your (fixed) requirements. You should be able to easily code the If block using this:
If my ExemptStatus = "Exempt" then
the text box txtCTOused1.Text should be disabled,
If TotalWeek1 <= workWeek1, then
CompTime1 = 0
Else
' TotalWeek1 > workWeek1
CompTime1 = (TotalWeek1 - WorkWeek1) * 1.5
End If
If ExemptStatus = "NonExempt", then
text box txtCTOused1.Text should be Enabled,
|
|
|
|
|
Hi, I am new in .Net environment and designing a small desktop application. Due to the limitions with combobox I want to design a custom combobox with following additional features :
1.Borderless
2.Reduced height
3.Custom image for drop down arrow
Can anyone guide me how to customize combobox to add these functionalities. I will appreciate if someone could forward me an example.
Thanks
Nas
|
|
|
|
|
You would need to make the control owner drawn and draw your own arrow, etc. Not a straightforward task, but perfectly doable.
Christian Graus - Microsoft MVP - C++
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
Hi All
I am working on VB6 with CR8, in my application i have a save button that will save the data into database and then print a invoice. the data entered is works perfectly the problem is in the report.
When the report prints it always print the half content means it should print 10 records but it always prints the 6 or 7 records. In my query in uses the grouping but the data belongs to the first group will prints only.
Another problem is if i place a msgbox before invoice genration then it prints the invoice correctly
so what would the solution
plz reply
With Regards
Yogesh Agarwal
|
|
|
|
|
hi all,
recently i have developed an application in vb6 (sp6).
when i run this application all is ok but when i want to take print out of given subject it gives me some problems
when i take printing on domatrix printer it gives me ok result, i mean to there is no problem with such like proble on any other pc.
but, when i same take on laserjet printer it gives varied result, mean on some pc it suppoted and on some pc i could not able take the print out.
kindly help me.
thanks in advance.
rmshah
Developer
|
|
|
|
|
what code you are using to take a print out and what port you are using to connect your print to your machine
Yogesh Agarwal
|
|
|
|
|
thanks, find the coding which i used to take printout
Private Sub DataRptRecord()
'On Error Resume Next
Dim Var1, Var2 As String
If A_DataEnvironment.rsCmdPrnt.State Then A_DataEnvironment.rsCmdPrnt.Close
A_DataEnvironment.rsCmdPrnt.Open ("SELECT *From adrsmstr",conn)
DataRptAddress.Sections(2).Controls("lbl1").Caption = Trim(TxtCntact1.Text) ' AdrsBook_DataEnvironment.rsCmdAdrsPrnt.Fields(1)
DataRptAddress.Show
' the following section of codes deals with only dos base printings.
Private Sub DosBasePrinting()
On Error Resume Next
Dim A1, A2, A3, A4, A5, A6, A7 As String
Dim z As Integer
Dim i As Integer
If MarkAtt = True Then
Call AskForSave
If a.State Then a.Close
a.Open ("SELECT * From adrsmstr"), Conn, adOpenStatic, adLockBatchOptimistic
If a.EOF = False Then
a.MoveFirst
z = PrntNos
Open App.Path & "\A.TXT" For Output As #1
A1 = a.Fields(1)
A2 = a.Fields(0)
A3 = a.Fields(2)
A4 = a.Fields(3)
A5 = a.Fields(4)
A6 = a.Fields(6)
A7 = a.Fields(5)
For i = 1 To z
Print #1, " " & Trim(TxtCntact.Caption)
Print #1, " " & A2
Print #1, " " & UCase(Trim(A3)) & "," & UCase(Trim(A4))
Print #1, " " & A5
Print #1, " " & A6
Print #1, " " & A7
Print #1, " "
Print #1, " "
Print #1, " "
Next
Close #1
End If
X = Shell(App.Path & "\print.bat", vbHide)
rmshah
Developer
|
|
|
|