|
Assuming that what this function on several text boxes, then I would create a composite control consisting a text box and label. Then on the Enter event of the control change the fore color of the label and again on the Leave event.
Now you have the start of a control that can be used over and over again.
Steve Jowett
-------------------------
Real programmers don't comment their code. If it was hard to write, it should be hard to read.
|
|
|
|
|
That's a better idea than mine. I didn't really stop to think about using a custom control in the event the OP needed to do this for more than one textbox/label.
"The clue train passed his station without stopping." - John Simmons / outlaw programmer
"Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon
"Not only do you continue to babble nonsense, you can't even correctly remember the nonsense you babbled just minutes ago." - Rob Graham
|
|
|
|
|
I have my moments
Steve Jowett
-------------------------
Real programmers don't comment their code. If it was hard to write, it should be hard to read.
|
|
|
|
|
i have got it figured out. the label will not change color text is entered into the textbox. i just pasted the code behide each textbox.
label1.forecolor=color.red
then the rest of the labels were initialized to black and as the next textbox starts to get information entered into it the last label changes to black and the current one changes to red. but i thank you gentleman for the input and i will try and attempt to use some of your suggestions.
Thank you all.
|
|
|
|
|
I'm trying to put an application together with NDK C3PO that would capture the contents of a message in Groupwise e.g. (Subject, Message Body) etc. and then write that data to a database like Access. Does anyone know where I would even start with this?
|
|
|
|
|
Tech support at the publisher/author of the NDK C3PO
Steve Jowett
-------------------------
Real programmers don't comment their code. If it was hard to write, it should be hard to read.
|
|
|
|
|
I don't understand your response. Are you talking about their documentation? If that's the case, it is very vague and does not go into detail on how to reference the areas that I mentioned with sections of an e-mail message.
|
|
|
|
|
You'll have to consult with Novell's docs for how to capture the contents. Once you have the email parts, it's fairly easy to put it into a database, and there are a lot of articles on CodeProject that demonstrate doing so. (Even more on Google.) Once you get started, if you have specific questions post them - you'll get more helpful replies to specific questions.
|
|
|
|
|
Could you tell me where these specific articles are? I've been looking everywhere for information on it and theres very little.
|
|
|
|
|
|
Hello everyone,
I hav been facing a problem since a few days. I'm using crystal report with vb.net 2005 (.Net framework 2.0). In a report I'm retrieving the values from a database table and showing it. But the problem is that if a certain field is blank in database then it's showing a complete blank white field in the report also. This is what I don't want. For example- suppose there's a field in datbase named EntryDate which is not mandatory. So for a certain row if there's an entry for EntryDate it'll show it in the report otherwise if it's blank or null in database it'll show a user defined string in the report say 'Not Available' or something like that. For this I hav tried playing with the ZeroValueString property of the respective field in the crystal report also but of no avail. How can I solve it. Plz help with some code example.
Regards.
|
|
|
|
|
no code here but why dont you place a default value eg. "Not Available" in the textbox that EntryDate to the database.
thus
if EntryDateTextbox.text = "" then
' Where -Not Available- is your default text which will be sent to the database if the textbox is empty
EntryDateTextbox.text = "Not Available"
endif
so when you create the crystal report, the EntryDate field would not be empty.
Hope This Helps
Freddie_xan
this is eddie, currently about to study oracle10g, abut also presently developing sample project softwares
|
|
|
|
|
Actually the datatype for EntryDate is DateTime in the database. So only a legal Datetime value or Null value can be passed. In the front end interface I'm not using any textbox, instead there's a datetime picker. If somebody selects any date it is passed in the database otherwise NULL is passed.That's why when I retrieve data from that table in crystal report it can't show anything else other than a blank if the entrydate is null in database. Moreover if suppose, the entrydate textbox in crystal report has background color say Gray, but when no data can be retrieved for the field it is turning completely white- a white field among all gray fields, so awkward.
By the way I'll request you to focus on the ZeroValueString property of a
textbox in crystal report. As per what I hav read from other sources, the
ZeroValueString property shows a custom defined Value/String in a textbox if Null value is retrieved from database. I hav played with it but couldn't figure it out. Can u solve it. Awaiting for ur reply. Thanks.
Regards.
|
|
|
|
|
Create a formula field in the report that will contain either the date formatted as a string, or a "Not Available" if the date is a null value.
|
|
|
|
|
Hello,
I have this code:
Private Sub Form_Load()
Dim lab(30, 100) As Label
Dim i As Integer, j As Integer
For i = 1 To 30
For j = 1 To 100
lab(i, j).Caption = "A"
lab(i, j).AutoSize = False
lab(i, j).Height = 13
lab(i, j).Width = 9
lab(i, j).Left = j * 9
lab(i, j).Top = i * 13
Next j
Next i
End Sub
and have this error:
Runtime error '91':
Object variable or With block variable not set.
Help me please!
T.I.A
|
|
|
|
|
You have only declared the label object, not instantiated it...
Try this:
set lab(i, j)= New Label
as the first line of the inner loop
HTH
|
|
|
|
|
ChandraRam wrote: Try this:
set lab(i, j)= New Label
I had this error:
Compile error:
Invalid use of New keyword
|
|
|
|
|
Well, I don't know how you do it exactly in VB6, but the problem in your original code is that you had not instantiated the label object.
Maybe lookup CreateObject, or some such thing instead of the New...?
|
|
|
|
|
Well, once you get past this problem, you're going to be disappointed. Putting 3,000 label controls on a form will make it render and behave slowly. Using thousands of controls on a form is not a good idea. I would suggest comming up with your own code to draw all of this data yourself. Controls are a bit too heavy for this.
|
|
|
|
|
You might want to try this:
Dim newLabel As New Label
newLabel.Location = ...
Set lab(i,j) = newLabel
|
|
|
|
|
Dave Kreskowiak wrote: You might want to try this:
Dim newLabel As New Label
newLabel.Location = ...
Set lab(i,j) = newLabel
1st: I'm using VB6.0.
2nd: I tried:
Set lab(i, j) = New Label
But I have "Invalid use of New keyword" exception.
3rd: I don't need 3000 labels in fact. that was just a joke
Try:
Dim lab(5, 5) As Label
|
|
|
|
|
you need to 'Load' the new control.
Example:
Load grpButtons(iBtn)
With grpButtons(iBtn)
.value = False
.Left = grpButtons(0).Left
.Top = grpButtons(iBtn - 1).Top + .Height
.Caption = frm.sFormName
.Visible = True
End With
'Never argue with an idiot; they'll drag you down to their level and beat you with experience.' ~ anonymous
'Life's real failure is when you do not realize how close you were to success when you gave up.' ~ anonymous
|
|
|
|
|
nlarson11 wrote: Load grpButtons(iBtn)
I tried this too but still I have this absurd exception!
Runtime error '91'
Object variable or With block variable not set!!!!
|
|
|
|
|
Sorry for not looking closer...
You cannot do what your code says you want to do in vb6.
First of all the creation of controls at runtime -- it's based on an already existing control that has the index property set to 0. You can only create additional instances using the 'load' command. You cannot create any control on the fly unless there is already one present on the screen.
If you look at the click event of the label you'll notice that a new argument is in the signature of the routine.
Private Sub Label1_Click(Index As Integer)
this allows you to create a new intance at run time because every label when clicked on will come into this routine and then you can test what value is the index, etc. because you cannot assign an event handler at runtime like you can in dotnet, you have no choice...
'Never argue with an idiot; they'll drag you down to their level and beat you with experience.' ~ anonymous
'Life's real failure is when you do not realize how close you were to success when you gave up.' ~ anonymous
|
|
|
|
|
I haven't used VB6 in a VERY long time. Look at all the things that I've (thankfully) forgotten!
|
|
|
|