microsoft.public.dotnet.languages.vb Archive - October 2002
Post a message to this list
Messages
Page: 12
App.Config (3 replies)
microsoft.public.dotnet.languages.vb
I've been unable to locate any good examples of working with the App.Config file and getting values out of it from my VB code. Working with Web.Config is easy for ASP.NET apps, but App.Config doesn't seem to be quite as intuitive and the documentation for it is not as good either. Does anybody have a good example? Thanks, Steve
Variable name as string (2 replies)
microsoft.public.dotnet.languages.vb
Hi all, Anyone have any idea on how to do the following: I want to pass a procedure an object, but I want to use the string of an object name instead of the object name. eg: I want to use mysub("textbox1") instead of mysub(textbox1) Thanks in advance Paul
Refering to the Valuemember of a combobox? (3 replies)
microsoft.public.dotnet.languages.vb
I populate a combo with the following: ComboBox2.DataSource dsCombo.Tables("tblItems") ComboBox2.DisplayMember "ItemDescription" ComboBox2.ValueMember "ItemID" I then use the following to find a record after the user has made a choice: objROw objdataset.Tables("tblItems").Rows.Find(ComboBox2.SelectedText.ToString) Can someone tell me how to refoer th the Value of a combobox choice??
Stepping into Control Initialization code (2 replies)
microsoft.public.dotnet.languages.vb
I have written a Windows Control Library in VB. From another Windows Control Library project in the same solution, I try to drag an instance of the control onto a form i.e. very standard stuff. I get an error "Error creating instance of blah blah blah". Fair enough, something is haywire in my initialization code. I set breakpoints in the New method of the control class, but I can't step into any o...
Need help with Regular Expresions (4 replies)
microsoft.public.dotnet.languages.vb
I need to loop through each item in a column of data and strip out certain text and then part other elements into 4 pieces of data. The column could look something like this: VOL 364, PG. 828 VOL. 364, PG. 828 VOL. 364xx, PG. 828 VOL. 364, PG. zz828 VOL. 364, PG. 828xx VOL. 364, PG. z828x VOL. 364, PG. 828 VOL. MO296, PG. 81 VOL. MO296, PG. 81 VOL. 296, PG. 659 This represents Volume and Page data...
How do I access public variables decalred in FORM1 from within FORM2? (3 replies)
microsoft.public.dotnet.languages.vb
Am not able to access in public subroutines, or variables declared in FORM1, from within FORM2. Is there any way to do this? Alternatively, is there any way to pass parameters between forms?
Getting the name of controls on a form (6 replies)
microsoft.public.dotnet.languages.vb
Hi, I want to enable/disable some controls on the form, but I need to be able to do this for specific controls based on their name. In theory what I want to do is for i 1 to DisableList.upperbound for each oControl in me.controls if cControl.name DisableList(i) oControl.enabled false next next i However, this fails because there is no ".name" property for a control. What is the proper way to do th...
Binding Treeview with a Collection? (2 replies)
microsoft.public.dotnet.languages.vb
I've found examples of binding various controls with datasets/databases, but have yet to find an example of binding a Treeview with a Collection. Is it possible, and are there any examples anyone can think of? What I'm trying to do is this: Collection of Customers Each Customer is a Collection of Purchases Treeview should show: Customer1 Purchase1 Purchase2 Purchase3 Customer2 Purchase1 Purchase2 ...
thread event (2 replies)
microsoft.public.dotnet.languages.vb
How does one raise an event on a separate worker thread? I am communication with the serial port and have an event that fires when bytes arrive to the input buffer. However the processing of the received bytes need to be processed on a separate thread. I don't want to start a new thread every time I receive this event because I already have a worker thread assigned for this. I need to somehow tell...
Controls disappearing (3 replies)
microsoft.public.dotnet.languages.vb
I have two datagrids on a form. All of a sudden they are not visible. I can still see them in the properties drop down and edit them there but they are no where to be seen during design or run time. I'll try rebooting. Phillip
How To: BackgroundImage Property - Listview (2 replies)
microsoft.public.dotnet.languages.vb
Trying to add an image to the background of a list view. In VB6 you could just do listview1.picture LoadPicture(path) But I don't quit understand how backgroundimage property works.. Help Please. Thanks
Problem updating a datarow (2 replies)
microsoft.public.dotnet.languages.vb
Hi, I have a DataTable bounded to a DataGrid. I also added a handler to monitor the RowChanged and ColumnChanged events. If I made changes to a DataRow using code, the changes are not immediately updated to the DataTable. For example, I have I column "Name". The original value is "Nicky". If I apply the following code, mytable.rows(0)(Name) "Nicky" & counter ' Assume counter 1 mytable.rows(0).EndE...
rowid (3 replies)
microsoft.public.dotnet.languages.vb
I use find to get a row from a table. Once I nave to row I would like to get its rowid so that I can select it in a grid on my form. How can I do this? Thanks, Stan
BLOB file acces problem VB6 <-> VB.NET (2 replies)
microsoft.public.dotnet.languages.vb
Hi All, I have this annoying problem. In one of our VB6 applications, we have a table on our SQLserver database containing various logo bitmap files in a field of the image data type. One of my co workers created serveral functions in a library to maintain this table, where he uses the ADODB.recordset.field.GetChunk and ADODB.recordset.field.AppendChunck methods to read/write these logo's to and f...
Why does my Form lose focus? (5 replies)
microsoft.public.dotnet.languages.vb
Here's how I'm showing a login dialog box as soon as my main application form loads. The dialog displays on top of the main form. Protected Overrides Sub OnActivated(ByVal e As System.EventArgs) Dim frm As frmLogin If m Activated False Then m Activated True frm New frmLogin() frm.ShowDialog(Me) Me.Activate() frm Nothing End If End Sub Without the Me.Activate statement following the return from the...
Help: correction to aspx page, file locking (2 replies)
microsoft.public.dotnet.languages.vb
Hello, can you give a look at this aspx page? It takes a jpg files and returns a processed one, resized and cropped. But after I execute it, and close the browser, the jpg file I have used is still open (I can' remove or overwrite it, like it was still used) and aspclient wc.exe is still open in the taskmanger. If I close the asplient.exe I have access again to the file, so I guess my code is not ...
Opening MS Access Database Application (2 replies)
microsoft.public.dotnet.languages.vb
Hi! I would like to open the MS Access application from VB.Net and then be able to use the forms that have been created in the MS Access database application. I can open the MS Access application by: System.Diagnostics.Process.Start(&quot;MSAccess&quot;) But how do i go about opening my database and then using the forms in that? Thanks! Tarun
Typeconversion - what to use (2 replies)
microsoft.public.dotnet.languages.vb
You can use many forms of typeconversion in VB.NET C??? methods (CINT, CDBL) Parse metods (Int32.Parse) System.Convert What method is the best. Ive heard that C???? methods is very fast but why and would you recomend this method? Thanks
Enum.GetValues() -> Invalid Cast (3 replies)
microsoft.public.dotnet.languages.vb
Hi all I'm trying to get the values of an anumeration, and therefore I ue the GetValues methods of system.enum. This is an example I have snipped from annother post in this group : Dim tEnum As Type GetType(System.Windows.Forms.ButtonState) Dim values() As Object [Enum].GetValues(tEnum) The problem is that I get this error in the second line no matter which enum I try to get the values of : &quot; An u...
Checking for Null (4 replies)
microsoft.public.dotnet.languages.vb
The following code : If Not objROw2(0).Item(&quot;ClientLocality&quot;) Is Nothing Then Me.lblLocality.Text objROw2(0).Item(&quot;ClientLocality&quot;) End If Causes the following error when it contains nothing: Additional information: Cast from type 'DBNull' to type 'String' is not valid. Whats happening?? Thanks in Advance
How can I to serialize Collection in the serializable class (2 replies)
microsoft.public.dotnet.languages.vb
Hi! I have a problem with collection that is class member of serializable class. I get the SerializationException: &quot;The System.VisualBasic.Collection is not marked as serializable&quot; Thanks. David Spectorman Web Team Leader Kalanit Carmon Mail Me mailto:davids@calcom.co.il
Help - Saving Picture (3 replies)
microsoft.public.dotnet.languages.vb
Below is some code I found somewhere on Microsoft's ssite for saving pictures to a DB (Access). It works, but the problem is that once I save the first picture to a certain record, then try to save a second picture for the next record it saves the first picture a places it in the first record. Can anyone help me here? Private Function SaveMyMoviePic(ByVal SourceFilePath As String) As Boolean Dim f...
Function from repeater with no new page. (2 replies)
microsoft.public.dotnet.languages.vb
I want to call a function from the code behind, through a link inside a repeater. How can this be done without creating an additional aspx/ascx page? For example, In my code behind I have a function that does something like: public function test(byVal as integer) as String ' Do some db stuff return &quot;Done&quot; end function and then in the html, I want to do something like: a href &quot; % test(Container.dat...
Setting the date and time parts of a datetime seperately (4 replies)
microsoft.public.dotnet.languages.vb
Hello All, Is there any way to set the date portion of a datetime and the time portion of the same datetime variable independantly. Ultimately, I want to store in an SQL Server datetime field, a date selected from a datetime picker and the time entered in a textbox. Any ideas? Thanks in advance, Tony
Why use finally? (9 replies)
microsoft.public.dotnet.languages.vb
Hi, I am trying to learn vb.net and when I encountered the try... catch.... finally I don't really get it. Why should I use finally? Isn t it the same as if I for example do some cleaning up after the End Try? //Micke
Ad
MBR BootFX
Best-of-breed application framework for .NET projects, developed by Matthew Baxter-Reynolds and MBR IT
 
 Copyright © Matthew Baxter-Reynolds 2001-2008. '.NET 247 Software Development Services' is a trading style of MBR IT Solutions Ltd.
Contact Us - Terms of Use - Privacy Policy - www.dotnet247.com