Answer Questions
adamroof Trying to Do an inplace Update of Rectangle Objects stored in generic List
This is a strange one for me. What I have is a List(Of Rectangle) that are each 200 by 200. I want to be able to go through the list iteratively, change each ones location to being 10 pixels to the right and 10 pixels down and then shrink their size by 20 on each dimension. Initially, I planned on something like this: Private Sub prepareMenuSquares( ByRef squares As List( Of Rectangle)) For Each thing As Rectangle In squares thing.X += 10 thing.Y += 10 thing.Width -= 20 thing.Height -= 20 Next End Sub I assumed I would be passing the List by reference and then would have access directly to the Rectangle objects themselves and could do an inplace modifcation, no problem. Well that didn't work a ...Show All
levins UInt32 problem
hi guys i am in the middle of converting a big project from c# to vb.net and iam facing this problem in c# the integer type (UInt32) is implemented and can be used but in vb.net its not implemented and its giving me "value of type integer cannot be converted to PrinterErrors" in this line : Private m_Error As PrinterErrors = PrinterErrors.OK i have this code portion i have enum in C# declared as UInt32 PrinterErrors.ok =0 PrinterError.readError=20 . . . i tried to make my own enum in vb.net as follows Public Enum PrinterErrors As Integer AccessDenied = 5 CannotConfigSerialPort = 800 CannotOpenSerialPort = 842 DirectoryFull = 8 DirectoryUnmo ...Show All
PRMARJORAM 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 I mean with mask is the Expression Validator to validate the e-mail address thanx 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(b ...Show All
pamike Accessing HTMLElements Methods from VB 2005 within WebBrowser
Hi there, I have a Windows.Form with a WebBrowser-Component. I can handle almost anything but I want to change properties of HTML/DHTML-Objects. For example: Dim Selectbox As HtmlElement = myBrowser.GetElementbyId( "SelectBoxNr1" ) Now Selectbox is a HtmlElement and I want to change the selectedIndex but I can't. If I debug and add Selectbox to Watchlist I see the property I need under Selectbox.DomElement.mshtml.HTMLSelectElementClass.IHTMLSelectElement.selectedIndex. How can I change the selected index I also tried: Selectbox.InvokeMember("changeIndex", "3") but this doesn't work Any Ideas Found out by myself. Selectbox.DomElement.SelectedInde ...Show All
chas2003 Post-FormLoad Event
The form load event handler gets control before the form is actually loaded and displayed. Is there an event where I can get control AFTER the form is loaded and displayed Thanks. try the Shown event. I believe this will fire after the Form_Load event. ...Show All
Fusion1224 Error while trying to run project: Unable to start debugging
I working on two project on same time, one of them I create a custom control inherited from TextBox, after I build, I use in another project, and I do not know what is the cause of that, I got the error message: Error while trying to run project: Unable to start debugging Access is denied. Verify that you are an administrator or a member of the 'Debugger Users' group on the machine you are trying to debug. After being added to the 'Debugger Users' group, you must log off and log back on for the setting to apply. How do I solve this Thanks in advanced. I think that means you don’t have debugging privilege on the computer. Try to add yourself to Power Users group. Here is kind of a tutorial http ...Show All
Carver42 DataSet or DataTable???
Hello My experienced VB friends, What is the best way to code my application Using the DataSet or the DataTable. I mostly use 1 table. Thank you guys, RayV wrote: I would use a DataTable until/if a reason pops up to use a DataSet. It will make your code that much simpler and that's a good thing. Not necessarily. Two points to consider: 1) DataSets contain DataTables, so it's not much trouble to obtain the latter from the former. 2) The ADO.NET framework is designed to work seamlessly with DataSets -- not so much with DataTables. If your application absolutely positively never needs to deal with multiple data sources, you can probably get away with using a DataTable. C ...Show All
ZychoFlow How do you manage your controls if there are many many controls placed on the forms?
Hi I would like to know how do .net developers manage a large window application with a large number of controls, such as textbox , button, groupbox I have seen a number of people do it this way : declare the controls as an array and initialize them one by one at run time . In this way it is easy to manage those controls because they can be accessed by array index; but this solution seems to require very good understanding of control's attribute such as its location, font etc. This could be a difficult task if the project is passed on to a less experienced developer and add changes to it. How do you deal with it Thanks, Oh, Spotty your solution is pretty nice here is my solution, which will have the same outcome: ...Show All
rWarrior listbox textbox and ado
Hi, can anyone help me with this problem.. i have a combo box, a list box and 2 text boxes the combo box contains a list of categories, which would limit the contents of the list box into the items that are contained within the selected category.. the list box calls and lists the field "Name", and when you click on an item on the list, the textboxes are supposed to contain the other fields that correspond to the item on the list box.. here is the code that i tried.. the only thing the textboxes show are "False" text.. how do i make the textboxes show the needed information.. Dim dbFood As Database Dim rsFood As Recordset Dim z As String z = List1.Text Set dbFood = OpenDatabase("C:\Program Files\Microsoft ...Show All
Nightmare_BE Bubble sort numbers in a listBox
I am a student. I have a lab that I am working on that has a listBox that I can enter numbers into. The numbers are all integers. I enter them via a textBox and an enter button. I have this part figured out. Now the hard part. how do I get these numbers entered into numerical order with a sort type function or subroutine. I figure we have to 1. put them in order, and then 2. put the newly sorted list back into the list box, replacing the old out of order list. any tips here would be greatly appreciated! I can't find anything in the text as to exactly how to do this. The action will all tie to a "sort" button . thanks again! OK, from what ...Show All
doughboy Using Excel in VB.Net form
I want to access data from an Excel spreadsheet in a VB.net form. How do I do this What do I need installed. erin.anderson wrote: I want to access data from an Excel spreadsheet in a VB.net form. How do I do this Start by searching these forums for Excel! You have a couple of choices ADO.NET and interop.... erin.anderson wrote: What do I need installed. Visual Basic and the latest MDAC for option one Visual Basic, MDAC and Excel for option 2 ...Show All
RAMPRAKASH Possible bug in Typed datasets
I have either found a bug in typed datasets or I am missing something. After I create a record using a typed dataset I go into SQL Server to look at it(SQL 2000). All of the fields I have put data into have the data there but there is no data in any other field with a default value defined in SQL. Is this the expected behavior If it is then there sure isn't any reason to define a table with columns with default values. Can someone out there point me in the right direction Thanks, SLTDon What are the data types and default values of the fields with default values that are not populating Also, can you post your code that you are using to insert the records At first thought, the on ...Show All
EZ1976 ShellExecute() question...
Hello. I'm trying to use shellexecute() to open a directory... This is the code portion having to do with it... Option Explicit On Private Const SW_NORMAL = 1 Private Declare Function ShellExecute Lib "shell32.dll" Alias "ShellExecuteA" (ByVal hwnd As Long, ByVal lpOperation As String, ByVal lpFile As String, ByVal lpParameters As String, ByVal lpDirectory As String, ByVal nShowCmd As Long) As Long Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click Dim FOLDER As String = My.Computer.FileSystem.SpecialDirectories.MyDocuments ShellExecute( Me.hwnd , "open", FOLDER, vbNullString, vbNullString, SW_NORMAL) End Sub error BC30456: 'hwnd' is not a membe ...Show All
streetpc Error while opening a form in vb.net
hi, I have a problem with my VB.NET project. I cannot open the properties window of the project anymore while it was working before. And if I try to open a form with the Visual Basic Form Editor, it gives me the error: "There is no editor available for .vb. Make sure the application for the file type (.vb) is installed" and i cannot open also the file .resx: "Make sure the application for the file type (.resx) is installed" any help plz Thanks in advance well i tried to resolve this problem by reinstalling the visual studio because i was having the same problem in all my projects! and hopefully, everything's back to normal! :) I have th ...Show All
Rodolfo Navarro VB.NET 2005 Binding / DS Help
Hello, Im currently having trouble trying to bind mssql table to some fields on a test app. Basicly i have my text fields, buttons, dataset though unsure if ive made my dataset correctly. Below this is my code, though ive not worked out update, add, delete as yet. I know I prob dont have enough information on here, but am I in the correct direction and why would it not work, it does not error on a click event just does nothing. Do I have to refill it the text fields are binded to this dataset the first record shows. Please help, and try to keep the answer to a rooks standard please, thank you. PS: Any links with visual dataset setup would be great too, so that i can confirm that I'm doing it correctly. ------------------ ...Show All
