VS 2005 Place The OpenfileDialog In Public Class Or Module?

Jun 30, 2009

if it is possible to place the openfileDialog in public class or module? i tried to place it with this code, but it did not work.

Public Sub DisplayDataOnGrid(ByVal gridTable As DataGridView)
Dim filepath As String
Dim OpenExcelFile As New OpenFileDialog()

[Code]....

View 2 Replies


ADVERTISEMENT

Asp.net - Access A Module Or A Public Class With Public Shared Members From Inline Vb Code <% .. %>?

Feb 10, 2011

I can access a module from code behind but not from the aspx page in inline VB code <% ... %>.

View 2 Replies

Create Two Notepad Files: Module HelloWorld & Public Class Person?

Oct 6, 2009

i am working on the MSDN tutorials through virtual labs and am encountering a problem with the very first tutorial regarding consoles. I am required to create two notepad files: Module HelloWorld & Public Class Person which I have done without errors having triple checked them. When the files are created I compile the HelloWorld.vb file and a .exe is created

I follow the rest of the steps and encounter an error when i try to compile the Person.vb file using the line vbc Person.vb/t:library/out:HelloWorldLib.dll as i am getting the following errors:

vbc : Command line error BC2001 : file 'HelloWorld.vb/t:library/out:HelloWorldLib.dll' could not be found
vbc : Command line error BC2008 : no input sources specified

View 2 Replies

VS 2005 - How To Place Printcode With Button Into Class

Oct 12, 2011

I want to place my printcode into a Class, so I can use thise printcode olso for other forms. Also I need the code into the Button, for call the printcode out of the Class.

'print code
Dim img As Bitmap
Dim WithEvents pd As Printing.PrintDocument
Function CaptureForm1() As Bitmap
Dim g1 As Graphics = Me.CreateGraphics()
[Code] .....

View 3 Replies

VS 2005 Public Class TestClass<T> Where T New()?

Jun 13, 2009

What does the "where T : new()" do? VS 2005 public class TestClass<T> where T new()?

View 1 Replies

VS 2005 Add A Class Or Module To It As Another Resource?

Apr 10, 2009

I have just one form which is my project however there is a lot of different code behind it, can I add a class or module to it as another resource and call a script from there like I would in say

Private Sub button1_Click ... Handles Button1.Click
Call MyScriptToWorkThingsOutAndGetRemoteXMLWebPage
End Sub

View 1 Replies

[2005] Working Of Friend Class With Public Methods?

Feb 27, 2009

I understand how the class modifiers work like public, private, protected, friend and protect friend. They are pretty straight forward. However my question is, if I have a class is marked as friend, what should the properties and methods be marked as? Friend or public? Does it matter? I just want my classes at the lowest exposure level that will let my program work properly and that is friend. If I understand correctly, the public properties of a friend class are available to all members of the assembly. Wouldn't that be the same access level if the properties were all friend properties?The reason that I ask is that using the autocomplete feature to make new properties (type property and hit tab) it creates the new properties with the public attribute.

View 4 Replies

VS 2005 Create Dataset In A Module And Call It In A Class?

Aug 7, 2009

This is my vb6 programme for creating recordset in a module. and call it in class
and form

[Code]...

View 4 Replies

[2005] SyncLock And Multithreading - Public Class Utilities With A Many Shared Functions

Feb 11, 2009

I am trying to get a handle on SyncLock and multithreading, but I am having some trouble wrapping my head around exactly how it should be implemented. I have a Public Class Utilities with a many Shared Functions. I want to make sure that each function can only be executed when there are no other concurrent calls to the same function. So If I have 2 functions, A and B in a Public Class Utilities, what is the syntax so that a function "locks" while it is being executed, preventing any subsequent calls until the "locking" thread has completed?

CODE

Public Class Utilities

Public Shared Function A (ByRef i As Integer) As Integer

[CODE].............................

I know I need to wrap the statements of execution in a SyncLock block, but I am unsure of the scope of the parameter used with SyncLock...is it private to the function, class, etc? Can the same object be used to lock both functions if they are independent?

View 36 Replies

Declare A Public Param For Public Class Form1?

Apr 7, 2011

Imports System
Imports System.Threading
Imports System.ComponentModel[code]....

how to declare "smsport" on class smscomms as public so that it can be access in class form1 or button1_click event.

View 5 Replies

.net - C# Equivalent Of VB Public Module?

Aug 5, 2010

I'm converting a VB.net library to C# and having trouble finding the C# equivalent to a VB.Net Public Module.

In the same VB class is a With block. Any idea what the equivalent might be for that as well.

View 2 Replies

Public Variables Not Available In Module

Jan 17, 2011

I have a variable declared at Public on a form. But when I try to access it in a module I get an error that its not declared.

[code]...

View 15 Replies

Update Function Of Each Module To Be Public

Nov 2, 2009

I have a situation where I have several VB.NET Modules in the same Logical-Module of a large application. I would like the update function of each module to be public, but I would like users to be forced to qualify the function call with the module name.

ModuleName.Update()
instead of
Update()
Is this possible?

View 2 Replies

Working With Form1 From A Public Module?

Jan 19, 2011

I have a public module from which I want to use Form1 components. How do I do that? For example:

Module Print_to_textbox1()

what goes here for me to display a message into a textbox1 on Form1?

End Module

View 2 Replies

Call Public Function In Module From WebPage?

Jul 20, 2009

Im new in this forum. I just recently upgraded my Visual Studio 2003 to Visual Studio 2008.I have a web project which is working very well in Visual Studio 2003. But when Im trying to run the same project in Visual Studio 2008, Im getting a runtime error message.The error message is about a public function which is defined in a public module. When Im trying to call that function from different web pages of my project, the web pages are not recognising the public functions and asking me to

View 3 Replies

Public Module Updating Form Object?

Dec 1, 2009

I'm working on a project for my VB class at school. I am creating a form with several inputs and it calculates the total amount owed for a car sale. I have a text box for input of the TRADE IN VALUE of a car. the program is looking for a numeric input. If there is no trade in, how can i get this box to default to 0.00 so it doesnt error the program?

View 2 Replies

VS 2008 Using Public Readonly Variable In A Module

Nov 29, 2009

I have a public readonly variable in a module, but when I try to set it in my form load event for the first time I get 'ReadOnly' variable cannot be the target of an assignment. It is my understanding that a ReadOnly variable can only be set once and after that you would get an error when setting it.

View 2 Replies

Write A Public Module For Display Record SQL?

Apr 16, 2012

I wrote a public modules for Insert, Update, Delete for SQL but I want to write public module for show any record on For example

"Listview or ComboBox or DataGrideView" by one module I mean When I create a new Form in vb I don't want to write All Command for each form to show record

Public Sub ShowRecord(ByVal TabelName As String, ?)
If SqlCon.State = ConnectionState.Open Then SqlCon.Close()
Try

[code]....

How to Fill this Space marked by question Mark?

View 1 Replies

Add BindingNavigator At Run Time To Which Made A Public Method In Module.vb?

Mar 27, 2010

i want to add BindingNavigator at run time to which i made a public method in module.vb, and want to run buttons withEvnets on it

View 1 Replies

IDE :: How To Calling Form Object Public Function From A Module

Apr 5, 2010

I am using VB2008 In the Form1, i have coded

Public Function getText(ByRef ctlName As String) As String

getText = Mfg.get_TextMatrix(Mfg.Row,Mfg.Col

[Code]...

View 5 Replies

Public Properties Within VB Module - Cross-client Behavior

Oct 15, 2010

Can one client call a public property within a VB.NET module and see the value of that public property changed by another client accessing it at the same time?

[Code].....

I'm running into random instances where it looks like another client might be modifying (by setting) the value of GetSetDateTime DURING the first client's run through of WhateverMethod(). This is alarming to me and I've been trying to figure out if that's a possibility.

View 2 Replies

Public Sub Label Changes On A Form Don't Work When Called From A Module?

Dec 15, 2009

I am writing a control application for an inteface card. The complicated work of initialising communication with the card is written and working fine. However, my problem is to update the text in a dialog label on the communication interface form from a module that contains all the coding for accessing the inteface card. From the module, the interface dll returns data that describes some typical connection errors and the module then calls on Public Subs in the form to display error messages; for example:This is the Public Sub in the Module that initiates communication with the interface card:

Public Sub OpenDeviceInterface()
DeviceID = 1 - My.Resources.DeviceID
h = OpenDevice(DeviceID)
Select Case h
Case 0, 1, 2, 3

[code]....

What happens when these Public subs are called from the module is that the MSgBoxes I made to test the routine show up but the label text doesn't appear.I've tried; Refresh, on the label and the form without success...

View 4 Replies

Database Stuff In Each Form Separately - Place It In A Global Module - Dataset Is Being Duplicated ?

Apr 19, 2011

I have finally got my code all working, but there is just a quick query really. At the moment I have all the database stuff in each form seperatly. When I place it in a global module, it looks like the dataset is being duplicated I was wondering why this happens when I place it in a global module?

This the code I use and the code I would put in a global module

Dim con As New OleDb.OleDbConnection
Dim dbProvider As String
Dim dbSource As String

[CODE]...

View 1 Replies

Unable To Use An Instance Of The Nested Class Through A Public Variable Of The Parent Class?

Jun 7, 2012

I want to created a nested class that can only be visible to and instantiated from the parent class.But I also want to be able to use an instance of the nested class through a public variable of the parent class.I tried making the nested class private, or making the nested class' constructor private, but it won't compile.Is it possible to do this in .NET?

[Code]...

View 3 Replies

Can't Make Difference Between Public Class And Private Class And Friend And Protected Friend Class

May 15, 2009

I can't make difference between public class and private class and friend and protected friend class.

View 1 Replies

BGW In One Class And The Long Process For The BGW (DoWork) In Another Class Or Module?

Nov 16, 2009

I' ve got a short question concerning BackgroundWorker.Is it possible to have the main code for the BGW in one class and the long process for the BGW (DoWork) in another class or module?

I couldn't find anything helpful on the internet.Here is my code - DoWork in a separate class doesn't work:

[Code]...

View 15 Replies

Declare An Internal Class Within A Public Class?

Nov 17, 2008

how to declare an internal class within a public class using vb.net?

View 2 Replies

Private And Public Class At Class Library

Mar 12, 2011

I'm posting this there is a relationship with my previous post [URL]

I have two projects, namely:

1. Project1 (Windows Application)

2. Project2 (Class Library)

in Project2 there are several classes:

* frmLogin.vb
* frmCustomer.vb
* clsGlobals.vb

in my case, I want to frmLogin.vb and frmCustomer.vb not called in Project1 and I can only call is clsGlobals.vb

View 8 Replies

VS 2010 Converting Public Class To Class With Get And Set?

Nov 30, 2011

I need to convert the following code, so that it exists as a created class "Payroll" that utilizes "Get" and "Set" elements. Unfortunately, I'm completely lost.

Public Class frmPayroll
Private Sub frmPayroll_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load

[code].....

View 2 Replies

Add A Class And Get The Driver Module To Read From The Class?

Nov 13, 2009

What is a driver module, and how would I add a class and get the driver module to read from the class.

View 2 Replies







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