Forms :: Adding Preset Option To Functions / Methods

Jul 20, 2009

I'm trying to create classes, functions, etc that present a preset list of options to users (in the same way that messagebox control will show the available button options). A simple example is readFile(ByVal strPath as string, ByVal strFileType as string) where the user will see a list of acceptable file types when they put the comma after strPath.

View 2 Replies


ADVERTISEMENT

Way To View Preset Functions Like Int Function

Nov 16, 2009

Is there a way to view preset functions like the Int() function.

View 6 Replies

Forms :: Windows Forms App Copy A File To A Preset Folder?

Jan 9, 2012

a program and i need to have a button put a file into a folder, i know how the button works i already have it doing some other stuff. i just don't know the code to copy and past it to a folder.

View 1 Replies

Mvc - Repository Pattern Implements Methods By Adding Add1 But Should Use Methods Of The Baseclass?

Aug 29, 2011

This is the original code in c#

public class CategoryRepository: RepositoryBase<Category>, ICategoryRepository
{
public CategoryRepository(IDatabaseFactory databaseFactory)
: base(databaseFactory)

[Code]...

Does anyone has an idea what i should change to let it work and let my UserRepository use the methods in RepositoryBase while implementing the IUserRepository?

View 1 Replies

Preset A Command And Have The Command Called On Different Option Clicks?

May 18, 2009

i have seen this in many codes, just not sure where to start and how to call the command. what i'm talking about is having code as such (this is for save file dialog):

[Code]...

View 3 Replies

VS 2008 - Annotating Functions / Sub Routines / Methods And Properties

Mar 25, 2010

Is there a way to annotate functions, subs, properties, and methods so that tool tips will pop-up in the IDE as they're being defined or selected?

View 2 Replies

VS 2008 Option Strict Requres All Functions?

Apr 23, 2010

I know this is a very basic question, but when you declare a function As a data type, I'm assuming that it's based on the return value...

What if you're not returning a value? Does it matter? What should I declare it as?

View 4 Replies

What Are Classes , Objects , A Namespace , Subroutines,functions,methods,properties And Difference Between Byval And Byref

Jun 26, 2010

I want to know what are classes , objects , a namespace , subroutines,functions,methods,properties and differemce betweem byval and byref in your words.

View 18 Replies

Passing Data Between Forms Without Any Public Methods Or Properties On The Forms

Dec 28, 2009

Passing data between forms without any public methods or properties on the forms. everything but the "Controller" class, which I would like you furnish. I just changed the title from "Intermediate" to "Beginner" This solution is an example of the Observer Pattern. The "Controller" class is the "observed" class, which in this case means it publishes events.

' File Definitions.vb

Public Delegate Sub MessageDelegate(ByVal sender As Object, ByVal e As MessageEventArgs)

Public Class MessageEventArgs : Inherits EventArgs
Public Message As String

[CODE]...

The program should initially display Form1, and Form2. Clicking of the button on either form will modify the Title Text of both forms. I think that you will find the final end result to be pretty neat, as it works with any number of open forms not just two. I think asking for the Controller class is easier than asking for the code in the forms. My solution for Controller class has 7 lines of content, 9 lines if you include Class, EndClass. A minimal solution could achieved with only 4 lines of content, but it would a textbook example of bad programming.

View 12 Replies

VB Class Methods Generate "out Of Memory Exception", While Same Code As A Form.exe Running The Functions Does Not

Jun 2, 2009

I created a class library containing some properties and methods, when I call a specific method that runs a sequence of tests, it reports "out of memory exception". When I take the same code and build a form.exe, I do not get the "out of memory exception".

View 6 Replies

VS 2010 Adding Functions To An ArrayList?

Jul 15, 2011

I'm wondering if this is possible, I want to be able to call functions from within the program itself by means of an ArrayList? I want to be able to do something such as:

FunctionsList.Add(SomeFunction)
FunctionsList.Add(SomeSub)
For Each Function in FunctionsList
Call Function
Next

Would this be possible? It's important for a project I am working on.

View 11 Replies

Combining Adding And Viewing Form Functions

Sep 29, 2010

Im banging my head against the wall with this one...If anyone can give me some pointers on how to combine the following two code snippets,[code]

View 5 Replies

Difference Between The Following Methods Of Showing Forms?

Jul 26, 2011

What is the difference between the following two statements (in terms of memory management):

Dim frm as New MyForm()
frm.Show()
VS
MyForm.Show()

I am originally a C# developer, how does the second one make sense or even compile for that matter in VB.NET? (Show() is not a Shared/Static method) What is happening in the second case?

View 1 Replies

VS 2008 : Have A Class Where The Functions Of The Same Name Are Both Instance Functions And Shared Functions?

Dec 6, 2010

What I am trying to do is have a class where the functions of the same name are both instance functions and shared functions.

Public Shared Function Get...(byval xx as xx)

and

Public Function Get...

The Public Function uses a Property xx created in the constructor, whereas the Shared Function has the parameters (byval xx as xx).

View 1 Replies

Adding Call Functions For Defragment Hard Drive And Other .msc Tools For Windows?

Jun 2, 2011

My problem is that I am creating system tools for windows with a good gui and I don't know how to start with it. One of my difficulties is making code for calling any window tools for example, defragment.msc, backup, system restore, registry editor(I knew there's already a thread in here but it is closed).In short, I will create a "Utility tools ALL IN ONE" for my project somewhat like a registry cleaner or advance system optimizer and the likes.

View 6 Replies

Calling Methods In Forms From Embedded User Control Class?

Jul 21, 2010

control which will need to be reused in several forms in my program. It basically consists of several buttons in a panel. To start with, what I need to do is get the button values from the control into a text box on the first form. But I don't want to have a method calling the textbox directly from within the control, because then it won't be reusable in my other forms. Is there something I can do in VB like parentform.textbox.append for example, where you can generically call the methods of the form in which the control appears?

View 2 Replies

Forms :: Avoiding Clashing Functions?

Jul 26, 2010

This particular function is used to save the returned results for a ping sent across the internet. Unfortunately the code won't let me Use the streamwriter method or the fileopen method, because it says:"The process cannot access the file 'C:UsersChrisDocumentsPinging DataFilesave2.txt' because it is being used by another process."

Private Sub SaveToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles SaveToolStripMenuItem.Click
FileOpen(1, "C:UsersChrisDocumentsPinging Datacount.txt", OpenMode.Input, OpenAccess.Read)

[code].....

View 1 Replies

Forms :: Listbox - Multi Select Option?

Dec 15, 2011

I had set the multiselect option to true for listbox.Let me know how to move the list items up and down with this option.

View 2 Replies

VS 2008 Adding A Method To All Forms Existing Forms Without Changing Their Code?

Jul 28, 2009

just wondering if it is possible to add a method to all forms in my project without having to do it on one form and Inherit all my other forms from that one

View 3 Replies

Calling Functions From One Class To Another And Using Multiple Forms?

Nov 21, 2009

The project requires a form that has textboxes for a students name and the amount of books they have read, and a label where the points they have earned for their reading is displayed. Also a seperate form with About information and yet another seperate form for summary information.

View 1 Replies

Forms :: Functions Work Only If Form Is Run Directly (non-MDI)?

Dec 14, 2010

I have this weird issue:I developed an application with a sequence like this login form -> mainform (=mdi parent) --> some functionform (mdi-child)--> report form

The reportform contains a reportviewer and will display different dataset queries depending on the state of some radio buttons which are located on the previous form ('some function form'). When I run the project directly from the 'some function form' (set startup form for project) things work great. The report shows the correct data depending on choices made on the previous form.But....when I run the project all the way from login and mainform it doesn't work. Seems like the choices made on the "some function form' are not coming through to the report form.

View 5 Replies

Forms :: Disabling Close Window Option In Windows 7?

Apr 13, 2011

I have an application developed in VB.net with 3.5 framework. I have disabled close (X) button on the main form of the application while doing some processing. I have achieve disabling by "Overriding ReadOnly Property CreateParams()" of the form. This is working fine as both control button on form and close option on right click in the taskbar shows disabled. This fulfill my needs on the Windows XP OS but not on Windows 7 OS. As in Windows 7 right click on application icon in taskbar shows a different menu, which has a new "Close window" option.

The close in original menu still shows disabled (this old menu is hidden but can be shown by holding Shift key and right click on the application icon in taskbar). Now I need to disable this "Close window" option as well and only for my application.Is there a method through which I can do this programmatically.

View 3 Replies

Forms :: SELECT Dropdown Has No OPTION Tags (WebBrowser Control)?

Aug 27, 2010

I created a Windows Form application that used a Webrowser control to automate the process of entering data into a website. One of the tasks included selecting a server name from a dropdown menu (SELECT tag). I was able to get a collection of all of the OPTION tags and use HTMLElement.SetAttribute("selectedIndex","indexVal ue") to select the server I needed.The website recently went through a redesign and now there are no OPTION tags. It appears that the values for the SELECT tags are added by JavaScript dynamically. I have tried using HTMLElement.SetAttribute("selectedIndex","indexVal ue") directly, but I am unable to select what I need.

View 3 Replies

VS 2008 - MDI Child Forms Sets To Sizeable (Cascade Option)

Nov 6, 2009

I have an MDI application where the child forms are set to sizeable, but when I hit the cascade option the forms are resized. Other than setting the forms to a fixed size is there any way round this?

View 2 Replies

Forms :: Random Functions - When Start Program And Click Picturebox - Same Card Will Always Come Visible

Mar 30, 2011

Okay, so I'm doing a card game and I'm trying to set that when picturebox (PictureBox1) is clicked, a random card from 13 cards will come visible. Problem is, that when i start the program and click the picturebox, the same card will always come visible. As you can see i've put a button (Button1) which will hide every card. If I press Button2, then Button1 and then the PictureBox1 it will show differend card, but the cards which come visible are always the same.

e.g i press PictureBox1 (which will make card visible), then Button1 (which will make PictureBox1 non-enabled) and then Button2 (which will hide every card and make PictureBox1 pressable). Lets say i pressed the PictureBox1 four times and i got cards: 9, 6, 7, 3, then I close the program, start it again and press PictureBox1 again 4 times and it will show the same cards (9, 6, 7, 3). How can this be done that it will not show the same cards always?

Here's my code...
Public Class Form1

Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click
End

[CODE]....

View 3 Replies

Converting Letters To A Preset Value (integers)?

Nov 7, 2011

Okay, so I have to convert letters to numbers, each letter in the alphabet is assigned a value that I've assigned. But I need to run through a textbox letter by letter, and convert that letter to the numbers that I have, and append. So if I had a textbox with "JANE", it would output 942383312318265498643 assuming that the following letter values were true

A - 833123
B - 2277765
C - 33935654

[code].....

View 2 Replies

Registry Tweaking And Add Some Preset Values?

Sep 1, 2011

i want to make a program that will 'clean' up a computer, so far i can make it delete temp files, clear history, empty the recycle bin, even startup windows disk defrag... basic stuff like that Now i want it to go into windows registry and add some preset values, for example: HKEY_CURRENT_USER // Control Panel // Desktop // MenuShowDelay is by default 400, but i want to set it to 200 or something...i would also need the program to figure out which OS the computer is running (xp/vista/7) and only use the appropriate key and value,

View 1 Replies

VS 2008 Preset Messages For Emails?

Jun 21, 2010

Previously I asked about sending emails. And now, I have a related question.How to use a preset message in the email ?

Dim strMessage As String = "Hi [USERNAME]..! You have not paid your due amount of Rs. [DUEAMOUNT]. The last date for payment is [LASTDATE]. I want it to be in such a way that, when a button is clicked, all users with pending amount will be selected (from db) and the above preset message is formatted with each user's USERNAME, DUEAMOUNT & LASTDATE, and finally added it to another table in my db.

Presently my idea is to use a SELECT query for getting all the pending users and then loop through each user (record) and add the preset message to a separate table (this table contains all drafted messages which will be then sent to the recipients), by replacing the USERNAME, DUEAMOUNT & LASTDATE using the Replace function.

View 4 Replies

Cant See Available Methods List When Write Object.METHODS?

Jun 24, 2011

I am working with a vb program, but there is something strange on one of my .vb code pagewhen i put the "dot" afther the object name its dont show the methods availables for this objectbut on other vb code pages i can see it. but in this one no.for exmaplethis is a piece of code: Dim sb As New StringBuilder()

View 3 Replies

Making Class Methods Instead Of Instance Methods In .NET?

Mar 29, 2010

I am not sure how clear my question is by the title, but I am trying to make Class methods instead of Instance methods in Visual Basic that way I don't have to waste memory and code creating temporary objects to execute methods that don't need instance variables.

I am not sure if you can do that in VB but I know you can in Objective-C by using either a "+" or "-" sign in front of the method declaration. And in C++ (at least I think, I can't remember) you put the static keyword or const keyword in front of the function.How would I do this in VB if it is possible? Or should I just make a separate set of functions that are not members of a class?

View 2 Replies







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