Answer Questions
Learning VB VB.NET HELP!!!! Login Page HELP PLEASE!!!!!
Hey everyone. I got the basic LoginForm in VB.net to work for me but I wanted to slightly modify it. I added a dropdownbox for the user to select whether they were a "User" or "Administrator". I have an MS Access database called AITP.mdb with only one table in it called user . The user table has the following fields with attributes in parenthesis: user_id(autonumber), user_fname(text), user_lname(text), user_login_name(text), user_login_password(text), admin(Yes/No), user(Yes/No). I want the prog to check what the user entered as an accesslevel, on the loginform, against what they have in the database. For example if a user has both admin and user then the form that opens depends on whether they selected adminis ...Show All
Runespy dt.defaultview.sort
hi, i want to sort my data table. in sql the order goes this way -> 'order by userid, startdatetime'. is this how we sort data in data table dt.defaultview.sort = "userid, startdatetime" thanks cherrie If you want to change the actual order of the dataset then on the SQL statement used to populate the dataset - use the Order By clause of the sql statement to determine to sort order. That will sort the defaultview by userid, startdatetime. The datatable's order will not change. ...Show All
Skugga Problem whit publishing
When publishing program to a computer thet don't have internet access and framework i found thet i have to include prerequisites. Becose prerquisites can't be downloaded from web in properties i specify thet prerequisites download from the same location as my application. When publishing start i got three errors: Error 1 The install location for prerequisites has not been set to 'component vendor's web site' and the file 'DotNetFX\instmsia.exe' in item '.NET Framework 2.0' can not be located on disk. Error 2 The install location for prerequisites has not been set to 'component vendor's web site' and the file 'DotNetFX\WindowsInstaller-KB893803-v2-x86.exe' in item '.NET Framework 2.0' can not be located on disk. See Help for more info ...Show All
katti205961 System.InvalidOperationException when creating a form. How do I debug the form.show() method?
An unhandled exception of type 'System.InvalidOperationException' occurred in Program1.exe Additional information: An error occurred creating the form. See Exception.InnerException for details. The error is: Control array element 2 doesn't exist. I put a breakpoint on the form.show() method, but I still get this error. I am assuming it's related to some control on the form, but there are no details. I'd like to trace or debug the form.show process if possible to determine which of the 100+ controls is causing this error. This application is being converted from VB6 to VB.net and it works fine of course in VB6. How can I trace into the form.show routine provided by the System.Windows.Forms framework to find out which control i ...Show All
Paulustrious How can I check the Internet connection speed via code?
How can I check the connection speed by code. Thank you Nofal First, get the NetworkInterface that is connected to the internet. Check for the right one when you get them all -- in the example: zAllNICs variable-array stores all the networkinterfaces, I'm assuming Item 0 ( Private theNIC As NetworkInterface = zAllNICs(0) ) is the right one, but that will not always work. Once you have the right NetworkInterface, you can check its properties to see how many bytes in total have been received/sent. If you put some time-points around that in code, you can calculate the speed in bytes per second (or whatever units you want). Here's a (hopefully) working example, but note that I scrambled it together from my own speedgraph ...Show All
2162 2003 > 2005 Upgrade problem
I have an application written in VB.Net '03 that worked fine until I attempted an upgrade. I have most of the bugs ironed out, but one I can't find a solution to: My buttons light up on MouseHover, and "unlight" on MouseLeave. This is true of all buttons, including the "exit" button. The problem is, after I click the "exit" button, the Windows Form Designer Generated Code "dispose" sub triggers the MouseLeave event, which generates an "ArgumentOutOfRange Exception because the collection the "unlit" Exit Button image is stored in is no longer available. Yikes! This didn't happen in '03 -- how do I sidestep it in '05 Is there a way to say "If the last button clicked was NOT & ...Show All
-Sam- Mac Address of Ethernetcard.
Hi Can some body help me out in finding out which of the macaddress is fixed and doesnot lose the value when the network adapters are diabled. I have used the following code to identify the the mac address on my system. Dim mc1 As System.Management.ManagementClass Dim mo1 As ManagementObject mc1 = New ManagementClass( "Win32_NetworkAdapter" ) Dim moc1 As ManagementObjectCollection = mc1.GetInstances() allValues.AppendText( "Win32_NetworkAdapter" & vbCrLf) For Each mo1 In moc1 Msgbox( "Adapter Type :-> " & mo1.Item( "AdapterType" ) & vbCrLf & "MacAddress :-> " & mo1.Item( "macAddress" ) & vbCrLf) Next The Result i rece ...Show All
black dove How to create a new datarow by it's self?
If I do this: Dim newrow As New DataRow it tells me: ...is not accesable in this context because it is protected How can I build a row so that I can put it in an add statement, like this: <dataset>.<datatable>(1).Rows.Add(<newrow>) Thanks for any help. Hi, calling DataTable's NewRow() method will create a new row. When using typed dataset, there is a typed version of the same method available: Dim MyDataRow As DataRow = table.NewRow() or Dim MyDataRow As MyDataSet . MyDataTableRow = myDataSet.MyDataTable.NewMyDataTableRow() Andrej ...Show All
xavier_X EMAIL
I am using this code in vb.net 2005 to sent an email but an error FAILURE SENDING MAIL is allways appearing. Can someone show me where I am duing wrong. Try Dim SmtpClient As New System.Net.Mail.SmtpClient SmtpClient.Host = "localhost" SmtpClient.Port = 25 SmtpClient.UseDefaultCredentials = True SmtpClient.Send("glennzarb@gmail.com", "glenn_zarb@hotmail.com", "Test", "hi") MsgBox("sent") Catch ex As Exception MsgBox("Send failure:" & ex.Message) End Try I haven't installed any other programs or smpt's It is the service for sending emails from a local computer. You can change the h ...Show All
haryindsfjdbf Listboxs with multicolored items
I've got an application that will add action items to a listbox. Some of the items are higher priority (Red) and others are not (Yellow). Is there a way to put both colors into a listbox Thanks everyone. The code appears to be working perfectly. If I copy this sample to my project It doesn't work. Items haven't any colors. What I have to do else Thank You. I've tried the owner draw option, but when I change the color in the draw event the entire list gets rewritten as the new color. OK.Thank you very much, DMan1. You'll have to owner draw a standard listbox. Here' ...Show All
Henry Ong SWbemObject class CIM_PhysicalMedia/ WIN32_PhysicalMedia
I am trying to receive the physical media information according to my local CD-Rom drives by using WMI Scripting Object and the related classes. Def: Private oService As SWbemServices Private oSet As SWbemObjectSet Private oSet2 As SWbemObjectSet Private oSW As SWbemObject 'Get Physical Disk Information - working fine Set oSet = GetObject("winmgmts:{impersonationLevel=impersonate}"). _ InstancesOf("Win32_DiskDrive") 'Get Logical Disk Information - working fine Set oSet = GetObject("winmgmts:{impersonationLevel=impersonate}"). _ InstancesOf("Win32_LogicalDisk") 'Get CDROM Disk Information - working fine Dim strServer As String strServer = ". ...Show All
Markus Zywitza precision for double data
Hi, I have a double type array, I hope to format each element in this array, like following: origionally, a(0)=1.234343, a(1)=1.343555....... after format, a(0)=1.234, a(1)=1.344...... thank a lot x = math.round(<value>,<precision>) In your case: x = math.round(a(0),3) ...Show All
Furious P i need datetime picker supports Arabic language
hi i need a date tima picker control that support Arabic Language and Hijri date for ( VB.NET ) so i read about this subject in microsoft website but i dont know how to get it, Thx. have you tried using the standard date pick control in Visual Studio on a machine which is configured for arabic with the hirji date formatting Where did you read about this can you provide the URL http://www.microsoft.com/middleeast/msdn/arabicsupp.aspx The DateTimePicker doesn't show Hijri dates. This was by design. I think you might have been confused with the ASP.NET Calendar control, which displays the Hijri calendar. ...Show All
rooooooodog Inconsistent Operation between OS/PC's
Hi all, I've written a small application, that consists of a text label, a gif image and a button, which is compiled into an executable image. On button press, the following callback code is executed to try and determine the domain name of the host computer. However, depending on what computer I run the application upon, I see different results. On some PCs, the routine runs correctly and the domain is printed to the screen. On other PCs, the application launches but the domain name fails to be printed. Finally, on some PC's the application fails to launch, and an error message is displayed. I'm wondering if any of my code maybe OS/machine dependent Or, perhaps, maybe there is an issue with the handling of the gif imag ...Show All
Zadoras clearing recent projects list
Have there been any new ideas / thoughts / techniques on this subject since the threads a year ago Anyone have a (safe) script that clears the registry that they could share Start out by making a test key using regedit...then create your vb methods to alter your test key...once you have the knack of reading and writing to the registry....write a method for clearing the Project MRU's The Project MRU list is located at HKey_Users\YourUserID\Software\Microsoft\VisualStudio\8.0\ProjectMRUList From there it is easy enough to create a method that will dlelete all items in that key using Microsoft.Win32.RegistryKey Thanks. I'm a little (heck, I'm a LOT) paranoid about fooling with the Registry. I had hoped some ...Show All
