Answer Questions
jeusdi TextBox1.DataBindings.Add update issue!?
Hello people, I have a issue with the databindings attribute for the textbox. I have a textbox1 which gets linked to a class iDemoCustomer as follows: Me.TextBox1.DataBindings.Add("Text", iDemoCustomer, "CompanyName") The class contains just a few properties to get and set its attributes. Now the issue I have is that while entering something in the textbox the class property for CompanyName doesn't get updated on TextChanged event. The update of the property CompanyName occurs when textbox1 loses focus (leave event). Would it be possible to make the DataBinding update on the TextChanged event And could you give some information on how to do this Thanks in advance, Dries Robeyns Dries Robeyns, I don't think ...Show All
Lee Eden IsDate causing System.IndexOutOfRangeException
This should be a very simple section of code with an obvious result. The code itself was extracted from a larger project to narrow down the location of the problem. In the larger project, I am just trying to verify that the user input is valid. The problem is using Visual Basic in Visual Studio 2005 Version 8.0.50727.42 The simplified version of the code: The form has a standard button (Button1) and a standard Textbox (Text1) Public Class Form1 Private Sub Button1_Click( ByVal sender As Object , ByVal e As System.EventArgs) Handles Button1.Click Dim boolResult As Boolean Dim strText As String = "Test1" boolResult = IsDate(strText) 'System.IndexOutOfRangeException occurs here ...Show All
kirchu Need advice regarding how to put this code better.
Hi, I have written this code in a module. The code works fine and for my kind of brain it might be okay but some of you who have got better IQ OR programming experience might disagree. I need your recommendations. 2 things which i want to make clear are ........ the message "Data validation completed is commented because it was running even when the rest of the group box validation wasn't completed. Other then that function focusclear() at the end of the module is used on every textbox's lostfocus and keypress event. I'm open to all recommendations including rewriting the whole thing if that is certainly the case. Thanks in advance. Imports System.Windows.Forms Module Module1 ' Constants for checking the RSR va ...Show All
chris_dev KeyDown Event...
Basically I have 2 pictures that are changing back and forth with a button pressed. My problem is I want there to be a delay in how quickly they change when the button is being held down. I tried a sleep function but it just blurs graphics or makes them disappear for the set time. I am thinking of using the timer function to solve that problem but I don't know the code to temporarily disable the key and/or halt the KeyDown event before it fires again. Any help would be appreciated, I've been at this for a few hours now and looked all over. I found something about a Me.KeyPreview = False but this doesn't seem to do anything for me... Thanks in advance for your help! I don't know of a keyheld event/meth ...Show All
sroughley Default browser & new window
Hi, I have a predicament. I wish to open weblinks from my program into the default browser. I also wish to open the weblink in a new instance of the browser rather than use an existing instance which is what IE does. Any suggestions I'm guessing there are similar command line arguments for other browsers to open a new instance like in IE with "-new". In which case, the best thing I can think of currently is to check the default browser reg key for known browsers and open up the page with the correlating argument. Sounds like a lot of work though for not much of a return... Thanks for the idea except that that call doesn't satisfy either of my requirements. To recap, I want to be able to o ...Show All
Alexnaldo Santos DateTimePicker and language
Hi everybody first: thank for your help second: i have a DateTimePicker with a custom format like dd MMM yyyy. it display 13 dec. 2006. it's right my regional settings is fr, for all of my application, it' right too but for date, i want an english format: "dec" instead of "dec" how can i do it is there a method or value for define them thank's everybody for your help my regional settings are english. my .net framework is in french. my windows is in english. but my dateTimePicker is also in french Gpg, To avoid this behavior, trap the data before it is displayed in the control, and then change the data so that it is valid. For example, the following c ...Show All
robertpnl Adding and saving rows to a datagrid at run-time
Hello, VS 2005 I have 2 datagrids. The 1st datagrid will contain parts that the user will select and then click a button that saids add part. This part will be added to the 2nd datagrid. Which is the best method to add these rows to the datagrid. The fields will remain the same in both datagrids. So no need to change them. Once the required parts have been entered into the 2nd datagrid they will be saved to the database. What is the best method so save the data in the 2nd datagrid, as the user can save periodically. Many thanks in advance, Steve ...Show All
sebastian_v_b Can a form be opened as a single instance using the constructor.
I want to make sure only a single instance of a form exist using the constructor. Here is and example not using the constructor Public Class Myform Private _CurrentForm As Myform Public ReadOnly Property CreateForm() As Myform Get If (_CurrentForm Is Nothing ) Then _CurrentForm = New MyForm End If ...Show All
NeTBaPb Error message: module containing it is not loaded in the debugging session
Hi I've been having the same annoying minor problem ever since I started using VB.net and was wondering if this is just a feature or whether there is a way round it. The issue I'm having seems to concern shared members of classes. When I try to access one of these member variables or functions to see what their current value is at run time (F9), I get the error message: <membername> is not declared or the module containing it is not loaded in the debugging session. My code is trying to do this: databasePath = Path.GetDirectoryName(txtDatabase.Text) Why can I not see what databasePath is going to become by hitting F9 Thanks for your help! Thanks very much Matthew, that's the explanation I was afte ...Show All
Shihan CallbackOnCollectedDelegate
Hi everybody, I use the following code in my project, but after a while i get the error: CallbackOnCollectedDelegate was detected Message: A callback was made on a garbage collected delegate of type 'WindowsApplication6!WindowsApplication6.hookKeyBoard+LowLevelKeyboardProcDelegate::Invoke'. This may cause application crashes, corruption and data loss. When passing delegates to unmanaged code, they must be kept alive by the managed application until it is guaranteed that they will never be called. This is some code: Private Function LowLevelKeyboardProc( _ ByVal nCode As Integer, _ ByVal wParam As Integer, _ ByVal lParam As KBDLLHOOKSTRUCT) As Integer If (nCode = HC_ACTION) Then If wParam = WM_KEYDOWN Or _ wPa ...Show All
TheQuietShadow TCP Client + SSL
Hi, I am making an Email reader program, and I need to use POP3 servers. I learned the protocol so I'll could use winsock for the connections. The problem is, that a lot of servers require SSL connection, and I don't know how to open one... I know there is a way with the TCP socket, but I don't know how...... :( Can anyone tell me how Thanks, Ofir. ANYONE Anyone I only need someone to tell me how to use a TCPCLIENT, and after that, TCPCLIENT + SSL.!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! PLEASE!! Anyone Thanks, But I've already read that article.. It didn't help me... I still do ...Show All
ScorpEagle Date formula
I am using a data-binding numeric type column that needs to calculate the number of days between today and a datetimepicker field. Any suggestions I tried DaystoNVTextBox = DateDiff(DateInterval.Day, Now, Stage1NVDateDateTimePicker) but it returns Error 1 Value of type 'Long' cannot be converted to 'System.Windows.Forms.TextBox' Thanks! truepantera I don't have any specifics in front of me at the moment, but the control should have an item creation method that that fires when the control binds... This will give you as an argument (usually) the item that is binding. With some checking of types (search google for some specifics), you should be able to intercept the item, and do your ...Show All
SoGa disable code?
I made a if statment, now if that statment is true, then what would i put to disable all the code below it In code, if you put something in the IF Clause - it will run it the expression is true. It sounds as though you dont want to run something when the condition is true. You could put code in the code in the else clause or change the code to if <expression> = False but you cant disable statements - you can merely choose to execute them or not at runtime. Another option maybe conditional compile conditions - this way certain code may be included when you set certain compile flags - but these flags are set in the project and used when the code is compiled up. This way you can exclude certain code from being compiled. ...Show All
Instinct converting entire array without loop?
Hi all, can I convert an entire array to other datatype in one statement preparation: dim test(100) as int16 for i=0 to 100 test(i)=i next i and later on: for i=0 to 100 test(i)=cbyte(test(i)) next i Q: can I do that somehow in one statement (with the purpose of being faster; the example is a simplification) Thanks, Kees With .NET 2.0, you can use generics to convert arrays with the Array.ConvertAll() method. For example: Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click Dim arr16(100) As Int16 Dim arr8() As Byte = Array.ConvertAll(arr16, New Converter(Of Int16, Byte)(AddressOf ByteFromInt16)) E ...Show All
akin_l Textbox Caret Line, Col
I'm trying to find the Line and Column of the caret. When I searched these forums earlier, I found a this Function: rkimble, your solution worked just fine. I downloaded VB 2005 express and it worked without any problems. Thank you. nobugz, that's a pretty cool project, maybe I can implement it at a later date if it will work with a normal textbox (or I can get a richtextbox to change its caret) I'm creating a sort of "text editor" for a special type of file. Each line is terminated by a carriage return/line feed (I don't know the difference) Is there a way to use the 2.0 framework in 2003 Or would I have to upgrade to 2005 Y ...Show All
