|
hi,
I try new projects, usb sim card editor.
I want to do with the visual basic editor in 2008. net
I have a usbsimcard adapter.
I want to do this; read the sim card phoonebook
Where should I start?
tahnks.
|
|
|
|
|
Reading most if not all of the documentation on an API's you wish to use that came with(or are available for) that usb reader.
The best way to accelerate a Macintosh is at 9.8m/sec² - Marcus Dolengo
|
|
|
|
|
maybe I need a ocx, did you not?
|
|
|
|
|
Maybe you need to contact the vendor who makes the hardware in question ?
Christian Graus
Driven to the arms of OSX by Vista.
|
|
|
|
|
|
Hi all,
i made classlibrary project and I checked "Register for COM interop", its run correctly but when i'm trying to close the form the following error happend
"Attempting managed execution inside OS Loader lock. Do not attempt to run managed code inside a DllMain or image initialization function since doing so can cause the application to hang."
I want to know why?
Thanks for help
|
|
|
|
|
Well, the error can be caused by a variety of things. Since you didn't describe anything about your .DLL, what it does, or any other references it uses, it's pretty much impossible to tell you what's wrong. About the best we can do is show you a list of articles and discussions to read so you can see what might match up to your situation, here[^].
|
|
|
|
|
Thanks for your help
i think the problem here is in the ProgId attribute, so??
Thanks
|
|
|
|
|
Somehow I doubt it.
But, how am I supposed to know that?? I know nothing about your code, other than it generates this error message. I also told you that this message could be caused by any number of things. So, how am I supposed to know if that (very vauge) description you gave is the cause?? I can't test it, so you have to come up with a test of whatever you suspect might be the cause and try a solution.
|
|
|
|
|
Hi. got a project which have been developing, where you have a login form, and you login as a user or admin. and then the login form hides, once the okay button is clicked. then you see a database and two menus, one for navigation and the other for file menu, and one of the options, is close. you click the yes button, this database form hides, then another form comes up with three controls, an about button, a data button, which then supposed to show a data grid and a exit button. well the about button, is doing nothing. put the code in here, and getting errors, saying that the table adaptor, is not being accepted and do have a table adaptor, so how to fix this problem. any ideas, or how to add atatchments on the forum, is allowed, but not sure if it is allowed. let me know if any one can help. cheers Marvin.
|
|
|
|
|
StarTrekCafe wrote: getting errors, saying that the table adaptor, is not being accepted
Too vague. Post the exact error message and the code snippet in which it occurred.
|
|
|
|
|
Hi. well here's the error messages and also the code below. cheers Marvin.
Error 1 'TblCustomerTableAdapter' is not a member of 'ADMITSolutionsJobRecordBook.frmData'. C:\DOCS\Tafe\CertificateFourProgramming\CertFour\Programming\VisualBasic\Assignment\Project\Development\ADMITSolutionsJobRecordBook\ADMITSolutionsJobRecordBook\frmData.vb 12 9 ADMITSolutionsJobRecordBook
Error 2 'ADMITSolutionsJobRecordBookDataSet1' is not a member of 'ADMITSolutionsJobRecordBook.frmData'. C:\DOCS\Tafe\CertificateFourProgramming\CertFour\Programming\VisualBasic\Assignment\Project\Development\ADMITSolutionsJobRecordBook\ADMITSolutionsJobRecordBook\frmData.vb 12 41 ADMITSolutionsJobRecordBook
Error 3 'TblCustomerTableAdapter' is not a member of 'ADMITSolutionsJobRecordBook.frmData'. C:\DOCS\Tafe\CertificateFourProgramming\CertFour\Programming\VisualBasic\Assignment\Project\Development\ADMITSolutionsJobRecordBook\ADMITSolutionsJobRecordBook\frmData.vb 15 9 ADMITSolutionsJobRecordBook
Error 4 'ADMITSolutionsJobRecordBookDataSet1' is not a member of 'ADMITSolutionsJobRecordBook.frmData'. C:\DOCS\Tafe\CertificateFourProgramming\CertFour\Programming\VisualBasic\Assignment\Project\Development\ADMITSolutionsJobRecordBook\ADMITSolutionsJobRecordBook\frmData.vb 15 41 ADMITSolutionsJobRecordBook
and here's the code for the form, and when i try to click the about button, nothing happens.
'Program: ADMIT Solutions Job Record Book
'Programmer: Marvin Hunkin
'Date Created: Thursday January 22 2009
'Version: 1.3
'Purpose: This application will allow the user to view, save, add, delete and update records on this database. The user will also be able to find out information about this application, will be able to view a list of all customers, and then be able to close the database. The user will then return to the main screen. Then the user can click on the exit buttons to close this application.
Public Class frmControls
Private Sub frmControls_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
'TODO: This line of code loads data into the 'ADMITSolutionsJobRecordBookDataSet.tblCustomer' table. You can move, or remove it, as needed.
Me.TblCustomerTableAdapter.Fill(Me.ADMITSolutionsJobRecordBookDataSet.tblCustomer)
End Sub
Private Sub btnAboutButton_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnAboutButton.Click
'Show About Box for this application
frmAbout.ShowDialog()
End Sub
Private Sub btnDataButton_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnDataButton.Click
'Displays The Data Grid for all users on this database.
End Sub
Private Sub btnExitButton_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnExitButton.Click
'Exits the application and returns the user to the Windows Desktop
Me.Close()
End Sub
End Class
|
|
|
|
|
My question is:
how to delete data in a specifically cell in a datarow from a specifically sql datatble ?
to insert i have the folowing
Dim AgendaData As New AgendaData
AgendaData.TijdDagWeekJaar = TijdDagWeekJaar.Text
AgendaData.WeekJaar = WeekJaar.Text
AgendaData.JaarMaand = JaarMaand.Text
AgendaData.Jaar = Jaar.Text
AgendaData.textbox2 = onderwerp1.Text
AgendaData.textbox3 = Onderwerp2.Text
AgendaData.textbox4 = Onderwerp3.Text
AgendaData.textbox5 = Onderwerp4.Text
AgendaData.textbox6 = Onderwerp5.Text
Dim Myconn As New SqlClient.SqlConnection("Data Source=.\SQLEXPRESS;AttachDbFilename=/DataDirectory/\Agenda.mdf;Integrated Security=True;User Instance=True")
Myconn.Open()
Dim cmd As New SqlClient.SqlCommand( _
"INSERT INTO MijnAgenda (TijdDagWeekJaarId, WeekJaarID, JaarID, JaarMaandID, Onderwerp1, Onderwerp2, Onderwerp3, Onderwerp4, Onderwerp5)" _
& "VALUES (@TijdDagWeekJaarId, @WeekJaarId, @JaarID, @JaarMaandID, @Onderwerp1, @Onderwerp2, @Onderwerp3, @Onderwerp4, @Onderwerp5)", Myconn)
cmd.Parameters.Add(New SqlClient.SqlParameter("TijdDagWeekJaarID", AgendaData.TijdDagWeekJaar))
cmd.Parameters.Add(New SqlClient.SqlParameter("WeekJaarID", AgendaData.WeekJaar))
cmd.Parameters.Add(New SqlClient.SqlParameter("JaarMaandID", AgendaData.JaarMaand))
cmd.Parameters.Add(New SqlClient.SqlParameter("JaarID", AgendaData.Jaar))
cmd.Parameters.Add(New SqlClient.SqlParameter("Onderwerp1", AgendaData.textbox2))
cmd.Parameters.Add(New SqlClient.SqlParameter("Onderwerp2", AgendaData.textbox3))
cmd.Parameters.Add(New SqlClient.SqlParameter("Onderwerp3", AgendaData.textbox4))
cmd.Parameters.Add(New SqlClient.SqlParameter("Onderwerp4", AgendaData.textbox5))
cmd.Parameters.Add(New SqlClient.SqlParameter("Onderwerp5", AgendaData.textbox6))
Try
Form1.TextBox2.Text = AgendaData.textbox2
Form1.TextBox3.Text = AgendaData.textbox3
Form1.TextBox4.Text = AgendaData.textbox4
Form1.TextBox5.Text = AgendaData.textbox5
cmd.ExecuteNonQuery()
MessageBox.Show("Gegevens zijn met succes Toegevoegd.")
Catch ex As Exception
MessageBox.Show(ex.Message)
End Try
' Close the connection.
Myconn.Close()
Myconn.Dispose()
End If
But how can i delete ,shel we say, onderwerp3 in the datarow where form1.textbox4.text = onderwerp3 ?
i dont want to delete the whole datarow only the data in that cell.
Thanks
|
|
|
|
|
|
Thanks Eddy
I thought so I have tried that before.
But after a while i saw that i had a bug somewhere in my code in another form.
Again Thanks From Kerkrade, Netherlands
|
|
|
|
|
My pleasure, greetings from the same Kerkrade
I are troll
|
|
|
|
|
can anybody tell me how i can display the mac address(physical address of a computer) in a text box on the click property of a command button in vb.net
thanks
|
|
|
|
|
|
Yuck. Have you tried the System.Net.NetworkInformation namespace?
Dim interfaces() as System.Net.NetworkInformation.NetworkInterface = System.Net.NetworkInformation.NetworkInterface.GetAllNetworkInterfaces()
For Each currentInterface as System.Net.NetworkInformation.NetworkInterface in interfaces
MessageBox.Show(currentInterface.GetPhysicalAddress().ToString())
Next
|
|
|
|
|
Looks easier to digest
I are troll
|
|
|
|
|
|
I am guessing you are using ASP.NET, make sure that on postback, you are not filling the data in. You need something like this:
if(!IsPostBack)
{
//Fill my GridView here
}
The best way to accelerate a Macintosh is at 9.8m/sec² - Marcus Dolengo
|
|
|
|
|
thanks for the reply
yes, i m using asp.net. will work on the solution
|
|
|
|
|
All the posts in here are about VB.NET, try to think about your subject line.
It's impossible to help without seeing some code. What value are you passing ? Is it ASP.NET ( if it is, you're in the wrong forum ) ?
Christian Graus
Driven to the arms of OSX by Vista.
|
|
|
|
|
Hi All
I have a C++ DLL that performs some tasks and provides a regular update back to the VB.NET host so that a progress bar can be updated. The problem I have is that the callback fires once, but also exits the DLL for good.
Here is how my callback function is referenced in VB.NET
Imports System.Runtime.InteropServices
<UnmanagedFunctionPointer(CallingConvention.StdCall)> Public Delegate Sub controlProgressBarDelegate(ByVal progressValue As UInt32, ByVal message As String)
Public Declare Auto Sub CallBackTest Lib "CppTestDLL.dll" (ByRef arbitraryNum As Int32, ByVal pCallbackFunc As controlProgressBarDelegate)
The C++ DLL function "CallBackTest" is called via:
globalFuncsVars.CallBackTest(arbNumber, AddressOf controlProgressBar)
And the callback function, which simply updates a progress bar and puts any returned message string into a label, is:
Public Function controlProgressBar(ByVal progressValue As UInt32, ByVal message As String)
ProgressBar1.Value = progressValue
Label1.Text = message
Return 0
End Function
Obviously this is a very simple test example.
The code in the C++ DLL is:
typedef void (__stdcall progressCallback)(int progress, const char * p_msg);
extern "C" __declspec(dllexport) int __stdcall CallBackTest(int arbitaryNumber, progressCallback * p_progressCallback)
{
unsigned int counter = 0;
const char msg[12] = "Counting...";
for (unsigned int i = 0; i < 100; i += 1){
p_progressCallback(counter, msg);
counter += (i * 10);
for(unsigned int j=0; i < 100000; i++){}
}
return 0;
}
Again, a simple example where the counter goes from 0 to 100 in steps of 1 (with intervals of 100000 clock cycles... ish).
Now, when p_progressCallback is first called the first value of counter = 0 and the contents of the msg string are indeed returned to the VB.NET controlProgressBar function. However, there it stops, after the controlProgressBar function is executed the thread does not return back to the DLL.
Any thoughts?
Apologies if this is more a C++ issue rather than a VB.NET issue.
Kind regards, Kurt
|
|
|
|
|