VS 2008 Pass Error Message From Class To Windows Form?
Aug 13, 2009
I'm trying to program in a true object oriented manner and its causing me to re-learn a few things. Specifically, I'm having some trouble with error handling. I have all of my data access being performed by an adapter class in a seperate project. I can catch duplicate records without any problems, but I want to be able to send a message back to the user. Here's what I have so far:
[Code]...
View 11 Replies
ADVERTISEMENT
Nov 26, 2010
I'm upgrading a project from VB6 to VB2008.I have a routine that clears a combo box, named 'cmbDataTable' which could be on any form. I pass the form and the combo box is cleared.
[code]...
I assumed it would be the same in VB2008 but I get the error.'cmbDataTable' is not a menber of 'System.Windows.Forms.Form'I am working my way through the project, first updating the global procedures - this is one - I haven't written the calls so cmbDataTable doesn't yet exist.
View 7 Replies
Jul 16, 2010
When I import a class to a form and use it I get this error:
An error occurred creating the form. Additional information is found in Exception.InnerException. Error: The document refers to itself of the default instance created during the formation of infinite recursion. Set a reference to the form constructor using the form attribute of Me.
The code is...
Imports TCP.SystemBuild
Public Class MainForm
Dim SystemBuild As New SystemBuild
View 4 Replies
May 3, 2012
I'm writting a class that needs the form handle but there is a way to use it without send it as argument in the class constructor or in a property?I know that the handler is not set until the form is completely loaded so that is another problem too.The basic idea is catch the form handle without pass it as argument and handle the wm messages.
View 2 Replies
May 3, 2012
I'm trying to pass all data from a DB to a report: but I get an error (The report has no tables)
[Code]....
View 2 Replies
Mar 12, 2010
When I do this
Public Class cInherits : Inherits Panel
I get this: Base class 'System.Windows.Forms.Panel' specified for class 'MenuButton' cannot be different from the base class 'System.Windows.Forms.UserControl' of one of its other partial types.
How do I inherit?
View 4 Replies
Mar 11, 2009
I am converting some VB6 code which passed an unknown form object to a class, which then used the passed form object to reference the calling form and direct the data from the class as follows:
The Called Class in the class clsGetRecord
Public Function Execute(ByRef FRMForm as form) as booleanFRMForm.List1.Additem(SomeData)....Execute = SomeBool End Function
The clsGetRecord is used by many different forms which receive data all have objects called List1 as: The Calling Form for the form
frmThisFormPrivate function() as booleanDim objRecord as new clsGetRecordbRet = objRecord.Execute(frmThisForm)
The passed form object which will receive dataEnd function. Is there any simple way to do this since the calling form object is unknown at design time?
View 2 Replies
May 1, 2012
My problem is that is have 4 forms, 3 of these forms allow me to pass variables between them.. however one form the Booking form won't allow me to pass the txtTotal variable to the Confirmation Form.
All the other forms all me to do this, im not doing anything different i can see... im thinking that perhaps another part of the form is prohibiting me from passing that txtTotal to the Confirmatin form.[code]...
View 1 Replies
Jan 9, 2011
All the other forms all me to do this, im not doing anything different i can see... im thinking that perhaps another part of the form is prohibiting me from passing that txtTotal to the Confirmatin form.The following is for the Confirmation form, it should display the txtTotal in lblprice from the Booking form but shows nothing
Public Class Confirmation
Private Sub btnBack_Click(sender As System.Object, e As System.EventArgs) Handles btnBack.Click
[code].....
View 1 Replies
Jan 22, 2011
how to pass value from one form into another form...? for example if i have 1 mdiform and 2 form (form1, and form2) for load form1 i'm using system.reflection.assembly here is the code for load form1 :
Imports System.Reflection
Private Asm As Assembly
Private FrmNama As Form
Public Function GetForm(ByVal FormName As String) As Form
[code]....
after form1 load i call form2 from form1 and from form2 i want pass value, here is the code from form2 to pass value into form1 :
form1.textbox1.text = textform2.text
why value from form2 can't fill into textbox1 in form1?
View 15 Replies
Apr 14, 2009
I have a project that up until recently has been working fine. It sends an email message to a user once a file has been successfully uploaded, registered and/or approved to use the website. It is written in VB.NET framework 1.1, running ASP.NET on a Windows 2003 server SE sp2.
First the code
Public Sub EmailAfterRegister(ByVal sEmail As String, ByVal sUser As String)
Try
[code]....
This has worked for over one or two years. Today I realized upon testing I get the following error:The procedure entry point IstrcmpiI could not be located in the dynamic link library MSDART.DLL.Upon some research I found that maybe I needed to install MDAC 2.8, which i downloaded and installed today, however i still get the same error. I have had my communications and network admins check traffic and connectivity to the smtp server and all is working fine. Yet I still get the error.
View 2 Replies
Sep 10, 2010
FormA contain a textbox for user to enter their name and a button. When the user click the button, it will show the FormB which contain the CrystalReportViewer. I would like to to display the name which the user enter in the textbox on FormA on the CyrstalReportViewer.
The question is, how do I pass the textbox value to the Crystal Report Viewer The secondary question is how I am going to display the value on the Crystal Report Viewer.For you information, I am using VB.net.
View 1 Replies
Feb 20, 2012
I am creating a windows application which required Dynamic Connection String in the app starting (user need to provide db credentials through a form), After entering the connection credentials user redirected to new win form Everything is working fine but how can I pass my dynamic connection to another form.I tried to save it to App variable but I couldn't (I think its read only) Also I tried save it to registry but can't retrieve values.Is there any other option available ? like writing & retrieving ConString to a text file or XML.
View 1 Replies
Jun 4, 2009
I am working on a windows application in vb.net 2005 and it needs to connect to the SQL Server database. In this example I testing if the connection is able to open properly:
[Code]...
Is it something dealing with the permissions set with the database server or something? I am new at .NET programming and I have been spinning my wheels on this for the past couple of days and I am at a loss. From what I research, this error should only occur if I was creating a web program, but I am not. It is a windows application.
View 7 Replies
Feb 10, 2011
a designed a tetris game in visual basic 2005 but i keep getting the error message 'A startup form has not been specified.' everytime i start de bugging it does anyone know what the problem might be?
View 3 Replies
Dec 30, 2009
Every time I modify something on a form (add or delete controls , modify their colors etc) , when I debug the program (with the Play button), I get a message saying: The file C:........MyForm.vb cannot be modified at this time .
Why is this happening? I have noticed that the only way to bypass this problem is to save before debugging , but that is not convenient because I don't want to save something that I haven't decided yet. One more thing that I have observed is that this only happens in projects that have been created with the Upgrade Wizard (from VB6). This never happens in new projects. Does anyone know why is this happening ?
View 5 Replies
Sep 3, 2009
While a fairly simple form it has had its problems. The latest is an error message (see below) that I do not understand and hence cannot correct. I have looked at the other postings, but did not see one that would apply.
CODE:
View 5 Replies
Sep 28, 2009
I'm trying to learn little SQL database with VB form application.
I made a little test application and publish it. On my PC works normal after installing. But when I tried to install the app on my wifes PC I get this error message
What does this mean? Is this something connected to app directly or not? In "Prerequisites..." I don't see nothing like this
View 4 Replies
Jun 16, 2010
I created a simple user control and everything went fine.Then I created another of the same control (as a different project) from scratch (creating the controls in a different configuration; but pasting code from the previous one from a text file).As far as I know I did everything the same for creating a user controlCreate a Class Library project Then Project>Add New Item> User Control Then delete the initial class that was added automatically (usually named Class1.vb) Put all of my code and components into the user control class.However, when I wanted to run it in the debugger as I did in the previous project, I now get an error message:"A project with an Output Type of Class Library cannot be started directly."
View 6 Replies
Jun 10, 2011
I have one form, which the user enters upto 5 websites then clicks go - I have on the second form, the one with the webbrowser. timer which checks if the web browser is busy then either a green light or black image will be shown along side the assocaited input box on the first form. I am finding it impossible to feed variables into the clock through ByVal, like I would a subroutine or function.
[Code]...
View 4 Replies
Oct 2, 2011
I'd like to write a simple Windows form that will make it easy to record a voice message before uploading it to a remote web server and sending the URL to the recipient(s):
[URL]
Currently, the user has to use Sound Record to record the message, use an FTP client to upload it to a web server, and finally, use an e-mail client to send the URL. I'd like to combine those three features into one.
View 14 Replies
May 14, 2011
I have created an application which consists of 3 Layers: GUI-BLL-DLL. When I am loading a flat file I am doing this in the DLL but I want to show to the user the process through a progress bar in the GUI. So I want to pass the variable LineCounts from the DLL to GUI. I know that I have to use EVENTS
View 1 Replies
Jun 10, 2010
I have a Windows Form application compiled to a .exe that contains standard classes and one windows form class. I would like to reference that .exe in another project. The dialog to add references shows .exe, I add the file to my project, I can see the classes from that file but when I run the second executable I get a "cannot load type" error when I try to access the classes contained in the referenced .exe
That behavior seems strange to me since the IDE accept the .exe as a reference and even "intelisenses" its classes.
I do this because I want a standalone version of the form, but I also reuse it in other project. Am I doing it wrong, what's the best practice in my scenario? I'd rather not maintain both a Class Library project and a Windows Form project that includes the same code.
View 1 Replies
Nov 25, 2009
When I do the try/catch method in my vb.net project I will try the code I want and when it can't do it, i make a message box right after the catch method. The thing is that it will show the message box, and then another message from the program itself. Like for example, I have here a MySQLException, and when i click ok on the message box, it will show another one right after showing the exception itself. How would I be able to get rid of this so the user doesn't have to see this, and the program can continue.
View 2 Replies
Jan 19, 2009
My code
Dim pointer As Integer, index As Integer
For pointer = 1 To 6
For index = 0 To 5999
[CODE]...
All i get is an error message saying NullReferenceException was unhandled the bold part is were it says the error is
View 1 Replies
Feb 22, 2009
how to create an error message by message box to tell the user to enter a number only if they key in a character value?
I MEAN AFTER THEY PRESS THE CALCULATE BUTTON
Private Sub btnCalcFat_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnCalcFat.Click
Dim intFat As Integer
intFat = Integer.Parse(txtFat.Text)
lblResultDisplay.Text = txtFat.Text * 9
End Sub
My text box is call txtFat
View 3 Replies
Aug 26, 2009
Is it possible to pass a variable set in one form to another?
View 12 Replies
Mar 3, 2009
I have a .Net 3.0 application that needs to pass an integer to another program on the same machine. I was using a WCF service to do this, but ran into user rights issues when trying HOSTING the service on the local box.
View 4 Replies
Nov 19, 2009
I have a form for end user (EU) to search for a certain code to check if it is an active code or not, i have the search bit working but i want to be able to have a message box saying "the code (code) is an active (product) code!"
So far i have:
Sub UpdateGrid(ByVal sqlStr As String)
Dim var As String
[code].....
View 1 Replies
Nov 2, 2009
creating a class.cs in a win form app? Here is some code I will use many times in my application...
Dim dat As System.DateTime
Dim day As Integer
day = dat.DayOfWeek
[Code].....
And also how to call this class in my forms to invoke this..
View 4 Replies