|
Hi, Jayachandra here,
I am having a doubt in vb 6.0. If i want to display a report on user input. What is the code to get report by user input. please help me in this concept. I would be thankful.
Waiting for reply.
please ....
Jayachandra
-- modified at 5:23 Sunday 17th September, 2006
|
|
|
|
|
Hi
Can you please explain in brief so that I can help out to sort your issue
Regards
Tushar kothari
|
|
|
|
|
Sir, Thank you for you response.
My problem is, I want to display a report by user input.
For Ex. There are no. of srudent records in the database. If i want to display only one student,i.e. example, student Id is S001. I want to display his details only by using Data Reports in VB 6 with Access. I want the code for connecting to DataReports through passing parameters.
Thank you sir,
JAYACHANDRA
|
|
|
|
|
How to trace client request in network (The network is a lan network in which Internet is provided by server and clients are using Internet.And sanding request for different website.)
How to got that requseted website name and got that IP address by which manchine that is sent.
And On Which Date and Time.
Using VB.NET(It's a windows baesd application)Plz Help ME OUT.
Bhavna
|
|
|
|
|
A little Google goes a long way. Results[^] for "vb.net packet capture".
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
i convert my project in atm in vb.net but i am having error... app error... can someone help me???
asa
|
|
|
|
|
You're going to have to be more specific. What is your code and what are you having problems with?
|
|
|
|
|
can you help me in the making a code for the ATM machine??? dunno how to do it...
asa
|
|
|
|
|
Yes, there is most probably someone here who can help you with any problems you might have while coding your school assignment.
There is noone here that will do your school assignment for you, though. Although it would be convenient for you at the moment, you would most likely learn absolutely nothing from it, which is the exact opposite of the intention of the assignment.
---
b { font-weight: normal; }
|
|
|
|
|
Learning comes from experience so, try to tackle your problem with starting off with the design or the User interface (UI). After doing the buttons and so on you can then get into coding it.
Try searching Google for answers.
|
|
|
|
|
Perhaps you should reply to the original poster instead of me?
---
b { font-weight: normal; }
|
|
|
|
|
When I build this activex .dll using vb.net 2005 I cannot see the .dll in my list of .com references, also using vb.net
If I use:
imports Classlibrary2.Tester
then my vb.net program can see the class tester, but not the function Testfunction()
What am I missing?
Thanks!
Imports System
Imports System.Reflection
Imports System.Runtime.InteropServices
' General Information about an assembly is controlled through the following
' set of attributes. Change these attribute values to modify the information
' associated with an assembly.
' Review the values of the assembly attributes
<assembly: assemblytitle("classlibrary2")="">
<assembly: assemblydescription("")="">
<assembly: assemblycompany("")="">
<assembly: assemblyproduct("classlibrary2")="">
<assembly: assemblycopyright("copyright="" ©="" 2006")="">
<assembly: assemblytrademark("")="">
<assembly: comvisible(true)="">
'The following GUID is for the ID of the typelib if this project is exposed to COM
<assembly: guid("3fd0e39e-7392-4a00-a399-378cbef42b45")="">
' Version information for an assembly consists of the following four values:
'
' Major Version
' Minor Version
' Build Number
' Revision
'
' You can specify all the values or you can default the Build and Revision Numbers
' by using the '*' as shown below:
' <assembly: assemblyversion("1.0.*")="">
<assembly: assemblyversion("1.0.0.0")="">
<assembly: assemblyfileversion("1.0.0.0")="">
'NOW THE CODE
Public Class Tester
Dim i As Integer
Public Function TestFunction() As Integer
Return 99
End Function
End Class
|
|
|
|
|
You can't just throw a class together and expect it to work under COM. You have to decorate your class, methods, properties, and events with the appropriate attributes. Read this[^] for more information.
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
OK, I'm going to try to digest all that.
Would you or anyone have a template vb.net program that successful exposes a .net component to the com environment? I can't find any on the site
ty
|
|
|
|
|
The template depends on what version/edition of VS.NET you're using. It comes with VB.NET 2005 Professional and above.
There is no template in any other versions.
You can find examples of how to do this here[^].
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
Hello again.
Thanks to your help I have been able to create an active-x control .dll that I can read from a vb.net program!!! thanks!!
However, the control does not seem to be visible to other programs. I have checked the "expose the control to com" checkbox before I compiled.
Is there a way to diagnose the visibility of such a control?
Thanks!
|
|
|
|
|
Well I've discovered some issues; perhaps these might help someone explain to me my problem.
1. Depends.exe shows that the .dll I've created cannot find MSJAVA.DLL Well I can't find that file anywhere on my computer. Why would my compiled vb.net 2005 active-x .dll need that file?
2. When I try to register the .dll using regsvr32, I get:
"Classlibrary3 was loaded, but the DllRegisterServer or DllUnregisterServer entry point was not found."
I rebooted to clear memory and still got the same error. Why can't my .dll be registered?
thanks!
|
|
|
|
|
Probably because you're using REGSVR32 when you should be using REGASM[^].
Keep in mind that VB.NET and C# cannot build an actual ActiveX control in the classical sense. They can generate something that behaves like one, but it is only a COM wrapper around a managed-code assembly that makes it look like that to the consumer.
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
Hi guys:
I create a form with a bunch of combo boxes, and i named them with: cbo0,cbo1,cbo2.....
I would like to create a function to test if any of them is empty. So i did it this way:
Dim combos(6) As Object
Dim cnt As Integer
Form_Load() Handles MyBase.Load
For cnt = 0 To 6
combos(cnt) = "strLand" & cnt.ToString
Next
End Sub
Private Function checkCbos() As Boolean
Dim cbos As ComboBox
For cnt = 0 To 6
cbos = CType(combos(cnt), ComboBox)
If cbos.Text = "" Then
errorPro.SetError(cbos, "Do not leave the factor box empty!")
End If
Next
End Function
and after all this, i countered a casting error, could anyone helps me to debug this, or have a better idea to validate those combo boxes?thanks very much.
Cheers
Kevin
|
|
|
|
|
Try something like this. You might have to modifiy the code a little I don't have VS open so I don't think it will compile, but it will give you the right way to go about doing this.
<br />
for each item as control in form.controls<br />
if item.GetType is GetType(ComboBox) then<br />
if item.Text = "" then<br />
errorPro.SetError(cbos, "Do not leave the factor box empty!")<br />
end if<br />
end if<br />
next<br />
Mike Lasseter
|
|
|
|
|
Something like this:
Private Function checkCbos() As Boolean<br />
Dim myControl As Control<br />
<br />
For Each myControl In Me.Controls<br />
If TypeOf myControl Is ComboBox Then<br />
If myControl.Text = "" Then<br />
'Set error provider<br />
errorPro.SetError(myControl, "Do not leave the factor box empty!")<br />
'Return False and exit to calling procedure <br />
Return False<br />
Else<br />
'Clear the error provider<br />
errorPro.SetError(myControl, "") <br />
End If<br />
End If<br />
Next myControl<br />
<br />
'If code gets to here, no combo's text is ""<br />
Return True<br />
<br />
End Function
Steve
|
|
|
|
|
Thanks Mike and Steve,i got the point, that is very helpful.
|
|
|
|
|
Hi Steve, ur code only checks a single combox and returns false if the control text is empty. I add a integer to count, and make sure all the boxes are checked. Add 1 if it is not empty.
Private Function checkCbos() As Boolean
Dim myControl As Control
Dim count As Integer = 0
For Each myControl In Me.Controls
If TypeOf myControl Is ComboBox Then
If myControl.Text = "" Then
'Set error provider
errorPro.SetError(myControl, "Do not leave box empty!")
'Return False and exit to calling procedure
Else
'Clear the error provider
errorPro.SetError(myControl, "")
count += 1
End If
End If
Next myControl
'If code gets to here, no combo's text is ""
If count = 6 Then
Return True
Else
Return False
End If
End Function
|
|
|
|
|
Well, it will check all combo boxes but only return an error for one at a time.
Presumably you call checkCbos() in your Save button 'click' procedure?
The function will set an error provider on the first combo box that contains "" and then exit the function. If you select an item and then click your Save button again, you will be notified of any further combos containing "".
This way, if you added another combo box at any time, the code will still work.
The way you have done it is fine but would fail if you added another combo at any time. If it works for you though, that's great!
Steve
|
|
|
|
|
I am working on project... Like a shell and my question is.
Is it possible to turn off windows keys like (WinKey+D), (Winkey+S),etc.
And other that can stop application. Its a program like a desktop and u can only use icons on it not other programs and other. Its for an gaming place. Please help me.
I need anny help and suggestions.
Thanks
|
|
|
|