|
Are you f***ing mad. Try and do something else like have sex. F***er?????
|
|
|
|
|
Use ADODB to scan an image? Bottom line is -> you can't. That's not what ADODB does.
Are you trying to capture an image from a video camera? If so, what kind? A QuickCam?
For something like that, your going to need a SDK from the manufacturer of the camera to get at an image. Logitech has one that works with its line of QuickCams at http://developer.logitech.com.
RageInTheMachine9532
|
|
|
|
|
I start my project with a module called SubmainController.vb which contains a Public Sub Main()
In this public sub main I want to call a sub from another form in the project. I’ve tried the following without ant success.
Dim Myform1 as new Form1
Call Myform1.LoadFromFile
(property access my assign to the property or use its value
Dim ProjectName as string “Web Project”
Call ProjectName.Myform1.LoadFromFile
(myform1 not a member of string)
I though this would be simple. I appreciate help
Thanks GregC
Thanks, GregC
|
|
|
|
|
How about making the Sub a Public method of a separate class, thus making it available to both forms without the need of instantiating either form unneccessarily. As an alternative, if the method is declared Shared , it should be accessible even without creating an instance of the form, simply by calling Form.MethodName() .
Oh, and you don't need to use "Call" anymore.
|
|
|
|
|
Hi should have added that this is an event.
Public Sub loadFromFile_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles loadFromFile.Click
is it possible to raise an event on another form from a sub main? i'm not quite sure how to code that. Would i need to change the above click event code and how would I call or raise the event from the sub main? And would rasing the event execute the click event?
Thanks, GregC
|
|
|
|
|
You can certainly do something like what you describe; here's what I did:
Module MainModule
Sub Main()
FormRaisingEvent.LoadFromFile(New Object, New EventArgs)
End Sub
End Module
and the form's code looks like this:
Public Class FormRaisingEvent
Inherits System.Windows.Forms.Form
' Windows Form Details omitted...
Public Shared Sub LoadFromFile(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
MessageBox.Show("Hello!")
End Sub
End Class
The important things are 1) declare the Sub as Shared and 2) when you call the method of the form from somewhere else, pass it the parameters required in the method's signature.
Let me know if this answers your question.
|
|
|
|
|
Hi John, THANKS! It worked GREAT!
Thanks, GregC
|
|
|
|
|
Hi....
Can anyone tell me how can I retrieve info about what software that have been installed on a pc and how can I read REG_Binary?
|
|
|
|
|
Not sure about the REG_Binary part. Do you want to read registry values in VB6 or .NET?
|
|
|
|
|
|
There are two ways of doing this in VB.NET, the VB way and the .NET framework way. Both are described in more detail than I could provide, here or you can read the documentation on MSDN, here.
|
|
|
|
|
I've already read this article. But it doesn't have what i need to know. But thanks anyway for your time.
|
|
|
|
|
*What* do you need to know? Be more specific.
grtz, Guus
|
|
|
|
|
specifically i want to retrieve system info such as processor brand, hard disk space, total space and free space and also all the program that is installed in a pc. I know if we want to get all the info we should use registry. I can retrieve the info with REG_SV data type and REG_DWORD data type but i don't know how to get the info that use REG_Binary data type.
|
|
|
|
|
Ever tried to use the sysinfo.ocx control?
Grtz, Guus
|
|
|
|
|
nope. is it exist in .net framework. how to use it. To be honest with u, i'm a newbie in .net
|
|
|
|
|
There is a relatively complex API called "WMI" -- Windows Management Instrumentation. Look for documentation on that. Unfortunately, I've never used it, but I've scanned through some articles in the past that imply that you can achieve what you are looking for with it.
|
|
|
|
|
The best way to do that if thru WMI. Not the easiest API to use, but you can start with the documentation on it here[^].
I've done exactly what your doing, but had to do it the hard way in C/C++ because not all my client machines had WMI support on them. If your reading from the registry or from disk info, it's a real pain to write code for every tiny bit of information you want to collect. WMI makes it SOOO much easier, but you still have to write a query for each piece of info you want. It's comes down a a few lines of code per item you want, but it's MUCH less that getting it out of the registry. Besides, some of the info you want isn't stored in the registry at all...
EDIT:
There are WMI Downloads for Tutorials and Tools here[^].
RageInTheMachine9532
|
|
|
|
|
thanks you guys....you really help me a lot.
|
|
|
|
|
This is about a weird compilation error I'm having:
I have 3 projects in a solution: project A (VB) is reference by projet B (C#) and project C (VB) referes both.
I get an error while trying to use type of A in C ???
error BC30652: Reference required to assembly 'A' containing the type 'A.iTraceFile'. Add one to your project.
Anyone faced this ?
Jonathan de Halleux.
www.dotnetwiki.org
|
|
|
|
|
Yeah. Fixed by adding a Reference in Project C, to Project A. In Project C, right click on the References folder, click Add Reference. Then click on the Projects tab and select the project you want to reference, A in your case. Click Select, then OK.
RageInTheMachine9532
|
|
|
|
|
I am trying to find a way to change an ethernet card to run on 100mb Full Duplex when it is initially set to run at Auto-negotiate. Is there a way to do this programatically?
|
|
|
|
|
Hello!
I have a combobox with autocomplete, and I linked this combobox with data bindings to a database.
Now I want that when I choose an item to automatically go to that record in database and display the information on screen.
How do I make this, to go to that record in database?
PLEASE HELP ME!
Thank you!
Bye!
|
|
|
|
|
Create two data adapters. One with just the displayed and key field or unique field selected. And another with all the fields selected and in the key field or unique field under criteria put a "=?" no quotes. Then create datasets for both. Then you need to create Functions either in a component module or just in your forms code. They could look something like this. This is from a component
***************************************************************************
Public Function getdataset(ByVal strValue As String) As DataSet
'fill the dataset
DsGuests1.Clear()
daGuests.SelectCommand.Parameters("Phone").Value = strValue
NOTE:The "Phone" parameter will just be your unique field
daGuests.Fill(DsGuests1)
Return DsGuests1
End Function
Public Function GetNames() As DataView
'fill the dataset
daNames.Fill(DsNames1)
Return dvNames
End Function
***************************************************************************
Then you are going to have to set up the combo box to get the displayed names by calling your dataset and putting it into a dataview object with just the displayed field as the Display Member and the Unique key field as data member when the form loads. Could look something like this.
***************************************************************************
Dim dvnames As DataView
dvnames = mobjguests.GetNames
With Combobox1
.DataSource = dvnames
.DisplayMember = "FullName"
.ValueMember = "Phone"
.SelectedIndex = -1
End With
NOTE: mobjguests was the name of my component it would be just a procedure of
getnames if you were using the form and would just be
dvnames = GetNames
***************************************************************************
After the names are filled in the list and you then need to set up a Combobox indexChanged event. This will call the dataset with all of the fields in it and will send the data member part of your combobox to the function. After this you are going to have to bind each of you data fields to a textbox or whatever you choice and all of this will looks something like this.
***************************************************************************
Private Sub cboNames_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cboNames.SelectedIndexChanged
Dim dsguests As DataSet
Static fieldsbound As Boolean = False
NOTE:The static fieldsbound is so that the below code only executes one time because the fields only need to be bound one time. Other wise will throw and error. The only code that you want to execute everytime is the getdataset function. When the dataset changes all of the bound fields will change.
dsguests = mobjguests.getdataset(cboNames.SelectedValue.ToString())
If Not fieldsbound Then
binddata(dsguests)
NOTE:You are sending the dataset with parameter meet to be bound and this dataset only contains the data for that record.
fieldsbound = True
End If
End Sub
Private Sub binddata(ByVal dsguests As DataSet)
'binds the fields
txtRoom.DataBindings.Add("text", dsguests.Table("Guest"), "Room")
The Guests will be your Table that your are accessing and the room will be the field that you are binding. Just do the same for each of your fields.
End Sub
I hope this helps if you need any more help with this you can contact me on a way to get a programming example at Pugman812@aol.com
|
|
|
|
|
Hi,
How can we sort the listview on the basis of the clicked column?
Thanks
Tasnim
|
|
|
|