Make A Separate File?
Jan 15, 2012After creating a project in vb.net how to make a separate file so that by clicking on the file the project should directly execute
View 4 RepliesAfter creating a project in vb.net how to make a separate file so that by clicking on the file the project should directly execute
View 4 RepliesI've made an interface called ApprovalEvent in a separate file with the namespace myproject... I've also made a class called PurchaseOrder... it's also in the same namespace, just in a separate file. Whenever I try to make PurchaseOrder implement ApprovalEvent it always says that ApprovalEvent is undefined...
How can I make the class recognize that the interface exists but is in a different file?[code]...
i would like to have a shared function in a separate class file to address the form location . but i dont know how can i get this to work. if i use this below code in my form its working . but i cannot move this to a class file.
Shared Sub Formlocation()
Me.StartPosition = FormStartPosition.Manual
Me.Location = Screen.GetWorkingArea(Me).Location
End Sub
Isn't it time to make a separate section for Visual Basic 10 users? For example when looking for the MID string function there are a lot of complaints that it is not implemented in VB, whereas in VB 10 it is.Perhaps a good idea to filter out the VB6 items in a VB10 section?
View 14 RepliesI have a textbox and I only want people to be able to type in the word "ALL" and the numbers 1-6. How do I go about that? I got the number part but do I have to make a separate line for each letter in the alphabet that isn't "A" or "L"?
Private Sub monthTextBox_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles monthTextBox.KeyPress
'If (e.KeyChar <= "1" OrElse e.KeyChar <= "6") Then _
'AndAlso e.KeyChar = "ALL" Then
'e.Handled = True
[Code] .....
This is in regards to the toolstrip spiltbutton control.
When I click the arrow on the right, not only does the drop down menu show, but the code in the button's click event executes also. How do I make the drop down arrow separate from the button itself?
I want to create a login system. I want the username and the password to be in the same .txt file so the name is settings.txt and in side i have my username and password?All i know is how to make two seprate txt files and have a username in one and password in the other. I want it to read
Mike (Username)
Blue (Password) But in the same txt file.
I created a telephone number form where the user enters the telephone number in a text box as (nnn) nnn-nnnn. The first 3 digits in parenthesis are the ISD code, the next three are the area code and the last four are the local number. I need to separate out these three fields of the phone number and display in three separate text boxes labeled appropriately. Now, suppose the user enters the phone number in a text box as a continuous string of 10 digits, where the first three represent the ISD code, the next three represent the area code and the last four represent the local number. I'm lost as how to change this string into the form (nnn) nnn-nnnn. This is what I have
[code]...
Anyways, i have coded a video downloaded and i want to include a converter as a separate exe file. But obviously people may have different file directories so a simple piece of code i have used won't work. This is what i have: Also where would i place the exe file?
View 3 RepliesI have a TabControl object on my form with many tabs created in code (TabPages) and my problem is that the same objects that are in the initial TabPage needs to be in the other TabPages created in code, I have this done in code when the user clicks the 'New Tab' menu option, however the same code is used for any new tabs created. The problem created here is that I have an event against one of the objects that appear in the other TabPages, but because the same code is used to create any new tab pages, the event will only work on the newest tab page, if that makes sense? By the way these objects that appear on the other TabPages are properties at the top so events can be handled against them in the respective subroutine.
[Code]...
I'll get straight to my problem - I'm currently coding in Visual Studio.I have a table (countries) with the columns ID | Name. The table is filled with around 28 records.I also have a form with 4 combo boxes (set up as 1,2,3 & 4) that I want the user to select. These combo boxes will display the names from the table countries. I then want to use the selected names in the combo boxes to Insert into their corresponding ID into another table. For example England would have the ID 1, USA the ID 2 etc.So, is it possible to have separate combo boxes that will give separate ID values but using the same table? At the moment I can't seem to find a solution.Eventually the form will have more than 4 combo boxes so I don't want to use separate bindingsources for each combo box.
View 5 Repliesi just got it in the internet and edited it..
Dim xlApp As Microsoft.Office.Interop.Excel.Application
Dim xlWorkBook As Microsoft.Office.Interop.Excel.Workbook
Dim xlWorkSheet As Microsoft.Office.Interop.Excel.Worksheet[code]....
what I want to do is have a column name in the excel worksheet which is not included in the code..i'm getting the data from a datagridview but it only shows the data in the excel.. i also want the field name of these data to be shown..another, as you can see in the code given, the directory is fixed.. what do i have to do to choose a directory to save my work? and also, i have many gridviews and whenever i'm exporting my work to the excel worksheet, it always overwrites my work.. i want to choose the directory to save, also show the field names, and make a separate worksheet for every gridview..
I am playing around with VB 2010, and I want to create a separate file with different procedures etc so that I can call a proceedure etc from this file I have a simple form with a single label on it, and a seperate file called filelib.vb.In the filelib.vb is a proceedure called LogicalDriveTypes
Public Function QueryLogicalDriversNames() As String()
Try
Dim Totalstring As String
Dim ds As Int32
[code]....
In my form1_load I have Label1.Text = filelib.LogicalDriveTypes and I get "reference to a non-shared memner requires object reference. How where / what do I do to access the proceedures / functions in this other file any time I need to from this form ?
How can I move the following to a separate class for repeated use ? (the problem is that it uses response object)
' Download/View a given file
Protected
Sub downloadFile(ByVal sFile
As String)
[code]....
I have a listbox in separate class like this [code]
[Code]...
How can I use that list box that I have created in that class on this form or I want to show that listbox on my form?
I need to be able to open a selected file (upon the user selecting it from his/her computer) in different browsers (CHROME, FIREFOX etc) I have downloaded the portable versions and placed and have figured out how to get them to open, but am not sure how to open the file selected in each seperate browser. is it possible to dictate the position and size of each window that opens? Because preferably I would like to be able to divide the screen up with each of the browsers selected.
View 1 RepliesThe code shown below sucessfully saves text onto a line in a txt document, but using the array, I want to be able to save each piece of text on a separate line.
Dim filePath As String
Dim objectWriter As StreamWriter
Dim text(3) As String
[Code].....
I have a text file like this:
name=xyz
user=asdfjklas
etc...
i need to have a string called name with "xyz" in it, and a string called user with "asdfjlas" in it.
I am reading a text file in which has three colums of information i.e.
00100 25690 21586
23510 25694 24856
25896 45478 52897
58745 59687 12364
I want to read the whole file, and split the colums so each set of numbers is put into an array to be used as an input for later. If the text file only contains one line of numbers like 00100 25690 21586, I have written a code to seperate those and put them into an array which is attached. If the text file contains more than one row of numbers I can read the whole file in line by line but I can't get the strings seperated.
[Code]...
When I code in PHP I usually keep my functions in a separate file functions.php, I am going to write a small function in VB, is it ok to keep all my functions and subs in the 1 file linke in PHP? will they be available in all my form code?
View 3 RepliesSo my issue is that I created program that writes a text file in several lines but I am having trouble reading those lines in separate labels on another program. I don't want them in one label but separated with one word to one label.
how can I put a counter on the time a new file is added to the program? I can't seem think of a code for it.
This is my coding so far but I feel like it's not really giving me anything
Public Function ReadFile(ByVal myFile As String)
Dim strContents As String
Dim sr As StreamReader
[Code]....
how do i put line 1 from a text file into richtextbox1 and line 2 from that text file into richtextbox2.
Then if i edit either i can then save and overwrite the original
I have been trying to find out how to do this for days now, so I am finally asking how. I am newish to programming. Here is my problem.
I am trying to extract x,y,z coordinates from a text file arranged as such:
x,y,z
x,y,z
x,y,z
etc.
I need to be able to extract the x column into an array, the y into an array, and the z into an array. I learned how to pull it into a string, and how to split for every line, but i don't know how to split after each comma and separate them.
I have a few forms that have a lot of really intensive updating along with a great deal of user interface (text boxes, button clicking etc) Is it possible to open a separate form as a separate UI thread from the start up form that called it to "show" or open or whatever the new method might be?
View 6 RepliesHow do you create a separate file that records and adds the favorites to so you dont lose them ect
View 4 RepliesI have developed a windows forms desktop application using vb.net 2005. It is installed on client computers using a setup package.
One of the clients wants to redistribute the setup package to other users.
He wants to provide the users with an initialization file containing the database server name which they will be using, so that it is available when the application is installed. They are apparently incapable of physically typing in a server name themselves after installing the application.
Is there any way I can include a separate file with the setup package which the application can find after it has been installed?
How can i make a program that will read a text file (.txt) and save each seperate line as a variable? e.g.
Text File:
Hello
My
[code].....
I'm working with Windows 7 and my application is having some troubles with the SetWindowsHookEx API - everything works fine but when my application is not responsive (gets into a loop) the hook automatically stops (LowLevelHookTimeOut) thats because my application haven't processed the hook messages in time (In this case, mouse movements).When I install the hook a method called "MouseProc" gets the hook messages (mouse movements and clicks) the problem is that this method ("MouseProc") is on the same thread of my app UI - is there is any way to make the "MouseProc" method be on a separate thread? I have attached the class.When the user declares this class as new the hook is automaticlly installed, here is an example:
Dim WithEvents MHook As MouseHook
Private Sub Form_Load(Some Args)
MHook = New MouseHook()
'Mouse hook installed
[code].....
But it's not really working.
Can we write all the control events in a seperate class file in different layer rather than in code-behind of web-page ?
View 1 RepliesI have a textbox and I only want people to be able to type in the word "ALL" and the numbers 1-6.How do I go about that?I got the number part but do I have to make a separate line for each letter in the alphabet that isn't "A" or "L"?
Private Sub monthTextBox_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles monthTextBox.KeyPress
'If (e.KeyChar <= "1" OrElse e.KeyChar <= "6") Then _
'AndAlso e.KeyChar = "ALL" Then[code]....