|
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
|
|
|
|
|
Hello,
Is somenone know a way how to add a table in richtextbox in vb.net 2005 without rtf property usage?
Thanks for help
Shay Noy
|
|
|
|
|
|
hi all,
i want to insert values into milti cells with multi rows in vb.net.
i am new to datagridview.
kindly help me.
thanks
rmshah
Developer
|
|
|
|
|
Sounds like you need to buy a book and work through it. I really can't work out the specifics of your problem but it sounds like you're asking for something that is easily researched online, or found in books.
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 )
|
|
|
|
|
use teh following code
<br />
<br />
DataGridView1.Rows(x).Cells(y).Value = "Hello"<br />
<br />
Here use the loop to control x and y
and use DataGridView1.Rows.Add to add new row
Yogesh Agarwal
|
|
|
|
|
thanks for your support.
further help me how to navigate between colums and how can i handle the events.
thanks again
rmshah
Developer
|
|
|
|
|
Hi
You could use the code :-
<br />
dim i as integer<br />
<br />
for i=0 to DataGridView1.ColumnCount-1<br />
<br />
<the code=""><br />
<br />
next<br />
<br />
</the>
Now i is your variable to navigate on columns, to handle the events most of the event handles has the colindex and rowindex property to determines the column and row you use like if i talk about the celcontentclick event the default event for datagridview then: -
<br />
<br />
Private Sub DataGridView1_CellContentClick(ByVal sender As System.Object, ByVal e As System.Windows.Forms.DataGridViewCellEventArgs) Handles DataGridView1.CellContentClick<br />
<br />
<br />
if e.ColumnIndex = 0 Then<br />
<br />
<some code=""><br />
<br />
End If<br />
<br />
<br />
<br />
End Sub<br />
<br />
</some>
Yogesh Agarwal
|
|
|
|
|
hello!
i've created a small mdi sofware and.to open a child form a user should click on the menu item corresponding.Even if the same form is already openned when i click on the same menu item it opens again the ssame form which is not logical.How can i prevent the form to be openned more than once.thanks
eager to learn
|
|
|
|
|
I haven't work in VB for a while, so I apologize if my syntax is off. What you should do is something along the lines of:
<br />
Dim myForm as New Form1()<br />
<br />
myForm.Show()<br />
|
|
|
|
|
Hi J$
Your code do the same thing, and the problem remains same do this
<formname>.show
did not create the new object for the form else ti will display the form again and again
With Regards
Yogesh Agarwal
|
|
|
|
|
|
Create a object of the form (probably in a module)-
For e.g
Dim objfrm1 as Form1
Now, on click event of the context menu (or button) write the following code -
if isnothing(objfrm1) then
objfrm1 = new form1
objfrm1.MdiParent = me
objfrm1.show()
else
objfrm1.focus()
end if
Also, do not forget to set the obj to nothing on the form closing event.
I mean, on CLOSING event of form1 write the followng code.
objfrm1 = nothing
Worring about losing keeps me WINNING>>..
|
|
|
|