How To Reference The Htm File From The Form

Feb 8, 2012

Just a quick one, ive probablly over looked something but neways,Ive got a Class Project, which containts a form,class file and a htm file but i cant seem to figure out how to reference the htm file from the form?

View 1 Replies


ADVERTISEMENT

Reference To Test.dll But An Error Messege Was Appear A Reference To Test.dll File Could Not Be Added?

May 25, 2009

[code]...

and from VB6 project I reference to Test.dll but an error messege was appear A reference to Test.dll file could not be added (If I create VB NET project and reference to file Test.dll it OK )

View 10 Replies

VS 2010 Can't Seem To Get A Reference To Main Form From Sub Form

Jan 28, 2012

My app has a main form (it's the startup form). It includes a number of menu items which typically open modal sub forms. However there are 2 menu items which just need to open an Outlook Explorer calendar for the user to manipulate appointments. My VB6 version used hidden sub forms to do this and handle the subsequent interaction between the user and the Outlook objects in the Calendar. I need to stop the user interacting with the main form while the Outlook Explorer is open, ie as if the Explorer window were a modal sub-form to the main form. So I manually disable the main form while the Outlook activity is going on, then (try to) enable it when the user closes the Outlook Explorer window. Problem is I can't seem to get a reference to the main form from the sub form to do this, nor pick up an event in the main form which I could use to trigger the enabling of the main form.An alternative might be to delete the hidden sub forms & put all the code in the main form, but this would be quite ugly; I think I would need to maintain two parallel sets of Outlook objects at the top level in the main form for each of the two functions (a number of the Outlook objects are declared With Events). I would have to have for example mobjOutlookExplorerFunction1 and mobjOutlookExplorerFunction2.

View 5 Replies

Best Way To Reference Main Form?

Dec 14, 2010

I am working on an application that is a form, at runtime it connects to a server and downloads an xml file, this xml file is used to build the actual UI which consists of various panels that are populated with textboxes, buttons, etc. On each panel there is a custom button that when clicked fires an event inside the actual custom button class that runs a sub on the form to hide all the panels and then show the panel who's name is held in an extra property(hence the custom button).

What I would like to know is what is the best way to give the button a reference to the form to run the showPanel sub. Is it best to give it the name of the form, or in the constructor for the button give it a reference to the form using byRef or byVal, or use the sender in the button click event as:
Private Sub newButton_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Click
sender.TopLevelControl.showPanel(m_showPanel)
End Sub

View 3 Replies

Reference A Form From A Variable?

Nov 24, 2009

I am upgrading a very large project from VB6 to VS2008. I have several forms with dozens of combo boxes on each form. I use the same combo box names for each form and want to fill them from a module with different items depending upon the calling form. In VB6, I dimensioned a public variable - FormName as object and called Set FormName = frmMyForm1 on Form Load. In a module, I was able to write the following code:

With FormName
.combobox1.additem("item")
.combobox2.additem("item"
End With

I cannot make this work in VB.Net. When the form loads I call FormName = Me. If I dimension Friend FormName as Object, I get the error message that Public member combobox1 on type MyForm1 not found. If you are attempting to access members on a late-bound object make sure it is declared public". If I dimension Friend FormName as Form, I get an error that says "combobox1 is not a member of System.Windows.Forms.Form".

I have tried both CType and DirectCast to convert the form variable from Object to Form with no success. I also tried creating a public array and storing each form name in it.

View 4 Replies

Reference A Particular Instance Of The Form?

Apr 1, 2012

I am currently trying to reference a new form that has been created, but I am unsure how I reference a particular instance of the form.

The form that has been created can have up to 4 different instances. Each one is created from the menu. The code that is executed is identical, with a parameter passed 1,2,3,or 4 The form is created with

Dim newScreenDisplay As New ScreenDisplay

and has all the usual text boxes and buttons etc. on it.The display is then kept up to date by refreshing it from variables. This task is performed by a background thread.What I can't work out is how to reference the specific instance of the form that I created as they all have the same name (newScreenDisplay).

View 1 Replies

Reference An Instance Of A Form?

Apr 26, 2010

I'm showing a form like this[code]...

Then I am trying to update a progressbar on that form from a public sub in a module, but I don't know how to reference it. I can't use "Me" because I'm not doing the updating in the forms code

View 4 Replies

File And Reference That File And Functions Within Application?

Feb 18, 2010

If I have a function that I've written or variables that I use all throughout my application and I don't have to have to copy and paste the code into each form, how can I put those into a file and reference that file and functions within my application?

View 3 Replies

Call A Form By String Reference?

May 16, 2012

I am trying to open form using a string reference in loop.

Dim XXX As Integer
Dim slideName As String = Nothing
Dim slideNameX As String = Nothing

[code]....

View 4 Replies

Forms :: Reference Form Using Variable

Aug 18, 2010

I have an application consisting of 2 forms (Form1 and Form2).There is a text box on each form and they are both named Text1.From a sub routine in a module, I want to alter a text box on one of the forms. The sub determines which form to write to and attempts to refer to the form using a variable.But in the example below, gForm never gets declared when it's nested within the If statement.[code]The actual application is not so simple and I need to use this or a similar approach throughout the application in order to reduce code redundancy.To recap, I want to alter a control on a form by replacing the form name with a variable name. [code]

View 4 Replies

How To Pass Reference Data To New Form

Dec 5, 2011

I need to pass a reference of a class instance to a new form; the newform obtains data from the user to be added to the class instance. How might I do this? Is there a way to pass it as a parameter via the ShowDialog call?

View 2 Replies

Pass Reference Object From One Form To Another?

Apr 29, 2011

I have maintain a common data table for 3 forms.[code]...

View 5 Replies

Reference A Form Created From A Template

Jun 10, 2011

I have a VB.NET App that creates forms from a template.I am having problems getting them to communicate with each other.Is it possible to send data from one textbox in the first instance to the same textbox in another instance.[code]Lets say i put the name in the wrong window by mistake - is it possible to send that text to the correct form.Issue is all forms seem to be called FormNameWindow - and i can't reference them by potential form name.

View 3 Replies

Reference A Form Created From A Template?

Mar 17, 2010

I have a VB.NET App that creates forms from a template.I am having problems getting them to communicate with each other.Is it possible to send data from one textbox in the first instance to the same textbox in another instance.EG

Names By Letter.
Dim NewNameWindow As New FormNameWindow()
NewNameWindow .Text = "Starts With *"
NewNameWindow .Show()

Where * would be the letter you click on.Lets say i put the name in the wrong window by mistake - is it possible to send that text to the correct form.

View 14 Replies

Reference An Array When A Form Opens?

Mar 16, 2010

I am trying to reference an Array when a form opens. When the code below runs I get a "Type Mismatch" error.

Dim strText0 As String
strText0 = Form_frmRVNumber.Text0.Value
Dim strRVNum() As String

[Code]....

View 3 Replies

Reference The Errorprovider On Another Form From A Module?

Aug 27, 2010

How can I reference the errorprovider on another form from a module.

Sample Code:

Sub
leaveOptionalTBTextValidation(ByRef TBControl
As custTextBoxControl,
ByRef intMaxChars

[Code].....

View 5 Replies

VS 2010 - Reference DataGridView From Another Form?

Aug 29, 2011

I wrote a routine using a DatagridView that I dragged/dropped from the toolbar--populate it with data and it works great! Now, I need to reference the datagridview from another form. So, I (hopefully, naively, after the fact) declare a Public dgv in a module with the same name as the dgv in the form I'm trying to reference--in the form itself, dgv.rows.count = some number, but when I reference it outside the form I get errors. Obviously my public declaration is not working as hoped--the dgv was working within its form without the declaration so SOMEWHERE it is declared and is not public, but since I dragged/dropped it (i.e. did not instantiate in code).

View 9 Replies

Winforms - Find And Reference A Certain Form?

Jan 27, 2012

I am currently making an application to aid me in testing another separate application (both are made in VB.NET). I want my tester app to be able to enter info in a form on my other application. Since I have familiarity with both applications, I know the name and everything about the form I want to do things with on my testee app. My problem, is that I need a way to use this information of the testee form to get a handle or something that I can actually reference that form with in code for my tester app.

How can I go about getting this form? my only experience with something similar was getting the handle of a main window of a process, but that was a bit easier by doing this:

Dim iTunesID as intptr
for each process as process in process.getprocesses
if proc.mainwindowtitle = "iTunes" then iTunesID = proc.MainwindowHandle
next

However even that I am not really happy with because it needs to iterate through every process. and even from this, I am not really sure how to reference my specific window, since it isn't the main window in this case. I have tried searching for how to do this, but my search is a bit too vague I think as I just don't know what methods are available to use to do this or assist in doing it.

my first thought was something similar to above but with something like "for each form as forms.form in 'forms.formsrunning'" kind of thing, but I don't even know a command to get forms running, and though I guess I could probably find one, I am hoping for a better solution than iterating through all processes/forms.

View 2 Replies

An Object Reference Error - Control The Form

Feb 20, 2009

I am writing this codes on classlibrary to make the changes of the text and I want to control the form as well. I have wrote the last if statement on the bottom of the code that if the form is on the right side, then set the form from righttoleft. I get an object reference which is not set to an instance of an object. Here is the list of the codes that I am writing to make changes of the text on each menu items and control the form. [Code]

View 5 Replies

Assign Events Dynamically With A Form That Has No Reference?

Jun 19, 2012

I've got a class where I pass in a panel reference and in that panel I'm then required to draw multiple other panels that represent my objects. The issue is that when I go to bind dynamically click events to these panels I don't have reference to the Form of which I want to popup on the click event.

The reason for this structure is so that I can redraw my class dynamically and reattach certain events to each object.

Is there any way to do this without moving my classes logic outside of the Assembly or is there any way to attach my click event to a piece of code logic to a sub in my WinForm?

View 1 Replies

Copy A Form Without Getting Duplicate Reference Errors?

Apr 15, 2009

copy a form without getting Duplicate reference errors that you would have to fix.So This is what i did and i felt i should share it now that i figured it out

File > Export Template > Item Template > Select Form To Copy
Then
Solution Explorer > Right Click on project title > Add Item > Select Exported Template > Rename file > Add Item

View 3 Replies

Get The Reference Of A Public Variable Using The String Name In Another Form?

Feb 25, 2011

I have public variables in a module. I need to get the reference of the variable by using the String name of variable in another formell me how to do this?I need something like the following code:

Dim Var1 As string
Dim sVariableName As String = "Var1"
GetReference(sVariableName).SetValue = "testing"

[code].....

View 2 Replies

How To Reference A C++ Library In Asp.net Form Application Writen

Jan 8, 2011

Im trying to write a simple c++ dll and then reference it in my vb form app however im having a hell of a time doing so. but im getting an error when i call the c++ function in vb.net

here is the c++ code
#include <WINDOWS.H>
LPCSTR DisplayStringByVal(LPCSTR pszString)

[code]....

View 2 Replies

How To Reference Form From Class That Was Created In New Thread

Feb 14, 2006

I have an app (vb.net) that sues multi threading and have tow problems.

1. The program is used for trading currency markets and mointers prices all day. When a signal is generated it wil place a trade in a new thread. In the new thread it checks to see if a trade is on already and if so it will not place another trade.The problem is it can be too fast and place another trade before the server has processed the first trade. So trade count returns 0. As the system watches 6 accounts I can not just pause the other thread to make sure it has finished before trying ot place another trade.How to i check to make sure the first thread is finished so when i check for trade count it retuns 1?

2.The new thread is inside a class and has a logging class as well. The problem is writing to the text box on the main thread. As the logging thread is created in the new thread it has no access to the textbox. I have tried using invoke but it still does not write to text box as it does not exist in the new thread.How do i reference a form from a class that was created in a new thread?

View 3 Replies

Reference A Control On Parent Form From Child?

Oct 7, 2008

Using MDI in .net, how do you reference a control on a parent form from a child? Like, if on the parent I have a textbox called txtBox1, what could I do from the child form to read the contents? I've been googling unsuccessfully all day. The closest I've found is

Parent!ControlName.Property

I don't know what the ! is supposed to mean, but I get an error here: Class 'System.Windows.Forms.Control' cannot be indexed because it has no default property.

View 2 Replies

VS 2008 Reference Form Controls With Variables?

Nov 14, 2009

This code passes a button name ("Button2") and a value (4) to be displayed on it. Can the "UpdateButtonName" procedure be streamlined by replacing the "For Next" and "If Endif" code with something else since the button name is already known? It shouldn't have to check control on the form to see if it is the one I want.

Public Class Form1
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click

[Code].....

View 11 Replies

VS 2010 Form Using DLL - Object Reference Error

May 23, 2012

I have my forum calling a sub from a .DLL/Class Library and I get the "Object reference not set to the instance of an object" but when I had the .DLL as its own form, I did not get this error.

Here is the related code on the Form that calls the DLL:
vb
Imports ExcelImport.ExcelImport
Public Class Form1
Dim accConn As New OleDbConnection("Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:UsersAjDesktopTaxCert_be.accdb")
[Code] .....

View 8 Replies

VS 2010 Turn Off The Filter That Is On The Add Reference Form?

Oct 6, 2010

how to turn off the filter that is on the Add Reference form ? Its on the .Net tab, and then it says "Filtered to: .Net Framework 4 Client Profile". So all my references are not filtered alphabetically. Really annoying.

View 1 Replies

C# - Delegate Event To Form Without Creating Circular Reference

Jun 19, 2012

I have a class that is in an assembly due to being required for other projects that I'm currently working on. One class lets call it Class Factory, creates a group of controls which require click event handlers to be attached, I have algorithms which determine polymorphic behavior based on certain features but that is relatively irrelevant.

Due to the event handler having to open up a specific form that isn't part of my assembly, and that form requiring this "Factory" class. Without creating circular reference is there any way I can essentially "delegate" the handler event for the form to define? As a simple work around I have had to maintain two separate classes, one in the project with the form and one in the assembly.

Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Me.Width = 1500
Dim panel As New Panel
panel.Location = New Point(0, 0)
panel.Size = New Size(1000, 200)
[Code] .....

View 2 Replies

Office Automation :: Object Reference Not Visible In A Different Form?

Jul 24, 2011

The problem with the following code is that the object oWB is visible and initialized in Form2, but when I show SaveDialog1, the object gives a NullReferenceException. I already know, because I checked in the debugger, that oWB has a valid reference when I leave Form2 and also when I come back from Form2. So I am sure the problem is that the reference simply is not visible in SaveDialog1 for some reason. So please don't tell me that the initialization of oWB returned a Nothing reference because I know it did not.

I get a NullReferenceException on the following line:

Form2.oWB.Save()

I researched this for a whole day and came up with a Microsoft article that explains that it is necessary to run each form of a .NET COM application on its own thread. It gave some code to accomplish this. I incorporated this code into my program. But I still have the NullReferenceException.

Simplified version of Code with most processing deleted below:

Public Class Form2
'Define Microsoft Excel Objects
Dim oXL As Excel.Application

[Code].....

View 14 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved