|
Hey Im having a problem with my calendar project and cant get my Mybase.new to work. This project is way over my competence and would be very greatful if someone could take a look at it.
Public Sub New(ByVal calendar As Calendar)
MyBase.New(calendar) <-------
_topsPassing = New List(Of CalendarDayTop)()
_backgroundColor = Color.Empty
_borderColor = Color.Empty
_oreColor = Color.Empty
_backgroundColorLighter = Color.Empty
End Sub
Im getting the error "Value of type 'WindowsApplication1.Calendar' cannot be converted to 'System.Windows.Forms.Calendar.Calendar"
The project is quite big so the problem might be somewhere else. I uploaded it on speedyshare if someone got the time, I would really appreciate some help.
http://speedy.sh/sYRjS/ProjArbete4.zip[^]
Regards Christoffer
|
|
|
|
|
You're trying to pass your Calendar class in the place of what your base class is expecting, a System.Windows.Forms.Calendar.Calendar. The two are not interchangable as it's saying that your Calendar class did not inherit from System.Windows.Forms.Calendar.Calendar.
You have to pass in a System.Windows.Forms.Calendar.Calendar, or something that derives from it.
|
|
|
|
|
Hi all Master VB6, someone can help me, please...
I need source code or ocx (free) for EditableGrid, our customer need input detail trx in editable grid, and easy to use.
And will be running on Windows 7 (32 or 64 bit).
Thanks before
|
|
|
|
|
Why on this earth are you doing new development in VB6?? It's dead and has been for quite a long time now.
|
|
|
|
|
Because vb6 has help me to get jobs and get money from it and have value for me, not mean we should forget it.
I create project with vb6 for small project, but now I am focus to the web programming like dot net and php.
May be another person can help me, please.
Thank you
|
|
|
|
|
Good luck! Industry support for controls for VB6 is just about completely gone.
|
|
|
|
|
h0k3n9 wrote: Because vb6 has help me to get jobs and get money from it
In that case you better hurry to VB.NET, as VB6 is dead. It's no longer sold, and the modern platforms will not be built with VB6 in mind. Unless you still develop for Windows 95, it's time to move on..
..or become a part of history
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
|
|
|
|
|
You could download the VB.NET 2012 for free here[^]. Think that would be just as helpful as any other answers youd likely to get.
|
|
|
|
|
|
I've been working around this for years and think it's time I finally learn something.
I need to implement what in MS Access would be a "Form_Current" event. An event that fires each time a new record is displayed from the underlying record set and *after* the controls have their values.
I've tried BindingSource.PositionChanged and BindingSource.CurrentChanged but they're no good because I can't rely on the controls actually having a value. Using the change event on each control (in this case) would be a royal pain because so much goes on when the record changes (things light up, bells and whistles go off, etc.)
What's the best practice?
|
|
|
|
|
I have a vb6 project with a form with a Apex TruedbGrid 6 Oledb datasource that has as an ADODC (Ado 6.0 sp6) on the same form.
cn.ConnectionString = "Provider=SQLNCLI.1;Data Source=pc-musica;Initial Catalog=QdE;User ID=sa;Password=*******"
In Form_Load :
Adodc.ConnectionString = cn.ConnectionString
Adodc.RecordSource = "Select Code, Description from Cantine"
Adodc.Refresh
When executes last statement Adodc.Refresh only on Windows 7 (because everything works quietly in Xp) gives me the error:
Login failed for the user, type: -2147217843 Automation Error.
I checked the connection string and it is also right when the program uses the same connection to open a recordset and operates quietly.
The connection is declared in a module.
How do you think I can fix on Windows 7 32 bit?
|
|
|
|
|
|
This is not my case. I don't change password e don't work with SharePoint
|
|
|
|
|
Well try another Google search for that error code.
Use the best guess
|
|
|
|
|
marco.bruni wrote: How do you think I can fix on Windows 7 32 bit?
By moving to VB.NET; there's no guarantee that anything VB6 will work on the modern platforms. It has been dead quite some time now.
marco.bruni wrote: Login failed for the user, type: -2147217843 Automation Error.
Did you register your TruedbGrid? And all the other stuff referenced?
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
|
|
|
|
|
You could download the VB.NET 2012 for free here[^]. Think that would be just as helpful as any other answers youd likely to get.
|
|
|
|
|
I am getting this error when ever I want to add a second student to a form that has a Student ID that is Auto incremented. I first tried inserting all field to the database using the following code but failed to insert the Student photo and the enroll date properly.
Private Sub SaveBtn_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles SaveBtn.Click
Dim m, fe, F, P, H As String
Dim STPhoto As Image
Dim EnrollDate As Date
EnrollmentDateTxt.Value = Format(Now.Date, "yyyy-MM-dd")
EnrollDate = EnrollmentDateTxt.Value
Dim TA As StudentEnrollmentDataSetTableAdapters.StudentEnrollmentTblTableAdapter
TA.Insert(StudentIDTxt.Text, TelephoneTxt.Text, FirstNameTxt.Text, MiddleNameTxt.Text, LastNameTxt.Text, LevelTxt.Text, ClassroomTxt.Text, GuardianFnTxt.Text, GuardianLnTxt.Text, InstructorLnTxt.Text, m, fe, F, P, H, StudentPhoto.Image, DoBTxt.MaxDate, EnrollDate.Date, GraduationDateTxt.MaxDate, AboutStudentTxt.Text)
So I decided to use the dataset drag & drop feature to see if it can be helpful. It worked for the first entry but if I want to add another student right after the first one I am Getting the Concurrency Violation and the
Me.TableAdapterManager.UpdateAll(Me.StudentsListDataSet) is highlighted.
here is the full save button code:
Private Sub SaveBtn_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles SaveBtn.Click
If FirstNameTextBox.Text.Trim = "" Then
MsgBox("Fadlan Gali magaca hore ee Ardayga", MsgBoxStyle.Critical Or MsgBoxStyle.OkOnly, "First Name box cannot be empty")
FirstNameTextBox.Text = Focus()
Exit Sub
End If
If FirstNameTextBox.Text.Contains(".") Or FirstNameTextBox.Text.Contains("-") Then
MsgBox("Adeer Dhibic iyo xariixin lama ogala ee magaca hore ee ardayga gali", MsgBoxStyle.Critical Or MsgBoxStyle.OkOnly, "First Name box cannot contain (.) or (-)")
Exit Sub
End If
Try
Me.Validate()
Me.FulltimeStudentsTableBindingSource.EndEdit()
Me.TableAdapterManager.UpdateAll(Me.StudentsListDataSet)
MsgBox("Waxaad ku dartay 1 arday ", MsgBoxStyle.OkOnly, "One Student Added to Students lists")
Me.StudentsListDataSet.Dispose()
Me.TableAdapterManager.Dispose()
Me.Refresh()
I am not sure what
I am doing wrong as I when trough the code line by line and couldn't figure it out. I will highly appreciate if anyone can point me to what I am doing wrong. I even added an Insert Query into the table adapter to handle the table insert. Please help me if you can with any of my methods.
Thank you in advance.
|
|
|
|
|
IgaBaro wrote: that has a Student ID that is Auto incremented.
Has it been set as a primary key in the database?
IgaBaro wrote: It worked for the first entry but if I want to add another student right after the first one I am Getting the Concurrency Violation and the
How do the update and insert-statements look like? Can you post them here?
Alternatively, you could try your luck on MSDN; How to: Update Data by Using a TableAdapter[^]
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
|
|
|
|
|
Quote: Has it been set as a primary key in the database?
Yes its set as PRIMARY KEY as well Unique.
Quote: How do the update and insert-statements look like? Can you post them here?
I have posted this and here it is again.
Private Sub SaveBtn_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles SaveBtn.Click
Dim m, fe, F, P, H As String
Dim STPhoto As Image
Dim EnrollDate As Date
EnrollmentDateTxt.Value = Format(Now.Date, "yyyy-MM-dd")
EnrollDate = EnrollmentDateTxt.Value
Dim TA As StudentEnrollmentDataSetTableAdapters.StudentEnrollmentTblTableAdapter
TA.Insert(StudentIDTxt.Text, TelephoneTxt.Text, FirstNameTxt.Text, MiddleNameTxt.Text, LastNameTxt.Text, LevelTxt.Text, ClassroomTxt.Text, GuardianFnTxt.Text, GuardianLnTxt.Text, InstructorLnTxt.Text, m, fe, F, P, H, StudentPhoto.Image, DoBTxt.MaxDate, EnrollDate.Date, GraduationDateTxt.MaxDate, AboutStudentTxt.Text)
UPDATE: I created another Table with the StudentID not set as a primary key & Unique unchecked and it seems to work while its still Auto incremental set. I think It doesn't like the Auto incremental/primary key & Unique all at the set to true at the same time.
Can anyone tell me why My TA.Insert(StudentPhoto, EnrollDate) doesn't work?? StudentPhoto is set to Image and Enrolldate is using DateTimePicker. what am I doing wrong??
Thank you in advance.
|
|
|
|
|
IgaBaro wrote: I have posted this and here it is again.
My bad; the table-adapter is a class that does some magic in the background. It uses SQL-statements to do it's magic. I'd like to see both SQL statements. Those are the ones used to insert and update, the code you shown calls those in the background.
From MSDN[^];TableAdapters use data commands to read to and write from the database. The TableAdapter's initial Fill (main) query is used as the basis for creating the schema of the associated data table, as well as the InsertCommand, UpdateCommand, and DeleteCommand commands associated with the TableAdapter.Update method. This means that calling a TableAdapter's Update method executes the statements created when the TableAdapter was originally configured, and not one of the additional queries added with the TableAdapter Query Configuration Wizard.
When you use a TableAdapter, it effectively performs the same operations with the commands that you typically would perform. For example, when you call the adapter's Fill method, the adapter executes the data command in its SelectCommand property and uses a data reader (for example, SqlDataReader) to load the result set into the data table. Similarly, when you call the adapter's Update method, it executes the appropriate command (in the UpdateCommand, InsertCommand, and DeleteCommand properties) for each changed record in the data table.
I'd be guessing that the SQL-statement is either incorrect or incomplete, and it might be limited to having a single record.
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
|
|
|
|
|
hello all .
in this thread, i wanna ask to you how about make steganography in video ?
i wanna use a .NET program.
or if u have articles or all about steganography in video please give to me, because now I'm undergoing my final project at university .
thanks for attention Smile |
|
|
|
|
|
|
Hi everyone I want some help in my paint application, I am using pictuerbox to draw on it but in the last day my requirement is change that the user want to open an image and do all the functionality on it.. I try to open an image but when I choose some option to draw on the image its didn’t show...
I want some clue quickly please …
Its show for me this exception :
System.ArgumentNullException was unhandled
Message=Value cannot be null.
Parameter name: image
ParamName=image
Source=System.Drawing
StackTrace:
at System.Drawing.Graphics.FromImage(Image image)
at Paint_Note.Form1.OpenToolStripMenuItem_Click(Object sender, EventArgs e) in C:\Users\Lucky\Documents\Visual Studio 2010\Projects\Paint\Paint\Paint_Note.vb:line 340
at System.Windows.Forms.ToolStripItem.RaiseEvent(Object key, EventArgs e)
at System.Windows.Forms.ToolStripMenuItem.OnClick(EventArgs e)
at System.Windows.Forms.ToolStripItem.HandleClick(EventArgs e)
at System.Windows.Forms.ToolStripItem.HandleMouseUp(MouseEventArgs e)
at System.Windows.Forms.ToolStripItem.FireEventInteractive(EventArgs e, ToolStripItemEventType met)
at System.Windows.Forms.ToolStripItem.FireEvent(EventArgs e, ToolStripItemEventType met)
at System.Windows.Forms.ToolStrip.OnMouseUp(MouseEventArgs mea)
at System.Windows.Forms.ToolStripDropDown.OnMouseUp(MouseEventArgs mea)
at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.ScrollableControl.WndProc(Message& m)
at System.Windows.Forms.ToolStrip.WndProc(Message& m)
at System.Windows.Forms.ToolStripDropDown.WndProc(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
at System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG& msg)
at System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(IntPtr dwComponentID, Int32 reason, Int32 pvLoopData)
at System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)
at System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)
at Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.OnRun()
at Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.DoApplicationModel()
at Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.Run(String[] commandLine)
at Paint_Note.My.MyApplication.Main(String[] Args) in 17d14f5c-a337-4978-8281-53493378c1071.vb:line 81
at System.AppDomain._nExecuteAssembly(RuntimeAssembly assembly, String[] args)
at System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String[] args)
at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean ignoreSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Threading.ThreadHelper.ThreadStart()
InnerException:
|
|
|
|
|
Lolo Hyun wrote: I want some clue quickly please You have failed to initialise some reference before trying to use it, hence the System.ArgumentNullException . Find out what line in your program that occurred on and fix the reference.
Use the best guess
|
|
|
|
|
The line
FromImage(Image image) from the method "OpenToolStripMenuItem_Click" is throwing an error. Go to line 340 of the file "Paint_Note.vb", that's where the error is. Copy/paste the routine on the forum and we can help a bit more.
Lolo Hyun wrote: in the last day my requirement is change Whehe - aight, have someone build a house, and wait until the final day. Now tell them you want the basement on the second floor.
Once there's a deal, there's no change in requirement without changing the deal.
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
|
|
|
|
|