Answer Questions
delas Launching an app in Sub Main
I am creating an application, where the form should not be visible. So I am using Sub Main as the startup procedure. The code for my Sub Main procedure is: Public Sub Main() Dim J as New JobQueManager J.JobQueManager_InitApp End Sub When I run my application, it starts in the Sub Main, launches the JobQueManager, and goes thru those procedures, but then comes back in the Sub Main, and exits, and my application unloads. When the JobQueManager goes thru its procedures, there is some user interaction required. But my application, just goes back and exits the Sub Main() and my application unloads. How can I allow for the user to interact Thanks I assume there must be some w ...Show All
edukulla Efficient AutoComplete algorithm?
This is something I've been wondering about for a while. In the past, I have wanted to load a table of string values into the autocomplete custom list for a textbox. This often works great, but is in issue if I'm iterating through 10000+ datarows to build the list. I've tried building the list asynchronously when the app first runs, then adding the collection to the autocomplete list when a control loads, but with so many entries even this lags. So I've been thinking about how to implement an efficient autocomplete algorithm on my own. Assume that I have an object that provides a pre-loaded generic collection of strings (list(of string), etc.). How could I design a function, taking an input of type char[ ] or string, and search through ...Show All
Oleg Krupnov Vb.net calling VB6 Application
HI, I have a VB.net (2005) Application which is converted from Vb6 Application. The Vb6 Application is calling another Vb6 Application on button click and performing some action, once the second application closes, the control is back to first Vb6 application. Can I use / call Vb6 application from Vb.net application let say user information change screens I have in Vb6, and i want to call it from Vb.net.. Is it possible if so, once the Vb6 application closes, how to tell vb.net application that external application is closed Thanks Hi, You have any example of this Mine is one VB.net Application -------->Calling --------> VB6 (standard EXE project) VB6 Can run on its own,i.e independently and i wa ...Show All
eTape String Functions
Through playing I have noticed that whenever I type the name of a string, for example str, with a . after it a list appears with common and all functions availible. Commom: Contains EndsWith IndexOf ..... etc. I am trying to find which functin would accomodate me the best. I am currently using the .Contains to find if a specific "key" word appears in the string I just read in. But what I don't know how to do is extract data that appears after the "key" words. Can someone please help me.....!!!! Example: Itinerary for Doe,John on 01-01-1001 The informaion in yellow is the data that I need. The red ar the "key" words. Okay, so say I had a line of info ...Show All
KenWilson Developing Chart Of Accounts - How to use trees & tree nodes
Hello i m making an accounting application, i m developing a form that loads the company's COA, i want to show the copp's COA in tree my question is how does i make a child node in the tree how do i keep track where is the root node, where is the 1st level 2d level node etc i have a sample in vb 6 which is a piece of cake but haven't got one single in vb.net i m using vb.net 2003, please help also tell how do we sort a data table in vb.net SALAM, i need you help Khaleeq . please provide your email address. Thans. waqaszahoor@msn.com I know exactly what you are going through. It is really based on how your COA is laid out. Here is how I have mine. I have my ba ...Show All
rayms Whats wrong with this code.... receiving data from com
I am trying to get data from the com port (picaxe to be specific) but im afraid this code is vb6 and the mscomm (axmscomm) doesn't recognise ' comEvReceive' and the 'SelLength', 'SelText', 'SelStart' are 'not members of system.windows.forms.label' I just need a few translations... OR ive heard theres a control for the comm port thats made for vb.netcan anyone point me in that directon if such a new control exists Here is the code I am having trouble with: Const COM_PORT = 1 'com port to be used // text1 is a label Private Sub Form_Load() With Me ' Initialise Application Me .Text = "Receiving from PICAXE on COM" + LTrim$(Str$(COM_PORT)) End With With text1 ' Initialise the TextBox t ...Show All
Zero_ Closing a form immediately
I'm tying to close a form immediatly after checking if a file exists but when i try to close the form in the load event an error is generated.Can anyone suggest a way of closing a form without any user intervention, straight from start up. Cheers John try Me .Close() or Me .Hide() Never show it to start with. Thanks, Thats the answer I've come up with and am currently recoding. Sorry for the daft question John ...Show All
Rasnarok Cross-thread operation not valid on ComboBox
Please tell me that you are going to fix this before the official release!! I am using VB not C++. I really shouldn't have to care that my code is not running in the same thread as the one that created the form that contains the control that I am trying to update. Please fix this or at least have some real examples that show how to update a control on a form. The examples that I found were not helpful at all. > Private Sub BackgroundWorker1_ProgressChanged( ByVal sender As Object , ByVal e As System.ComponentModel.ProgressChangedEventArgs) Handles BackgroundWorker1.ProgressChanged Me .ListBox1.Items.Add(e.UserState) End Sub< Are you sure you don't need to use Invoke here In ...Show All
Deeps_123 Help on Access Databases using VB2005
I am a new user to VB, and need to get started using databases. I am capable of connecting to databases using bound controls to forms, but need to be able to programmatically connect to a Access database, add, edit delete, and close the database. Most examples I found referes to SQL databases. Could anyone provide me with links or samples to connect to a Access database, running a query, retrieving a dataset, then add,edit and delete records, and close. Specially Error Handling, is always a great concern. Thanks I have a feeling, but it shouldnt, that it's to do with the date parameter. Send over the project including the access file to my email (email in profile, just click my name) and ill b ...Show All
J Andrews How do I get my IP address into a string?
I'm not talking about local IP. I want it to be the same IP that I get by going to whatismyip.com. Also, what is that kind of IP address called Thanks The IP address that shows up when you go to whatismyip.com or what the rest of the world sees is not necessarily your computer’s IP address but could also be that of the gateway you are using and because of that verifying the address you appear to the public as can only be determined by going through it. One quick and easy way to do this would be with a web service or web page running remotely (ie on the internet) that would call either Context.Request.UserHostAddress (within a web service) or Request.UserHostAddress within an ASP.NET web page. An ...Show All
Horace Li Manipulating a web site from VB
Dear All, Suppose that there is a web site that offers some functionality that I want. For example it has a rich text box andf I want to programmatically insert text into this text box and then programmatically push a button can this be done is there similar code, and then read the resulting code plesae advise.. Hi Thanks a lot for offering to help I am anxiously waiting for more help! best regards. how can I find the IE window does it mean that it needs to be open he IE window also, how do i get the object handle for the text box Shyma Dear All how does one deal with wanting to get information from a web site after a button was clicked must I reload the resulting page please advise I h ...Show All
diane06 Creating in VB.Net an application with a shortcut that includes input parameters
Hi everyone, I've been trying to find some information a code samples to develop an application that can read from a shortcut the specified parameters but no luck at all. For example, I want to have shortcut with a parameter for station number. When I click on it, the station number specified lets say 100.0 its used as an input parameter to do some validations with it. So in my code, I can process the station i.e. sub process(station) msgbox("The station is:" & station") end sub Thanks everyone for your help JP good work Josue, however, what if i want apart from the parameters , if the user types -h for example(help) to output the available commands and parameters for my program within the same command ...Show All
erzfezsf Unexpected Results when resetting a dataset
I have what is basically an adhoc query tool that loads a single table (ds.tables("Work")...)in one dataset from SQL server. The dataset can be saved with WriteXml(FileName, XmlWriteMode.WriteSchema) and reloaded with ReadXml(FileName, XmlReadMode.ReadSchema). Because the query behind each dataset might change between saved DataSets I am calling DS.tables("Work").Reset before each reload. The first "reload" of the dataset using the ReadXML works as expected, but if a second resultset is loaded the second set does not produce the desired results. ds.tables("Work:).rows.count returns the correct number of rows but ds.tables("Work").columns.count always returns 0. console.writeline ds.writexm ...Show All
gray-82 Showing a form in a tabcontrol
Hello All, I'm using VB 2005. Can someone tell me how to "Show" a form in a tabcontrol I have a form with a tabcontrol, as well as other controls, and I need to show a small form via ShowDialog(). However, I want the form to appear in the current tab area of the tabcontrol. I can't seem to find the right combination of commands! Thanks, Carl Yes, you can. Not with the designer though, you have to do it a run-time. For example: Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Dim f2 As New Form2 f2.TopLevel = False f2.Visible = True Me.TabControl1.TabPages(0).Controls.Add(f2) End Sub Thanks for the reply. ...Show All
Alien Brain VB2005 and Excel 2003 (SP2)
Hi all, I'm trying to create a spreadsheet in Excel via VB 2005. I run the code in the example reported in: http://support.microsoft.com/default.aspx/kb/219151/en-us ...and of course I referenced the Microsoft Excel 11.0 Object Library As soon as I push the button Excel starts but the program stop with the following error: Old format or invalid type library. (Exception from HRESULT: 0x80028018 (TYPE_E_INVDATAREAD)) at the line: oWB = oXL.Workbooks.Add Do you have any idea how to solve this issue Please Help Thanks in advance Arcan In Control Panel, Regional & Language setup set EnglishUs Language! If you set any other language you will get mentioned error. I don't know why is that so, I a ...Show All
