Answer Questions
Al33327 dynamic structure?
I am reworking someone's code similar to the following structure: Private Structure SpeedData Dim JulianDate As Double Dim MinSpeed As Double Dim MaxSpeed As Double Dim AvgSpeed As Double Dim TtlOps As Long End Structure This structure (based on fields in database tables) is used in several functions. The structure worked fine while the client used a rigid datasource. However, they are now reading data from numerous sql server tables many of which have different fields. That is, all have a datetime field (primary key) but the other fields vary from table to table. Is there a way to dynamically create a structure based on the fields contained in the underlying table It would have to be accessible to several different functions ...Show All
Jackys Edit properties of controls on other forms
I understand how to change the value of a textbox by making a new form in the code Dim Form2 as New form ... Form2.show() This however does not work for me, i need to edit existing form controls that i make in the designer. So instead of making a new form in the code, i wnat to just edit one i already made. Right now i can only get the code to run when I dim Form1 as new Form I cant dim it as new, then nothing works and i get null erros and such. Any help will be greatly appreciated, I did search the forums and all i found was what i have above and that wont work, atleast i dont believe it will. Hello You are clearly new to programming and I would recommend you take some ti ...Show All
asiaenforcer simple question textbox to textbox
i am working with one form, i want the text inputed by a user from one textbox to be displayed in another read-only textbox thanks for your time Hi, maybe something like this Private Sub inputTextBox_TextChanged( ByVal sender As System.Object, ByVal e As System.EventArgs) Handles inputTextBox.TextChanged readonlyTextBox.Text = inputTextBox.Text End Sub Andrej Yes, ToString is necessary since the type of the text property is string, whereas I expect the type of the URL is probably URL or similar. Nevermind it was a misuse of quotes. after reading this, how do you make a read-only textbox (is it some property...if so, which ) and if it wasnt read only...an ...Show All
JaganReddy Save splitterdistance/container/panel info on app shutdown to reload persisted settings/sizes?
the vb6 application which this vb.net app is replacing stores panel size info,etc in an ini file when a form closes so it can "reload the previous layout" THere are 4 drawing panes which can have different sizings, perhaps one taking up a whole view are, top and bottom...or even all four. Is there a way in vb.net (2005) to capture this info so that it reloads with whatever size/splitterdistance existed on application shutdown Me.SplitContainer1.SplitterDistance = 882 Me.SplitContainerDrawingVertical.Size = New System.Drawing.Size(886, 618) Me.SplitContainerDrawingVertical.SplitterDistance = 295 Me.SplitContainerDrawingLeftHorizontal.Size = New System.Drawing.Size(295, 618) Me.SplitContainerDraw ...Show All
a.s.viswa Need help exporting VB.Net variables/data to VBA macro
Hi I'm using VBA AutoCAD for drawing, but instead of defining parameters in VBA, I would like to take those parameters from VB.Net codes. Here is an example Sub CreateCylinder() Dim CylinderObj As Acad3DSolid Dim center(0 To 2) As Double Dim radius As Double Dim height As Double ' Define the cylinder parameters center(0) = 5#: center(1) = 5#: center(2) = 0 radius = 10#: height = 20# ' Create the cylinder in model space Set CylinderObj = ThisDrawing.ModelSpace.AddCylinder(center, radius, height) End Sub This VBA code will create a cylinder at co-ordinates (5,5,0) with radius = 10 and height = 20. I would like to know how to link or export these parameters from VB.Net to VBA AutoCAD for plotting. Many t ...Show All
lee d Write data in VB.NET to Access using SQL
Okay, I have an Administrator page that is able to create new users. I have a simple adduserform that has a TabControl added in it with a tab for General Info and User Info. Those have quite a few texboxes for input and outside of the TabControl are 3 buttons that are Save, Clear, and Exit. What I want to do is have the Save write the data to my small database that I have for users. If you want to see an example of my screen you can see it here.... http://redbearcustoms.no-ip.info/VB/adduserform.html While there's nothing wrong with the route you've been given, for someone who doesn't yet understand the ins and outs of SQL syntax, you may find it much easier to do this with a dataset and let Visual Studi ...Show All
Bulldog.NET how do I Refresh "My Computer" network drives for vb express 2005 data access
Since windows 2000 came out there has been annoying red "X" on My Computer's network drives. If you click on them, they go away and the files are displayed. In VB 2005, the mycomputer.filesystem.drives.item(n) does not refesh them and directory.getfiles("P:\") returns an error "could not find part of the path P:\" When I double click on P: in my computer, the error goes away and I can read the files again. This is annoying becuase I write a lot of network applications. How can I implement code in my program to refresh drive "P:" I just tried : Using sw As StreamWriter = New StreamWriter( "P:\temp.log" ) That does not work also... ...Show All
baldeagle16 Regression Equation / Statistics in VS 2005
Is there an easy way to create a regression equation based on certain data located in variables Or do I have to get out the 'ole stats book and write the code manually I couldn't find anything in the help file about this, so I may be out of luck! Thank you! -Corey Sidermans Dark side, sometime you highly misnformed in the things you say. I'n 1970 I was doing linear regression equations on Mini-Computers in Focal a VB predecessor.. Linear regression is very,very EASY to on a computer. It's pretty much like a correlation coeffiient. Unfortunately I am asked to do this once every fifteen years of so and I've forgotten the approach. I remember y = mx + b after to get the co ...Show All
Jamie Thomson Docking forms
GDay All, I am a newbie to VB.net and I'm trying to dock a form into a toolstrip. The 1st form has a toolstripcontainer and the 2nd form is set to borderstyle = fixedtoolwindow. Can I dock the 2nd form onto the first form so that it behaves something like the properties window in the VS2005 IDE If not, how can I achieve a similar function to that of the properties window in my application Any help would be appreciated. I apologize...I checked and you are correct The download link is dead....try doing a google to see if you can find it elsewhere...or you can click the "Docking Windows" link at the top of that page to take you to a "Nevron" download...Never used that one before though. ...Show All
Ljhopkins Comm port communications
I'm using serial communications to receive inputs from 6 barcode readers to one comm port. I have an oncomm event that takes just under 2 seconds to complete. If i receive another oncomm event within that time, it starts another oncomm event on top of the first one. I have had some problems with this code and think it might be related to this. My first question is is this second oncomm event interupting the first event and stopping it from completing and if so, is there a way around this. My second question involves a possible solution, which is after the oncomm event starts and i read the information from the port, can i then close the port until the 2 second code has finished and then open the port back up, thus avoiding the possible con ...Show All
Jamie Briant How do I copy bitmap data to a buffer?
I have an application that displays some images using PictureBox. There is a requirement to toggle between colour and monochrome or grey-scale versions of the image, so I've created a class derived from PictureBox that contains extra bitmaps that hold the various versions of the image, and then when the user switches between them, I just assign the relevant bitmap to the PictureBox. When the image is first loaded, the application generates the monochrome and grey-scale versions from the loaded colour version. This is where the problem lies. For each version of the image, I make a clone of the original, and then loop through X and Y, using GetPixel and SetPixel to change the colour based on a conversion formula. That also works ok, b ...Show All
jkirk VB.Net (or C#) for machine control
Hello Experts: For some quick background - I've done lots of PLC programming (equipment design) and am probably an intermediate vb programmer. I have been dabbling a bit with the idea of using vb.net for machine control as it would provide many advantages in terms of software reusability, flexability, etc. The challenges are two fold. The first is the abiltiy to interract with physical I/O and the other is the real-time aspect of control. With respect to the first issue, OPC and Modbus TCP/IP seem to be the best options. I have read pros/cons of each but am still not certain which is the best choice in terms of performance and ease of use. Any t ...Show All
aanersiieaaoa How to retrieve all Field names in a Acess database
Hi, Can anyone help me with a code sample which will retrieve all the field names in an Access database I am using oldbd and an SQL search, which I can retrieve the data when I search a Table (ie. "DesktopStock") and Field (ie. "HDD") which is fine, but I would like my app to find all fields (programmically) so that if in the future I add another field ie. "Monitors", I can search without needing to adjust the code. My current code loooks like this: Dim connstring As String = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=D:\Stock2k.mdb;User Id=;Password=;" Dim conn As New OleDbConnection(connstring) Dim queryString As String = "SELECT Item, ExTax, Profit F ...Show All
TimMulholland How to detect/capture left or right mouse click
I tried the my.computer.mouse thing, but no luck. Thanks. why do you want to get the numbers why dont you use the mouseventargs to check if the Left, Middle or Right mouse button is pressed Example: if e.Button = MouseButtons.Left then 'left button pressed end if Detect not working. Either the program is moving too fast to register the mouse clicks on the mouse_down event or something else is wrong. implement the mouse click event for whatever control you are trying to check on and use the MouseEventArgs to see which mouse button was clicked. I keep getting an acess of shared member violation. Anyway, it would be nice to know ...Show All
zybernau RegEx.Replace isn't working
I have this: Imports System.Text.RegularExpressions.Regex Select Case True Case CBool(GetAsyncKeyState(116)) With Options.Items If .Item(0).ToString.Contains("OFF") Then MsgBox("check") Replace(.Item(0).ToString, "OFF", "ON") Else MsgBox("nocheck") Replace(.Item(0).ToString, "ON", "OFF") End If End With End Select Options is a listbox. Now, when I press F5 the msgbox says 'check' but the string does not change "OFF" to "ON". Am I missing something Hi, I tested this code, which worked perfectly as desired. Imports System.Text.R ...Show All
