Answer Questions
UtterMan Combobox ItemData is not available/accessible
I have a VS.net solution (multiple projects), created entirely within VisualStudio.Net 2002. I try to access and update ItemData property of a MS-form combobox, design mode, yet the property is not accessible. NewItemID is not accessible either. I have queried from the internet and found an article, from Microsoft, stating similar problem when migrate from VB6 application into VisualStudio.NET 20056. However, for my scenario, the entire solution is completely created within VisualStudio.NET 2002. Thank in advance. It has disappeared in 2005 but is still available using a class ... Public Class ComboListClass Private sName As String Private iID As Integer Public Sub New() sName = "" iID = 0 End Sub ...Show All
AlfonsAberg Problem using CInt() with textbox
I have the following code, to calculate, in real time, the sum of tree textboxes. Private Sub TextBox1_TextChanged( ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TextBox1.TextChanged, TextBox2.TextChanged, TextBox3.TextChanged Dim tx1 As Integer tx1 = Me .TextBox1.Text Dim tx2 As Integer tx2 = Me .TextBox2.Text Dim tx3 As Integer tx3 = Me .TextBox3.Text Me .Label1.Text = tx1 + tx2 + tx3 End Sub But I get an error: The conversion of the caracter sequence " to type 'Integer' is not valid. I feel this has to be really simple, but I'm stuck with this problem! Thanks for your attention. Lucas The following ...Show All
mruniqueid ListBox
How do i add all item's names to a listbox from a file in my hard drive I mean, i have a lot of txt files in c:\Prog\sts, and i want to add this txt files names to a listbox.How do i do this If its a simple text file and you want to add the lines. Heres an example. Public Class Form1 Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click AddLinesFromTextFile(Me.ListBox1, "C:\boot.bcd") End Sub Function AddLinesFromTextFile(ByVal C As ListBox, ByVal Filename As String) As Boolean ...Show All
Rainadaman Mouse Move on the Panel Control
I want to catch the mouse move on a panel. I use the following Sub Private Sub Panel1_MouseMove( ByVal sender As Object , ByVal e As System.Windows.Forms.MouseEventArgs) Handles Panel1.MouseMove End Sub But when the mouse is on another control of the panel ( lets say a label ) , the program doesn't trigger the sub. I have to write another mosemove sub for the child control or I have to add handles behind the other sub . But I don't want to do it for each control. Is there a way to solve this issue Below is a code snippet that shows how you can direct all mousemove events with a single mousemove handler. It's real primitive in that you will have to add logic to translate coordinates of ch ...Show All
kkoston How do I create events for an array?
My problem is that since I now have an array rather than one instance on a my form, I dont know how to call subs with event handlers. I can get as far as "handles wschat." but intellisence doesnt show any events after that like it did with the single instance of xMSWinsockLib.AxWinsock. How do I create event handlers for my array My relevent code is as follows: Friend WithEvents wschat As New Collections.Generic.List( Of AxMSWinsockLib.AxWinsock) Dim a As Integer .......................................................................................................... Private Sub Form1_Load( ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase .Load For a As Integer = 0 To 150 ...Show All
Matt Michuta Simple open and close
Hi all, Just need a bit of help, I'm stuck on a bit of code A user will enter in a file name it will be read and open the appropriate file, a txt file in this case I'm not really sure about the openfiledialog Any help will be much appreicated Cheers thats fine, you can comment out the textbox part (was just a demo) and do whatever you want with it :-) almost! I don't need to put the text into the txt box i just need to open the .txt file that i have specified Hope this is a bit clearer Sorry! Well the openfiledialog allows you to select a file. Example: Dim theOFD as new OpenFileDialog() theOFD.Filter = " specifyFilterOfFile ...Show All
Matrixchyah How can i make e-mail mask
How can i make e-mail mask Please help me I need a mask or some one tell me how to make one thanks you could use a maskedtextbox: http://msdn2.microsoft.com/en-us/library/system.windows.forms.maskedtextbox.aspx http://msdn2.microsoft.com/en-us/library/kkx4h3az.aspx to create your email address style/field/column data input you could also use this regex (regular expression) to validate the inputs and check to see if it is a valid email address, if not, then prompt them to enter a correct email address (there are many variations, im no regex guru but this one works reasonably well): private function ValidateEmail(byval emailAddress as String) as Boolean Dim theRegexValidator as new Regex("^([a-zA- ...Show All
biztalkdude vb6 upgrade wizard error - OLE_E_CANT_BINDTOSOURCE
When I run the VB6 upgrade wizard in Visual Studio 2005 I get an error. It is not related to the application I am upgrading, because I even get the error if I run it on a "blank" vb6 app. I've re-installed, and still no luck. The entire error reads: Unexpected exception occurred during upgrade engine operation: Not able to bind to the source (Exception from HRESULT: 0x8004000A (OLE_E_CANT_BINDTOSOURCE)) i just create a registry modifier like this, go to start/execute and type notepad then press ENTER in the notepad copy this Windows Registry Editor Version 5.00 [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\visualstudio\8.0\VBUpgrade] ...Show All
Woyler Threading and Events
Hi folks, Just want to double check my understanding is correct... Got a windows service that fires of a series of scheduled tasks. My ScheduledTask base class has an event called TaskComplete which also passes back the result of the task (ie success/fail) The idea was so that we can start the task and then just listen for the TaskComplete event to be fired, however... If the windowsservice launches the ScheduledTasks Start method on a seperate thread, If my understanding is correct, the TaskComplete event will not be picked up by the windowsservice that called it (because its on a seperate thread.) Now I know that for the senario above, I could just use the provided background worker and its provided methods but I need to kno ...Show All
Arslan.Ahmed filling a bitvector32 in a loop
Dear all, I can fill a bitvector32 like this: Dim InBytes As Int32 dim i for i = 1 to 1000000 InBytes = i 'for example Dim InBitVector As New System.Collections.Specialized.BitVector32(InBytes) next i and then I can read out the individual bits (need this for a graphics conversion). Problem: this gets VERY slow, and I trailed that to the Dim InBitVector statement. Is there ANY way to assign an Int32 number to the InBitVector WITHOUT using the dim statement Thanks, Kees Perhaps it's wise to say what I want in the first place. Perhaps you guys even know a way to prevent extensive coding in solving this problem. I have 12-bit gray-va ...Show All
TRTwiggy Cross Form Control
Hi, I have a graph on my main forum ‘frmmain’ the commands of which are controlled by Dim myPane2 As GraphPane = zg2.GraphPane I need to creat a new forum called ‘frmoptions’ so that the user can change things like the graph title etc, how do I gain access to myplane and all it’s controls though the new ‘frmoptions’ such that the following code in my ‘frmoptions’ would work and change my graph on my main forum ‘frmmain’ Dim myPane2 As GraphPane = zg2.GraphPane myPane2.Title.Text = titletxtb.Text.ToString ‘ This text box is on ‘frmoptions’ myPane2.XAxis.Title.Text = xaxistxtb.Text.ToString myPane2.YAxis.Title.Text = yaxistxtb.Text.ToString if radiotbn = true then ...Show All
bxa Tab Page Order. See the VIEW menu.
Hi, I am using vb.net 2003. My question concerns tab pages. My tab pages get out of order when I run my application. How to I force the order to stay consistent Thanks, Thanks, let me give an example of my problem. I create a tab control with 5 buttons: tab1,tab2,tab3,tab4,tab5 however when I run my program I see tab1,tab4,tab5,tab2,tab3. This is the order problem I am experiencing. I need the order of displayed tab control pages to stay in the order I created them in. Thanks, The order of the tabs follows the zOrder of the tabpages. The problem that you are encountering is widely known, but as of yet, no one has reported a set of steps to follow ...Show All
Morten Grøtan TCP/IP clients, listener, and servers
I was wondering if anyone had a good example of a TCP/IP server VB.Net application using TCPclient and TCPListener that you could send me. I need to develop an application that acts as a TCP/IP server waiting for TCP/IP client connections. All of the connections have to be maintained and any received command has to be processed and status information needs to be returned to the clients. Tony the server will need to send something to see if the client is (still) connected. Obvious question, that is often missed, to you have a firewall running on either of the computers that is blocking the connection Is the protocol something you can modify It looks like the protocol is giving you some ...Show All
einstine98 c# to vb .net (2005)
how to write the following code in vb .net (2005) what this FOR LOOP is for for (;;) { //do something } Please, guide me. Thanks Javfarary This for loop has no conditions to meet, therefore it runs in a continous loop. The VB equivalent for an infinite loop is: Do 'Do stuff Loop Thanks Javfarary ...Show All
Speedie Help with subclassing
Was hoping someone might be able to spare a link or two about refining classes. Working on a newbie program and have a class set up but need to refine it and possibly add a sub class. Any links to good reads would be greatly appreciated. Thanks Mike Thank you Jared and weirdbeardmt, for the links. I should have been a little more specific in what I was asking. I'm a little confused on when and when not to subclass. The only example I have in my book is the Person class with an Employee subclass that inherits the Person class. If I understand it correctly you should not subclass unless there is an "Is a" relationship. But what do you do in situations when your relationship is "has a" For instance, I have a ...Show All
