Search Results

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

Page 102/179 | < Previous Page | 98 99 100 101 102 103 104 105 106 107 108 109  | Next Page >

  • ListView wont release focus in .NET CF 3.5

    - by roman
    I have a form with a ComboBox and a ListView, when I press the down key on the Dpad focus moves from ComboBox to the items in the listView. But then I cant get out of the ListView and focus on the ComboBox again, I can only go up and down in the ListView items, how do I let the user go back to the ComboBox?

    Read the article

  • MSMQ - Message Queue Abstraction and Pattern

    - by Maxim Gershkovich
    Hi All, Let me define the problem first and why a messagequeue has been chosen. I have a datalayer that will be transactional and EXTREMELY insert heavy and rather then attempt to deal with these issues when they occur I am hoping to implement my application from the ground up with this in mind. I have decided to tackle this problem by using the Microsoft Message Queue and perform inserts as time permits asynchronously. However I quickly ran into a problem. Certain inserts that I perform may need to be recalled (ie: retrieved) immediately (imagine this is for POS system and what happens if you need to recall the last transaction - one that still hasn’t been inserted). The way I decided to tackle this problem is by abstracting the MessageQueue and combining it in my data access layer thereby creating the illusion of a single set of data being returned to the user of the datalayer (I have considered the other issues that occur in such a scenario (ie: essentially dirty reads and such) and have concluded for my purposes I can control these issues). However this is where things get a little nasty... I’ve worked out how to get the messages back and such (trivial enough problem) but where I am stuck is; how do I create a generic (or at least somewhat generic) way of querying my message queue? One where I can minimize the duplication between the SQL queries and MessageQueue queries. I have considered using LINQ (but have very limited understanding of the technology) and have also attempted an implementation with Predicates which so far is pretty smelly. Are there any patterns for such a problem that I can utilize? Am I going about this the wrong way? Does anyone have an of their own ideas about how I can tackle this problem? Does anyone even understand what I am talking about? :-) Any and ALL input would be highly appreciated and seriously considered… Thanks again.

    Read the article

  • Override An Existing Property as a Child form of its return type

    - by Jason
    I apologize if that title is confusing. This question may be a result of lack of coffee and/or sleep, but my mind is not working correctly right now. Anyways, I have an inheritance tree like such (I know the architecture isn't ideal): BaseClass GeneralForm : Inherits BaseClass SpecificForm : Inherits GeneralForm And an object like so: MyItem MySpecificItem : Inherits MyItem I have Items As List (Of MyItem) as a property in BaseClass. I would like for SpecificForm to somehow override Items to return type List (Of MySpecificItem). I feel like this is easy to do, but again, my head is spinning and I can't think straight at the moment. Thank you so much in advance.

    Read the article

  • Strategy for developing a multi function asp.net web application

    - by user247023
    I'm about to start a new project and want some advice on how to implement. I need a web application which contains a booking module for reserving timeslots, and a time management module which will enable employees to clock in / clock out. If I am writing an update to the time managment module, I don't want to disrupt the booking engine availability by releasing a new solution containing both modules. to make things more difficult, there is some shared functionality like common users, roles and security. Here's a suggestion I've gotten, which sounds a bit cruddy, but may be functional. Write a 'container' web application which consists of basically a frame, and authentication / security features. This then has links which, will load the 2 independantly built and released web applications into the frame. I can see that say, if I wanted to update the time management module, I would only need to build and release this separately, and the rest of the solution would be 'untouched' Any better alternatives?

    Read the article

  • dataset using where condition from another query

    - by refer
    here's my code. I have a dataset that has its values and then i run an independent query which uses the same tables as dataset. now when i run the dataset, i want it to get a where condition on the query result. here's the code - sql = "SELECT ID, name FROM books WITH(NOLOCK) WHERE id =" & Session("ID") ds = FillDataset(sql) Sql1 = "SELECT n.id as id,a.name as title FROM books n WITH(NOLOCK)" & _ "LEFT JOIN new_books a WITH(NOLOCK) ON a.id = n.book_id " rd = ExecuteReader(SqlCnn, SqlStr) Now after this i make an htmltable and all the cells are loaded with the data from datareader(rd). but 1 dropdown is loaded from the dataset. i want that dropdown to have the selectedvalue which is the value from the datareader(rd). how can i do that?

    Read the article

  • Treeview DatafieldParentID Bind to Object whose property is a another object

    - by user228777
    I am trying to bind Generic collection to a Rad Treeview control. In following case CategoryCollection Returns collection of Category Object, which has bunch of properties and A Parent property which is a object and this parent object Has Id and text properties. What I am trying to do is: I want to Bind DataFieldParentID of the tree view to CategoryCollection.Parent.Id. How do I do that? Dim tvCategory As RadTreeView = DirectCast(cboCategory.Items(0).FindControl("tvCategory"), RadTreeView) With tvCategory .DataSource = CategoryCollection .DataTextField = "Name" .DataValueField = "ID" .DataFieldID = "ID" .DataFieldParentID = "Parent.ID" .DataBind() End With Thank You

    Read the article

  • I cant able to remove a row from a table while running through a loop

    - by Vibin Jith
    I am iterating through the table rows . if the row row is null I just want to remove the row. it shows an error Public Sub RemoveBlankRow(ByVal MyDataTable As DataTable) Try Dim MyRowStr As String = String.Empty For Each MyRow As DataRow In MyDataTable.Rows MyRowStr = "" For Each MyCellText As Object In MyRow.ItemArray MyRowStr = MyRowStr + MyCellText.ToString Next MyRowStr = Replace(MyRowStr, "0", " ") MyRowStr = Replace(MyRowStr, ".", " ") If MyRowStr.Trim = String.Empty Then MyDataTable.Rows.Remove(MyRow) End If Next Catch ex As Exception End Try End Sub How to overcome this issue?

    Read the article

  • How to find the Dynamically added gridview footer control

    - by harold-sota
    I have add controls to my gridview footer, here is the code SGridView.ShowFooter = True For i As Integer = 0 To ctrList.Count Dim ctr As Control = CType(ctrList.Item(i), Control) SGridView.FooterRow.Cells(i + 1).Controls.Add(ctr) Next the ctrList contain Controls textBox, checkbox dropdowlist ect. there is all ok but when i wont to get the text or value or checked value of controls i cant cast the controls in rowcommand event Here is the code: Protected Sub SGridView_RowCommand(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.GridViewCommandEventArgs) Handles SGridView.RowCommand If e.CommandName = "Add" Then Dim ctrList As ControlCollection = SGridView.FooterRow.Controls For Each ctr As Control In ctrList If TypeOf ctr Is TextBox Then Dim name As TextBox = CType(ctr, TextBox) Dim val As String = name.Text End If Next End If this excample is for the textBox control. Any idea?

    Read the article

  • import excel to sql db table

    - by droyce
    I am trying to write data from an excel spread sheet to a SQL Database. I have been able to connect to the Excel Spreadsheet and read the data but I am unable to get the data to insert into the SQL DB table. the current code is as follows any help most appreciated. Dim plmExcelCon As System.Data.OleDb.OleDbConnection Dim ldExcelDS As System.Data.DataSet Dim cmdLoadExcel As System.Data.OleDb.OleDbDataAdapter Dim PrmPathExcelFile As String PrmPathExcelFile = txtImportFileLocation.Text.ToString plmExcelCon = New System.Data.OleDb.OleDbConnection("Provider=Microsoft.ACE.OLEDB.12.0;Data Source=" + PrmPathExcelFile + ";Extended Properties=Excel 12.0;") cmdLoadExcel = New System.Data.OleDb.OleDbDataAdapter("select * from [" + txtImportSheetName.Text + "$]", plmExcelCon) ldExcelDS = New System.Data.DataSet cmdLoadExcel.Fill(ldExcelDS) dgvImportData.DataSource = ldExcelDS.Tables(0) plmExcelCon.Close() cmdINSERT.Parameters("@[SQL COLUMN NAME]").Value = [Not sure how to set value from datagrid view] cnLD.Open() cmdINSERT.ExecuteNonQuery() cnLD.Close()

    Read the article

  • What's wrong with this SQL Server query ?

    - by ClixNCash
    What's wrong this T-SQL query : 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 + "'", SQLData) SQLData.Open() If cmdSelect.ExecuteScalar > 0 Then Label1.Text = "You have already voted this service" Return End If Dim con As New SqlConnection Dim cmd As New SqlCommand con.Open() cmd.Connection = con cmd.CommandText = "INSERT INTO Tabel1 (Name) VALUES('" & Trim(Label1.Text) & "')" cmd.ExecuteNonQuery() Label1.Text = "Thank You !" SQLData.Close() End Sub

    Read the article

  • DropDownList selectedValue not changing display

    - by MemphisDeveloper
    I have a list of controls that I change based on an event. The controls are contained within a table that is created dynamically. I traverse through a set of controls and if it is a RadioButtonList or a DropDownList I do the following: CType(cntrl, ListControl).SelectedValue = val The radio buttons set just fine but the dropdown list doesn't reset. Can anyone tell me why. The initial table is created on the first Page Load and stored in memory. It's values are changed during the eventhandling and reposted to a MasterPage's content holder.

    Read the article

  • Calling a WPF Application and modify exposed properties?

    - by Justin
    I have a WPF Keyboard Application, it is developed in such a way that an application could call it and modify its properties to adapt the Keyboard to do what it needs to. Right now I have a file *.Keys.Set which tells the application (on open) to style itself according to that new style. I know this file could be passed as a command line argument into the application. That would not be a problem. My concern is, is there a way via a managed environment to change the properties of the executable as long as they are exposed properly, an example: 'Creates a new instance of the Keyboard Application Dim e_key as new WpfApplication("C:\egt\components\keyboard.exe") 'Sets the style path e_key.SetStylePath("c:\users\joe\apps\me\default.keys.set") e_key.Refresh() 'Applies the style e_key.HideMenu() 'Hides the menu e_key.ShowDeck("PIN") 'Shows the custom "deck" of keyboard keys the developer 'Created in the style application. ''work with events and response 'Clear the instance from memory e_key.close e_key.dispose e_key = nothing This would allow my application to become easily accessible to other Touch Screen Application Developers, allowing them to use my keyboard and keep the functionality they need. It seems like it might be possible because (name of executable).application shows all the exposed functions, properties, and values. I just have never done this before. Any help would be appreciated, thank you in advance.

    Read the article

  • What features are heavily used in C# 2.0, but is not available in VBNET 2.0, and how to workaround?

    - by Will Marcouiller
    I don't want a war between VBNET and C# developpers, neither is my goal to open a C# VS VBNET confrontation. I would like you all to list a feature that is heavily used in C#, but is not available in VBNET 2.0, and how would you work around to achieve a similar behaviour or purpose? For example: C# Accepts void (return) lambda expressions. Here's an example with FNH mapping: Component(x => x.Address, m => { m.Map(x => x.Number); m.Map(x => x.Street); m.Map(x => x.PostCode); }); This is impossible to do before VBNET 4.0 (supposed to be doable in VBNET 4.0) VBNET Must write a helping method (Sub), and provide the AddressOf this method in order to workaround. Private Sub Helper(ByVal m As MType) m.Map(Function(x) x.Number) m.Map(Function(x) x.Street) m.Map(Function(x) x.PostCode) End Sub ... Component(Function(x) x.Address, AddressOf Helper) Now I know, it is not VBNET 2.0, but this is an example. VBNET 3.0 and 3.5 can used too. Please just mention what version of VBNET this refers to.

    Read the article

  • Dataset and Hierarchial Data How to Sort

    - by mdjtlj
    This is probably a dumb question, but I've hit a wall with this one at this current time. I have some data which is hierarchial in nature which is in an ADO.NEt dataset. The first field is the ID, the second is the Name, the third is the Parent ID. ID NAME Parent ID 1 Air Handling NULL 2 Compressor 1 3 Motor 4 4 Compressor 1 5 Motor 2 6 Controller 4 7 Controller 2 So the tree would look like the following: 1- Air Handling 4- Compressor 6 - Controller 3 - Motor 2- Compressor 7- Controller 5 - Motor What I'm trying to figure our is how to get the dataset in the same order that ths would be viewed in a treeview, which in this case is the levels at the appropriate levels for the nodes and then the children at the appropriate levels sorted by the name. It would be like binding this to a treeview and then simply working your way down the nodes to get the right order. Any links or direction would be greatly appreciated.

    Read the article

  • asp.net Can I force every page to inherit from a base page? Also should some of this logic be in my master page?

    - by Bex
    Hi! I have a web app that has a base page. Each page needs to inherit from this base page as it contains properties they all need as well as dealing with the login rights. My base page has some properties, eg: IsRole1, IsRole2, currentUserID, Role1Allowed, Role2Allowed. On the init of each page I set the properties "Role1Allowed" and "Role2Allowed" Private Sub Page_Init(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Init Role1Allowed = True Role2Allowed= False End Sub The basepage then decides if the user needs redirecting. 'Sample code so not exactly what is going to be, bug gives the idea Protected Overridable Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) If Role1Allowed And Not Role1 Then 'Redirect somewhere End If End Sub The page then must override this pageload if they need anything else in it, but making sure they call the base pageload first. Protected Overrides Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load MyBase.Page_Load(sender, e) If Not IsPostBack Then BindGrid() End If End Sub The other properties (IsRole1, IsRole, currentUserID) are also accessible by the page so it can be decided if certain things need doing based on the user. (I hope this makes sense) Ok so I have 2 questions Should this functionality be in the base page or should it somehow be in the master, and if so how would I get access to all the properties if it was? As there are multiple people working on this project and creating pages some are forgetting to inherit from this basepage, or call the base pageload when overriding it. Is there any way to force them to do this? Thanks for any help. bex

    Read the article

  • Deploying a .Net App Source Control (SVN) over 32-bit AND 64-bit dev stations

    - by Mika Jacobi
    Here is the situation : Our Dev Team has heterogeneous OS systems, scattered between 32-bit and 64-bit. This is not ideal, we are actually planning to homogenize our infrastructure, but in the meantime we have to deal with it. The issue is that when a 32-bit developer checks out a 64-bit solution on SVN, he has to manually change the target platforms all over again to get it compiled (not to mention other side problems) My question is : What clean (though temporary) solution could be addressed in such situation, permitting each developer to keep his default project/platform settings while checking out and in from SVN. I guess that -at least for the first time a project/solution is checked out, a dev still has to tweak the setting manually to compile it properly. After that, according to relevant SVN filters, it is possible to ignore some settings files (which ones, by the way?) I am open to all clever and detailed suggestions. Thanks.

    Read the article

  • Put a program in the system tray at startup

    - by cosmo0
    Hi I followed the commonly-linked tip for reducing an application to the system tray : http://www.developer.com/net/csharp/article.php/3336751 Now it works, but there is still a problem : my application is shown when it starts ; I want it to start directly in the systray. I tried to minimize and hide it in the Load event, but it does nothing. Edit : I could, as a poster suggested, modify the shortcut properties, but I'd rather use code : I don't have complete control over every computer the soft is installed on. I don't want to remove it completely from everywhere except the systray, I just want it to start minimized. Any ideas ? Thanks

    Read the article

  • Addding Custom Controls to Toolbox in visual studio

    - by Ben
    Hi, I am trying to add a dll that contains some custom 3rd party conrtols and some in house user controls and am getting the following error - "The Assembly "MyASsembly.dll" could not be loaded. Check that any dependencies the file requires are installed" I am using Visual Studio 2003 and the 3rd part controls are C1. Does anyone know what is wrong? Thanks

    Read the article

  • connecting to exchange server

    - by MyHeadHurts
    I am using this code to connect to my exchange server. I am trying to retrieve an inbox of basically emails that have not been read however, i am just getting a bunch of gibberish and its reading an email. can you help me modify my code to just read the most recent messages. Try tcpClient.Connect(hostName, 110) Dim networkStream As NetworkStream = tcpClient.GetStream() Dim bytes(tcpClient.ReceiveBufferSize) As Byte Dim sendBytes As Byte() networkStream.Read(bytes, 0, CInt(tcpClient.ReceiveBufferSize)) sendBytes = Encoding.ASCII.GetBytes("User " + userName + vbCrLf) networkStream.Write(sendBytes, 0, sendBytes.Length) sTemp = networkStream.Read(bytes, 0, CInt(tcpClient.ReceiveBufferSize)) sendBytes = Encoding.ASCII.GetBytes("Pass " + userPassword + vbCrLf) networkStream.Write(sendBytes, 0, sendBytes.Length) sTemp = networkStream.Read(bytes, 0, CInt(tcpClient.ReceiveBufferSize)) sendBytes = Encoding.ASCII.GetBytes("STAT" + vbCrLf) networkStream.Write(sendBytes, 0, sendBytes.Length) sTemp = networkStream.Read(bytes, 0, CInt(tcpClient.ReceiveBufferSize)) sendBytes = Encoding.ASCII.GetBytes("RETR " + messageNumber + vbCrLf) networkStream.Write(sendBytes, 0, sendBytes.Length) networkStream.Read(bytes, 0, CInt(tcpClient.ReceiveBufferSize)) returnMessage = Encoding.ASCII.GetString(bytes) EmailContent.Text = returnMessage sendBytes = Encoding.ASCII.GetBytes("QUIT" + vbCrLf) networkStream.Write(sendBytes, 0, sendBytes.Length) tcpClient.Close() Catch ex As Exception EmailContent.Text = "Could not retrieve email or your inbox is empty" End Try

    Read the article

< Previous Page | 98 99 100 101 102 103 104 105 106 107 108 109  | Next Page >