VS 2010 Class Open On Error Return Focus To BtnOpenFile?
Mar 18, 2012
Why can't I get error msg and return focus to btnOpenFile when no file has been selected. If file is selected all is good. I think I need some error cheching here..right?Class Open (open File dialog)
Public Class Open
'set up class open file to be reusable
Public Sub OpenFile(ByVal OpenDB As System.Windows.Forms.OpenFileDialog)
OpenDB.Title = "Please Select a File."
[code].....
View 1 Replies
ADVERTISEMENT
Dec 28, 2010
I'm making a Visual Basic GUI application to display whether a number of my ports are open for people to know whether things like my website and my Minecraft server are open.My problem is I have absolutely no idea how to do this in Visual Basic.Basically, I'm asking for something which sends a signal to an IP with a specific port, if it is open then return true, if it's closed, return false. Similar to: http:[url]....
View 1 Replies
Mar 12, 2010
I'm making a class that reads a file and processes data in it, but I need some error handling. I'm giving it a constructor that takes a file location and processes that file. How can I make it so the constructor tells the program whether it found the file or not? Optimistically the program that calls this class would check for that first, but since I'm not going to be the only one that uses this class I'd like to know how to secure such a thing. It's probably bad practice to do this within the class, but I'd like to be sure it's as portable as possible.
View 6 Replies
Oct 25, 2011
After I did a sendkeys to another program from my form, i wanted to return focus to the form. i tried me.focus = true but that doesn't work.
View 1 Replies
Jun 19, 2012
I have question about returning an object from a class. example of my codeclass ADDBUTTON:
Dim test As New Button
test.name ="NAME" (radom generated)
start.controls.add(test)
[code].....
View 2 Replies
May 31, 2011
I am developing client-Server Application, when Server send a command i want to open the form1 and close the form2, Client side has two forms and one class.when i recive the message from server,this code(written in class) execute but it cannot do anything.
[Code]....
View 5 Replies
Nov 27, 2011
I want to open up an existing instance if my program is already running only if its running the same version.I noticed that this question was asked for only if the name exists, but what if the version is older, I just want to notify the user that an older version is still running, "please remove older version before starting this version."The other link is this one:Return to an already open application when a user tries to open a new instance but they don't talk about closing an instance if an older or newer version is detected.
View 3 Replies
Nov 28, 2011
I want to open up an existing instance if my program is already running only if its running the same version. I noticed that this question was asked for only the the name exists, but what if the version is older, I just want to notify the user that an older version is still running, please remove older version before starting this version. The other link is this one: Return to an already open application when a user tries to open a new instance but they don't talk about closing an instance if an older or newer version is detected.
View 1 Replies
Jun 12, 2010
I get the following error when trying to compile the simplest prpgram. Error 1 Class 'CLSID_CorSymWriter' could not be created: System Error &H80040154& After looking at other stuff on the net I removed VB 2010, VB 2008, any C or C++ runtimes and any .NET Framework programs I could find, and then re-installed VB 2010, but the problem still persists.
[Code]...
View 3 Replies
Dec 12, 2011
I use this code to return records in a DataGridView:
[Code]....
View 3 Replies
Oct 25, 2011
I'am Using Visual studio 2010 from 1 year , and it's work fine But Today when I tryed to open the Vs2010 an Error Msg was Appeared to me which is (Cannot Find One Or More Components please reinstall the application.)
View 1 Replies
Aug 30, 2011
[code]When JIT debugging is enabled, any unhandled exception will be sent to the JIT debugger registered on the computer rather than be handled by this dialog box.
View 9 Replies
Feb 15, 2011
I'm currently taking a newbie VB course (online) and in this program that I am writing, I am getting one error (red) that when double clicked in the Error List, takes me to the Application.Designer window and states that "Employee is a type in 'WindowsApplication1' and cannot be used as an expression." The only solution it gives me is to generate the Employee Class (in the designer). When I select that, it gives me 3 more errors (all yellow). The Employee class has been made, so I don't really know where else to go from here. Could anyone point me in the right direction?
[Code]...
View 5 Replies
Feb 19, 2011
I opened firefox from my VB program. the browser launched and loaded the page correctly.
When I click back into my VB application, the browser goes to the back. When I click the button that activates the browser, the browser still stays in the back.
I want the browser to move to the front or in front of my VB application window so that the user sees it instead of the application. How do I do this in my program?
View 2 Replies
May 25, 2006
I am developing an application in .NET with C#, I need to write a .VBS script which will open the Windows Explorer and will select a simple .txt file.
View 4 Replies
May 5, 2012
I have a problem with showdialog when the showdialog form is being disposed. The Application focus to another program opened in taskbar. if nothing is opened then it focused to desktop.
View 2 Replies
Nov 14, 2010
I have a class i've called "buttons", which passes in 1 variable, the button text, and then returns a new button with that text. however, i do not know how to get the class, when called to return a button.
similar to how 'toString' works, except it would return a button object instead of a string. (im not sure how toString works in vb.net. in java it is automatically called when you call the new class, so newclass and newclass.toString(); return the same) [code]...
View 2 Replies
Jun 19, 2009
Whether I am using VB 2008 Express or VS 2010 Beta 1 Visual Basic, I get the same error: "Debugging information for 'EXCEL.EXE" cannot be found or does not match. Cannot find or open the PDB file" I have filled in the Debug Tab information: Start external program: C:Program FilesMicrosoft OfficeOffice12Excel.exe
[Code]....
View 2 Replies
Apr 11, 2010
I have a main page. How can I open a new web page (Url assigned in code) and get the return URL back in VB event when the page is closed.I have used a regular Button control to open the page with desired url: Button1.Attributes.Add "onclick", "window. showModal Dialog('" & url & "')")but I don't know how to get the REtURN URL from this page.
View 1 Replies
Jan 27, 2010
I wrote the following two functions in a class to take a gpib reading and also take a measurement from an LCR meter.
HTML
Public Function gpibRead(ByVal Channel As Integer, ByVal buffer As Integer) As String
Dim readingBufferA1 As String
Select Case Channel
Case 1
readingBufferA1 = gpibLCRA1.ReadString(buffer)
Return readingBuff
[Code] .....
When on the main form I call the funtion takeMeasurement(1) how can I get the LCR readings back. If I try and use readingBufferA1 on the mainform it doesn't recognize that as a variable. I know that it is taking the reading and storing the correct numbers because I am monitoring on NI Spy.
View 6 Replies
Jun 8, 2011
I have a custom class named Location with multiple properties.
[Code]....
How can I get the value of each p.Name and return "Main St", "AnyTown" o "USA"
View 1 Replies
May 18, 2012
I'm moving code from code-behind to classes and run into a problem. I have a method which makes a string (an html invoice). In the method a final amount is created. I want to make a class called Invoice which will have the method "CreateInvoice" which will return a string and I also want to set the finalCharge property of the object.[code]
View 1 Replies
Oct 24, 2009
I have a Class in a Windows Form project. I would like to call the class return value from the Form1 sub on button click. How do I do that? Lets say I would like to display the Return in a MsgBox?
View 4 Replies
Jun 26, 2012
i have the web service that return a class Dto the name of the service is GetDto and the element of the class that return are Id and name.
how to manage a return class from web service?
View 5 Replies
Apr 12, 2009
I have a class called Customer. It has some property like custID,custName..etc. Inside Customer class I have a function which returns an array of customer.
I wrote a function like this :
Public Function InitLoadCustomerDetails() As Customer()
sql = "SELECT* FROM tblCust"
ds = classDC.queryHandler(sql, "InitCustomerDetails")
Dim customerArray(classDC.maxrow - 1) As Customer
Dim currentCustomer As New Customer
[Code] .....
But it is not returning an array. Just a customer variable??
Public Function InitLoadCustomerDetails() As Customer()
Return customerArray
End Function
Fix this to return an array of customer!!
View 10 Replies
Jun 22, 2010
I'm trying to call an external .vb file class function, is it like dim a as ClassName=new ClassName()? so how do you do with this kind of.. I try to search for return value from .vbs to project that i will compiled, but none got the answer..#The reason why i'm doing this is for feature maintenance..
View 1 Replies
Aug 7, 2009
I'm trying to take a resultset, store in a class then retrieve the complete record for a given value. For example, the recordset has AnalystID (Unique), LastName, FirstName. I want to be able to pass the AnalystID and return the name. I need the ability to look up either last or firstname by analystID throughout the program. Here's what I have so far. I'm not sure I'm even headed in the right direction.
[Code]...
View 4 Replies
Feb 13, 2009
I have created a class called clsLogIn [code]Now I am on a different form, frmSchedule, and I want to get the ProviderNum property from clsLogin into a text box.
View 10 Replies
Feb 11, 2011
So I have an application that uses a webservice, On the UI side the user picks a table which sends a request across the web to my webservice to return the fields of this table. So after this request is accomplished I have, on the webservice side a series of Name,Type Pairs that I need to serialize and send back to my client. I could use a List(of String()) to send the values back but I want to use a List(of Custom_Class) instead because later I have to do this on a much larger scale and I want to learn on this simpler version.
[Code]...
View 1 Replies
Jul 13, 2010
If cmOptions.Visible Then
Return
End If
I have a refreshing process that updates a listview every ten seconds. If the context menu is open for a selected item it should return and not refresh?
View 1 Replies