Search Results

Search found 4472 results on 179 pages for 'vb'.

Page 110/179 | < Previous Page | 106 107 108 109 110 111 112 113 114 115 116 117  | Next Page >

  • Managing tabs and their effects.

    - by VBeginner
    I have two separate areas in my form. Left side for radio buttons, combo boxes, etc. Right side for tabs and even tabs within tabs. For each tab selected, I'd like to display different controls on the left side for use in that tab. I've tried using many things, including focus, click, etc. Nothing seems to work the way I intend it to. Especially on the tabs within the tabs. Thank you.

    Read the article

  • VB Script and filename with space

    - by Ram
    Hi I wrote a VBS file to open the "6 May" folder with following content path = "F:\Test\2010\May\6 May" Set Sh = CreateObject("WSCript.Shell") Sh.Run ""path"",3,True Set Sh = Nothing However on executing this I am getting following error Windows Script Host Script: F:\Sperry\2010\May_06 May\open.vbs Line: 4 Char: 10 Error: Expected end of statement Code: 800A0401 Source: Microsoft VBScript compilation error OK Can anyone help me in this?

    Read the article

  • textbox accept only digits

    - by hiba salem
    Private Sub TextBox1_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles TextBox1.KeyPress Dim allowedChars As String = "0123456789$," If allowedChars.IndexOf(e.KeyChar) = -1 Then ' Invalid Character e.Handled = True End If End Sub this code accept only digits and its working like a charm but if i typed a wrong number its not allowing me to use the delete or the backspace on the keyboard how to solve this problem ?

    Read the article

  • Connect to Oracle 11g using VS2010.net Drivers/Cleints

    - by StealthRT
    Hey all i am trying to redistribute my app that uses Oracle 11g: Imports Oracle.DataAccess.Client The problem i am having is that it will not run on a machine that doesnt seem to have the correct drivers that its looking for. When i install ODAC 11.2 Release 3 (11.2.0.2.1) with Oracle Developer Tools for Visual Studio on the test VM it works just fine but thats a 230+mb file to download and install! Not to mention that if the user already has Oracle 10/11g on their machine that it may mess up their current connections/etc by installing that setup file. Is there another setup package that i can install that only has the Oracle Data Provider for .NET 2.0 11.2.0.2.0 or whatever its needing from that ODAC 11.2 Release 3 file. So any help about what i need to go about fixing this problem would be great! :) Thanks, David

    Read the article

  • How to make a change in Back End Database When my computer turn off by any fault

    - by Gulu
    i have one windows form application in v s 2010. i want to maintain a FLAG in Which there is two values of FLAG 1) yes and 2) no i want that when a form is load a Flag value is yes and The form is close the flag value is no in my back end Database It is same like sing in person on any web site..... But my Problem is that How Can i manatian it any how the my computer is turn off ....... i store a database on single computer that is server.but i also want a code for on same computer,also

    Read the article

  • In .NET when I get a response stream from the server what type of encoding type should I use?

    - by Max
    In the following example I m getting a response from the server; however do I need to set ASCII or UTF8 encoding type ? Dim objURI As Uri = New Uri(URL) Dim wReq As WebRequest = WebRequest.Create(objURI) Dim wResp As WebResponse = wReq.GetResponse() Dim respStream As Stream = wResp.GetResponseStream() Dim reader As StreamReader = New StreamReader(respStream, Encoding.ASCII) Dim respHTML As String = reader.ReadToEnd() wResp.Close()

    Read the article

  • how to display the listbox items to a label using VB2008

    - by Cecilia
    I am trying to display listbox items in a label. After debugging,I get the error : " make sure that the maximun index on the list is less than the list size" any comment will be highly appreciate, Private Sub xMultiButton_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) _ Handles xMultiButton.Click Dim count As Integer count = Me.xNamesListBox.Items.Count For count = 0 To 3 Me.xResultLabel.Text = Me.xNamesListBox.SelectedItems.Item(0).ToString & ControlChars.NewLine _ & Me.xNamesListBox.SelectedItems.Item(1).ToString & ControlChars.NewLine _ & Me.xNamesListBox.SelectedItems.Item(2).ToString & ControlChars.NewLine _ & Me.xNamesListBox.SelectedItems.Item(3).ToString & ControlChars.NewLine _ & Me.xNamesListBox.SelectedItems.Item(4).ToString Next End Sub

    Read the article

  • Whats wrong with this my SELECt Query >?

    - by user559800
    Protected Sub Button1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button1.Click Dim SQLData As New System.Data.SqlClient.SqlConnection("Data Source=.\SQLEXPRESS;AttachDbFilename=|DataDirectory|\Database.mdf;Integrated Security=True;User Instance=True") Dim cmdSelect As New System.Data.SqlClient.SqlCommand("SELECT COUNT(*) FROM Table1 WHERE Name =" + TextBox1.Text + " And Last = '" + TextBox2.Text + "'", SQLData) SQLData.Open() If cmdSelect.ExecuteScalar > 0 Then Label1.Text = "Record Found ! " & TextBox1.Text & " " & TextBox2.Text Return End If Label1.Text = "Record Not Found ! " SQLData.Close() End Sub I write this code to find whether the record entered in textbox1 and textbox2 exists or not ..if record exist ..then in label1 the text would be RECORD FOUND else NO RECORD FOUND ERROR : **when i enter in textbox1 and textbox2 then on button click event it shows the error : Invalid column name ,,**

    Read the article

  • how to combine changes tracked from several documents

    - by Jessica
    I tried to search the solution in internet, but found nothing, is there anyone who can help me? For my application, there is one document (Microsoft word), and this document is reviewed by several people in the "Track changes" mode, so the input to my application is the original document and the reviewed documents with changes (like insert/delete/comments). By this link , I know how to extract all the changes from the reviewed documents. what i want is to combine all the changes from all the reviewed documents into ONE document, and make all the changes "accepted", so the output of my application is one modified Microsoft document with all the changes (delete/insert/comment) accepted. My problem is that I don't know how to combine the changes from several documents into one single document. Anyone has an idea how to do this? Thank you very much in advance.

    Read the article

  • jQuery ajax response not operating correctly

    - by mmarceau
    Ok this is frustrating... The code below works "correctly" as far as sending the email address to the SaveEmail URL and it gets saved correctly each time I change the drop down. However it only outputs the "Successful" message once, no matter how many times I change the value in the drop down. The "data" that is returned is "Successful". I would like to show the message for a couple seconds, then fade it out. It works correctly the first time I change the drop down, after that the change happens and the value gets saved, but the "Successful" message doesn't display. jQuery code: $('#AgentEmails').change(function() { var NewAddress = $('#AgentEmails').val(); $.post('SaveEmail.aspx', { email: NewAddress }, function(data) { $('#SelectMsg').html("<b>" + data + "</b>").fadeOut(); }); }); HTML code: <select ID='AgentEmails' runat='server'> <option value="[email protected]">TEST</option> </select><span id='SelectMsg'></span> What needs to be changed in my code to make this operate correctly? Thanks for the help.

    Read the article

  • How do I fix my Unit Test to have global access to everything?

    - by SLC
    Usually when you add one (in Visual Basic), it pops up a message asking if you want to enable an option that lets the test access things like private methods etc. However, I am editing a solution that does not have this enabled. I'd like to enable it so my unit tests will work, but I can't find the setting. Can anyone tell me how to enable it after the project has been created?

    Read the article

  • Why is a DataViewManager not sorting?

    - by Alarion
    First off, a quick rundown of what the code is doing. I have two tables: Companies and Clients. There is a one to many relationship between Companies and Clients (one company can have many clients). In some processing logic, I have both tables loaded into a DataSet - each are DataTables. I have added a DataRelation to set the relationship, and it works when I use GetChildRows on a record from the Companies table. However, I need to sort the records returned. After googling around some it looks like the DataViewManager is the way to go, and I have examined several basic examples. However, I cannot get my rows sorted. Am I missing something, or am I not using this how it is supposed to be used? Example code: Dim ldvmManager As New DataViewManager(mdsData) ldvmManager.DataViewSettings("Companies").Sort = "comName ASC" ldvmManager.DataViewSettings("Clients").ApplyDefaultSort = False ldvmManager.DataViewSettings("Clients").Sort = "entLastName ASC, entFirstName ASC" For Each mdrCurrentCompany in ldvmManager.DataViewSettings("Companies").Table.Rows Dim ldrClients() as DataRow = mdrCurrentCompany.GetChildRows("CompaniesClients") Next No matter what I do, the first Client returned has a last name that starts with a 'B' and the second has one that starts with a 'A'. From there, the order is all mixed up. If I use my entire data instead of the subset I was using to test with, the first Client returned has a last name that starts with 'J'. It seems like it is still using whatever default sort was being used before I tried to use the DataViewManager. Any ideas?

    Read the article

  • VB.NET CInt(Long) behaving differently in 32- and 64-bit environments

    - by LocoDelAssembly
    Hello everybody, this is my first message here. Today I had a problem converting a Long (Int64) to an Integer (Int32). The problem is that my code was always working in 32-bit environments, but when I try THE SAME executable in a 64-bit computer it crashes with a System.OverflowException exception. I've prepared this test code in VS2008 in a new project with default settings: Module Module1 Sub Main() Dim alpha As Long = -1 Dim delta As Integer Try delta = CInt(alpha And UInteger.MaxValue) Console.WriteLine("CINT OK") delta = Convert.ToInt32(alpha And UInteger.MaxValue) Console.WriteLine("Convert.ToInt32 OK") Catch ex As Exception Console.WriteLine(ex.GetType().ToString()) Finally Console.ReadLine() End Try End Sub End Module On my 32-bit setups (Windows XP SP3 32-bit and Windows 7 32-bit) it prints "CINT OK", but in the 64-bit computer (Windows 7 64-bit) that I've tested THE SAME executable it prints the exception name only. Is this behavior documented? I tried to find a reference but failed miserably. For reference I leave the MSIL code too: .method public static void Main() cil managed { .entrypoint .custom instance void [mscorlib]System.STAThreadAttribute::.ctor() = ( 01 00 00 00 ) // Code size 88 (0x58) .maxstack 2 .locals init ([0] int64 alpha, [1] int32 delta, [2] class [mscorlib]System.Exception ex) IL_0000: nop IL_0001: ldc.i4.m1 IL_0002: conv.i8 IL_0003: stloc.0 IL_0004: nop .try { .try { IL_0005: ldloc.0 IL_0006: ldc.i4.m1 IL_0007: conv.u8 IL_0008: and IL_0009: conv.ovf.i4 IL_000a: stloc.1 IL_000b: ldstr "CINT OK" IL_0010: call void [mscorlib]System.Console::WriteLine(string) IL_0015: nop IL_0016: ldloc.0 IL_0017: ldc.i4.m1 IL_0018: conv.u8 IL_0019: and IL_001a: call int32 [mscorlib]System.Convert::ToInt32(int64) IL_001f: stloc.1 IL_0020: ldstr "Convert.ToInt32 OK" IL_0025: call void [mscorlib]System.Console::WriteLine(string) IL_002a: nop IL_002b: leave.s IL_0055 } // end .try catch [mscorlib]System.Exception { IL_002d: dup IL_002e: call void [Microsoft.VisualBasic]Microsoft.VisualBasic.CompilerServices.ProjectData::SetProjectError(class [mscorlib]System.Exception) IL_0033: stloc.2 IL_0034: nop IL_0035: ldloc.2 IL_0036: callvirt instance class [mscorlib]System.Type [mscorlib]System.Exception::GetType() IL_003b: callvirt instance string [mscorlib]System.Type::ToString() IL_0040: call void [mscorlib]System.Console::WriteLine(string) IL_0045: nop IL_0046: call void [Microsoft.VisualBasic]Microsoft.VisualBasic.CompilerServices.ProjectData::ClearProjectError() IL_004b: leave.s IL_0055 } // end handler } // end .try finally { IL_004d: nop IL_004e: call string [mscorlib]System.Console::ReadLine() IL_0053: pop IL_0054: endfinally } // end handler IL_0055: nop IL_0056: nop IL_0057: ret } // end of method Module1::Main I suspect that the instruction that is behaving differently is either conv.ovf.i4 or the ldc.i4.m1/conv.u8 pair. If you know what is going on here please let me know Thanks

    Read the article

  • A better way of getting a data table with various column types into string array

    - by Vlad
    This should be an easy one, looks like I got myself too confused. I get a table from a database, data ranges from varchar to int to Null values. Cheap and dirty way of converting this into a tab-delimited file that I already have is this (shrunken to preserve space, ugliness is kept on par with original): da.Fill(dt) ' da - DataAdapter ' ' dt - DataTable ' Dim lColumns As Long = dt.Columns.Count Dim arrColumns(dt.Columns.Count) As String Dim arrData(dt.Columns.Count) As Object Dim j As Long = 0 Dim arrData(dt.Columns.Count) As Object For i = 0 To dt.Rows.Count - 1 arrData = dt.Rows(i).ItemArray() For j = 0 To arrData.GetUpperBound(0) - 1 arrColumns(j) = arrData(j).ToString Next wrtOutput.WriteLine(String.Join(strFieldDelimiter, arrColumns)) Array.Clear(arrColumns, 0, arrColumns.GetLength(0)) Array.Clear(arrData, 0, arrData.GetLength(0)) Next Not only this is ugly and inefficient, it is also getting on my nerves. Besides, I want, if possible, to avoid the infamous double-loop through the table. I would really appreciate a clean and safe way of rewriting this piece. I like the approach that is used here - especially that is trying to solve the same problem that I have, but it crashes on me when I apply it to my case directly.

    Read the article

  • Add User to Database not working

    - by user1850189
    I'm really new to ASP.net and I am currently trying to create a registration page on a site. I was successful in adding a user to the database but I decided to add another feature into the code to check what userID's were available. For example, if a user deleted their account their userID would become available for use again. I'm trying to find the min value and the max value and add or subtract 1 depending on whether it is min or max. I can run the code I have written for this with no errors but the user is not added to the database. Can anyone help me figure out what I'm missing from my code to do this? EDIT Code adds a user to database but it adds the new user at -1 instead. I don't seem to be able to see where the issue is. If (aDataReader2.Read() = False) Then aConnection1 = New OleDbConnection(aConnectionString) aConnection1.Open() aQuery = "Insert Into UserDetails " aQuery = aQuery & "Values ('" & userID & "','" & userFName & "','" & userLName & "','" & userEmail & "','" & userUsername & "','" & userPassword & "')" aCommand = New OleDbCommand(aQuery, aConnection1) aCommand.ExecuteNonQuery() aConnection1.Close() ElseIf (min = 1) Then aConnection2 = New OleDbConnection(aConnectionString) aConnection2.Open() aCommand = New OleDbCommand(aQuery3, aConnection2) aDataReader2 = aCommand.ExecuteReader() userID = max + 1 aQuery = "Insert Into UserDetails " aQuery = aQuery & "Values ('" & userID & "','" & userFName & "','" & userLName & "','" & userEmail & "','" & userUsername & "','" & userPassword & "')" aCommand = New OleDbCommand(aQuery, aConnection2) aCommand.ExecuteNonQuery() aConnection2.Close() Else aConnection3 = New OleDbConnection(aConnectionString) aConnection3.Open() aCommand = New OleDbCommand(aQuery2, aConnection3) aDataReader2 = aCommand.ExecuteReader userID = min - 1 aQuery = "Insert Into UserDetails " aQuery = aQuery & "Values ('" & userID & "','" & userFName & "','" & userLName & "','" & userEmail & "','" & userUsername & "','" & userPassword & "')" aCommand = New OleDbCommand(aQuery, aConnection3) aCommand.ExecuteNonQuery() aConnection3.Close() lblResults.Text = "User Account successfully created" btnCreateUser.Enabled = False End If Here's the code I used to get the max and min values from the database. I'm getting a value of 0 for both of them - when min should be 1 and max should be 5 Dim minID As Integer Dim maxID As Integer aQuery2 = "Select Min(UserID) AS '" & [minID] & "' From UserDetails" aQuery3 = "Select Max(UserID) AS ' " & [maxID] & "' From UserDetails"

    Read the article

  • Extra NotifyIcon shown in system tray

    - by Kettch19
    I'm having an issue with an app where my NotifyIcon displays an extra icon. The steps to reproduce it are easy, but the problem is that the extra icon shows up after any of the actual codebehind we've added fires. Put simply, clicking a button triggers execution of method FooBar() which runs all the way through fine but its primary duty is to fire a backgroundworker to log into another of our apps. It only appears if this particular button is clicked. Strangely enough, we have a WndProc method override and if I step through until the extra NotifyIcon appears, it always appears during this method so something else beyond the codebehind must be triggering the behavior. Our WndProc method is currently (although I don't think it's caused by the WndProc): Protected Overrides Sub WndProc(ByRef m As System.Windows.Forms.Message) 'Check for WM_COPYDATA message from other app or drag/drop action and handle message If m.Msg = NativeMethods.WM_COPYDATA Then ' get the standard message structure from lparam Dim CD As NativeMethods.COPYDATASTRUCT = m.GetLParam(GetType(NativeMethods.COPYDATASTRUCT)) 'setup byte array Dim B(CD.cbData) As Byte 'copy data from memory into array Runtime.InteropServices.Marshal.Copy(New IntPtr(CD.lpData), B, 0, CD.cbData) 'Get message as string and process ProcessWMCopyData(System.Text.Encoding.Default.GetString(B)) 'empty array Erase B 'set message result to 'true', meaning message handled m.Result = New IntPtr(1) End If 'pass on result and all messages not handled by this app MyBase.WndProc(m) End Sub The only place in the code where the NotifyIcon in question is manipulated at all is in the following event handler (again, don't think this is the culprit, but just for more info): Private Sub TrayIcon_MouseDoubleClick(ByVal sender As System.Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles TrayIcon.MouseDoubleClick If Me.Visible Then Me.Hide() Else PositionBottomRight() Me.Show() End If End Sub The backgroundworker's DoWork is as follows (just a class call to log in to our other app, but again just for info): Private Sub LoginBackgroundWorker_DoWork(ByVal sender As Object, ByVal e As System.ComponentModel.DoWorkEventArgs) Handles LoginBackgroundWorker.DoWork Settings.IsLoggedIn = _wdService.LogOn(Settings.UserName, Settings.Password) End Sub Does anyone else have ideas on what might be causing this or how to possibly further debug this? I've been banging my head on this without seeing a pattern so another set of eyes would be extremely appreciated. :) I've posted this on MSDN winforms forums as well and have had no luck there so far either.

    Read the article

  • Group properties in custom control

    - by Gunners98
    I want to do a class that have properties like font, which will have other properties, such as name, size, unit,bold.I had tried a solution but it isn't working for me.(http://stackoverflow.com/questions/755391/group-properties-in-a-custom-control) Anyone can help? Any help will be appreciated. <TypeConverter(GetType(ExpandableObjectConverter))> _ Class TestingClass 'Some property here End Class

    Read the article

  • how to close a sqlconnection in asp.net

    - by stighy
    Hi guys, i would like to know if there's something wrong in this asp.net code: mydatareader = mycmd.executeReader() if myDataReader.HasRow then // Do something end if myConnection.Close() If i avoid to call a "MyDataReader.Close()" does the connection close anyway ? I ask this because i'm assuming that if call a "MyConn.Close" it automatically close the associated datareader... or am i wrong ? Thanks

    Read the article

  • Best use of System.Windows.Forms.Application.Run()

    - by carlos
    Hello i Have a programa that has starts in a main sub, it executes some code and after that code it opens a form using System.Windows.Forms.Application.Run(General) General is a form but also a class, so I wonder what it the pros or cons of using : System.Windows.Forms.Application.Run(General) vs Dim gen as general System.Windows.Forms.Application.Run(gen) In the first I am opening a form using the name of the class, and I read that it is best to declare the instance as an object variable. So far I used the first approach without any problem. Thanks for your comments !

    Read the article

  • Creating a Dynamic calendar in Silverlight

    - by Tom
    I am attempting to create a long range calendar that dynamically loads (and unloads) event data as the user scrolls left or right through time. I'm really struggling to figure out how to lay the basic framework of the UI out and how to dynamically build the interface as the user scrolls by clicking and dragging the mouse in the view area. See the image below for a basic diagram of the intent. Each slice would have potentially multiple rectangles in it for events that occurred on that day (slice). I would like each slice to be a canvas to allow me to position those rectangles appropriately. There are a few problems that I am not yet sure how to tackle but this is the first big one that I've been mulling over for a while and can't quite wrap my head around: I know how to dynamically create controls but how would I go about adding things to one end of the scrollable content while removing things from the other depending on the way the user is scrolling? Any guidance in the right direction would be much appreciated! Thanks.

    Read the article

  • Making A ScrollBar Go To Selected Record In TreeView ASP.Net

    - by Nick
    I have a treeview control that gets populated at runtime with a pyramid of employee names. I put the css scrollbar on the view by putting overflow:auto" in the tag where the treeview is located. The users are now asking me to to have the scrollbar go down in the treeview where a treeview item is selected. How do I make a scroll bar to go to a place where the treeview has been selected? Note: treeView1.SelectedNode.EnsureVisible(); is not available in asp.net need another way.

    Read the article

  • Data confusion - Selecting data in one DataGridView based on selection in another

    - by Logan Young
    This probably isn't the best way to do what I want, but I can't think of anything else to try... NB: I'm using Visual Basic.NET My form has 2 DataGridView controls. One of these is bound to a DataSet, the other isn't visible - at least not until the user selects a uniqueidentifier cell in the 1st grid. When the user makes this selection, the 2nd grid will become visible and display the row from another with the same id as the one selected in the 1st grid. So, basically, I want to dynamically display data in one grid based on user selection in another grid. My code looks like this so far... Private Sub RulesGrid_CellClick(ByVal sender As System.Object, ByVal e As System.Windows.Forms.DataGridViewCellEventArgs) Handles RulesGrid.CellClick Try FlagsGrid.Visible = True ''// MsgBox(RulesGrid.CurrentCell.Value.ToString()) Dim sql As String = "SELECT * FROM ctblMKA_Status_Flags " + _ "WHERE intStatusID = '" & RulesGrid.CurrentCell.Value & "'" DSFlags = GetDS(sql) DSFlags.DataSetName = "FlagsDataSet" FlagsGrid.DataSource = DSFlags ProgressBar.Visible = False Catch ex As Exception MsgBox(ex.ToString) End Try End Sub I feel like I'm missing something here... Any ideas anyone?

    Read the article

  • ASP.NET - How to edit 'bit' data type?

    - by Peter
    I am coding in Visual Basic. I am using a checkbox control. Now depending on its checked property I need to set/unset a bit column in a SQL Server database. Here's the code: Try conSQL.Open() Dim cmd As New SqlCommand("update Student set send_mail = " + _ sendemailCheckBox.Checked.ToString + " where student_id = '" _ + sidnolabel.Text + "'", conSQL) cmd.ExecuteNonQuery() Finally conSQL.Close() End Try The send_mail attribute is of bit datatype. This code is not working. How do I go about it?

    Read the article

< Previous Page | 106 107 108 109 110 111 112 113 114 115 116 117  | Next Page >