Search Results

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

Page 114/179 | < Previous Page | 110 111 112 113 114 115 116 117 118 119 120 121  | Next Page >

  • Three 1D Arrays to One 2D Array

    - by Steven
    I have a function which accepts a 2D array, but my data is in three 1D arrays. How do I create a 2D array consisting of the three arrays to pass to the subroutine? Dim Y0(32) As Double Dim Y1(32) As Double Dim Y2(32) As Double 'Code to fill arrays' 'Attempting to call:' Sub PlotYMult(YData(,) as Double)

    Read the article

  • Detect response from Modem?

    - by GoodBoyNYC
    I'm working with a Teltonika G10 GSM modem and wrote up a basic program to send out SMS. I put a 1.5 second timer between each AT command to allow the modem to simulate the wait for the "OK" from the modem. This works for now but I'd rather use a branching statement wait for an actual response such as "OK" or "ERROR" rather than using a timer. SerialPort1.Write("AT+CMGD=1,4" & vbCrLf) Thread.Sleep(1250) SerialPort1.Write("AT+CMGF=1" & vbCrLf) Thread.Sleep(1250) SerialPort1.Write("AT+CMGS=" & Chr(34) & "3475558223" & Chr(34) & vbCrLf) Thread.Sleep(1250) SerialPort1.Write(":|" & Chr(26))

    Read the article

  • Switching between multiple reports (.rdlc) in a single report viewer

    - by UserNameHere
    I have 2 reports, "report1.rdlc" and "report2.rdlc" and I want to be able to swap betweent the 2 of them in a single report viewer ("rv_1"). I also have 3 buttons: btn_1 which does: rv_1.LocalReport.ReportEmbeddedResource = "Application1.Report1.rdlc" rv_1.RefreshReport() btn_2 which does: rv_1.LocalReport.ReportEmbeddedResource = "Application1.Report2.rdlc" rv_1.RefreshReport() btn_3 which does: dim rds as new ReportDataSource rds.name = rds.value = rv_1.reset() rv_1.LocalReport.DataSources.add(rds) rv_1.RefreshReport() Now no matter what I put for rds.name and rds.value it leaves me with "A data source instance has not been supplied for the data source 'dataSetName_TableName'. So my question is; what do I need to put there in order to get this to work correctly?

    Read the article

  • How to expose information about a running .NET exe?

    - by Doug
    I have a .NET exe that I wrote and it has a couple properties that I made public and want to expose. I want to shell this exe (Process.Start()) and then somehow reference this exe and get access to these public properties. These properties expose information about the running exe. I know how to shell to the exe. And I know how to add a reference to the exe from my project that I want to use this object. But how do I get access to the properties of this running exe? I hope I am explaining myself well. If you do know the answer maybe you could just tell me what the standard method is to expose properties of a running exe to another application at run-time. Thanks for any help!

    Read the article

  • Knowing what input radio is selected on ASP.NET (VB)

    - by AZIRAR
    Hello, I'm creating input radio dynamicly on a ASP.NET page using PlacHolders. While reader.Read Dim ltr As New Literal() Dim ltr1 As New Literal() Dim ltr2 As New Literal() Dim ltr3 As New Literal() Dim ltr4 As New Literal() ltr.Text = reader.GetString(2) & "<br />" PlaceHolder2.Controls.Add(ltr) ltr1.Text = "<form> <input type = radio name=groupe" & i & " value=1>" & reader.GetString(3) & "<br />" PlaceHolder2.Controls.Add(ltr1) ltr2.Text = "<input type = radio name=groupe" & i & " value=1>" & reader.GetString(4) & "<br />" PlaceHolder2.Controls.Add(ltr2) ltr3.Text = "<input type = radio name=groupe" & i & " value=1>" & reader.GetString(5) & "<br />" PlaceHolder2.Controls.Add(ltr3) ltr4.Text = "<input type = radio name=groupe" & i & " value=1>" & reader.GetString(6) & "</form><br /><br />" PlaceHolder2.Controls.Add(ltr4) i = i + 1 End While My problem is : how can I get all the items selected on those input radio.

    Read the article

  • Trigger Backgroundworker Completed event.

    - by fireBand
    Hello, I am trying to display the progress bar(marque) in a separate form (progressForm) while i do some calculation in background. I know the typical way of doing it is to include the calculation in background worker and show progressForm in main thread. This approach how ever will lead to lot of synch issues in my application hence I am showing the progressForm using progressForm.ShowDialog() inside the background worker process. But I need to trigger the Completed event with in the application to close the form. Is this possible? Thanks in advance.

    Read the article

  • From client, force whole page validation

    - by George
    I have an ASP button for which I have set the OnClientClick property to display a javascript confirm message. However, I only want this message to be displayed AFTER all of the client side validations have passed. How can I do this? Essentially, I believe that I need to force Page level validation from the client and then, only if it passes, display the confirmation box.

    Read the article

  • Is there a more concise regular expression to accomplish this task?

    - by mpminnich
    First off, sorry for the lame title, but I couldn't think of a better one. I need to test a password to ensure the following: Passwords must contain at least 3 of the following: upper case letters lower case letters numbers special characters Here's what I've come up with (it works, but I'm wondering if there is a better way to do this): Dim lowerCase As New Regex("[a-z]") Dim upperCase As New Regex("[A-Z]") Dim numbers As New Regex("\d") Dim special As New Regex("[\\\.\+\*\?\^\$\[\]\(\)\|\{\}\/\'\#]") Dim count As Int16 = 0 If Not lowerCase.IsMatch(txtUpdatepass.Text) Then count += 1 End If If Not upperCase.IsMatch(txtUpdatepass.Text) Then count += 1 End If If Not numbers.IsMatch(txtUpdatepass.Text) Then count += 1 End If If Not special.IsMatch(txtUpdatepass.Text) Then count += 1 End If If at least 3 of the criteria have not been met, I handle it. I'm not well versed in regular expressions and have been reading numerous tutorials on the web. Is there a way to combine all 4 regexes into one? But I guess doing that would not allow me to check if at least 3 of the criteria are met. On a side note, is there a site that has an exhaustive list of all characters that would need to be escaped in the regex (those that have special meaning - eg. $, ^, etc.)? As always, TIA. I can't express enough how awesome I think this site is.

    Read the article

  • ASP.NET Custom Control - Template Allowing Literal Content

    - by Bob Fincheimer
    I want my User Control to be able to have Literal Content inside of it. For Example: <fc:Text runat="server">Please enter your login information:</fc:Text> Currently the code for my user control is: <ParseChildren(True, "Content")> _ Partial Public Class ctrFormText Inherits FormControl Private _content As ArrayList <PersistenceMode(PersistenceMode.InnerDefaultProperty), _ DesignerSerializationVisibility(DesignerSerializationVisibility.Content), _ TemplateInstance(TemplateInstance.Single)> _ Public Property Content() As ArrayList Get If _content Is Nothing Then Return New ArrayList End If Return _content End Get Set(ByVal value As ArrayList) _content = value End Set End Property Protected Overrides Sub CreateChildControls() If _content IsNot Nothing Then ctrChildren.Controls.Clear() For Each i As Control In _content ctrChildren.Controls.Add(i) Next End If MyBase.CreateChildControls() End Sub End Class And when I put text inside this control (like above) i get this error: Parser Error Message: Literal content ('Please enter your login information to access CKMS:') is not allowed within a 'System.Collections.ArrayList'. This control could have other content than just the text, so making the Content property an attribute will not solve my problem. I found in some places that I need to implement a ControlBuilder Class, along with another class that implements IParserAccessor. Anyway I just want my default "Content" property to have all types of controls allowed in it, both literal and actual controls.

    Read the article

  • how to read check box in a word document in asp.net

    - by Nataraja
    hi friends present i am working as developes, i want code for the following scenario my scenario is the word document must contain checkbox, and this word document should read to asp.net page, when user click the check box, the selected value should be stored into the database can any one help me

    Read the article

  • Properly obsoleting old members in an XML Serializable class in C# VB .NET

    - by George
    Hi! Some time ago I defined a class that was serialized using XML. That class contained a serializable propertyA of integer type. Now I have extended and updated this class, whereby a new propertyB was added, whose type is another class that also has several serializable properties. The new propertyB is now supposed to play the role of propertyA, that is since type of propertyB is another class, one of its members would contain the value that previously propertyA contained, thus making peroptyA obsolete. What I am trying to figure out is how do I make sure that when I desireliaze the OLD version of this class (without propertyB in it), I make sure that the desreializer would take the value of propertyA from the old calss and set it as a value of one of the members of propertyB in a new class? Private WithEvents _Position As Position = New Position(Alignment.MiddleMiddle, 0, True, 0, True) Public Property Position() As Position 'NEW composite property that holds the value of the obsolted property, i.e. Alignment Get Return _Position End Get Set(ByVal value As Position) _Position = value End Set End Property Private _Alignment As Alignment = Alignment.MiddleMiddle <Xml.Serialization.XmlIgnore(), Obsolete("Use Position property instead.")> _ Public Property Alignment() As Alignment'The old, obsoleted property that I guess must be left for compliance with deserializing the old version of this class Get Return _Alignment End Get Set(ByVal value As Alignment) _Alignment = value End Set End Property Can you help me, please?

    Read the article

  • Timeout not working in SQL Connection

    - by carlos
    I have this simple code to test that a DB is ready: Function testlocalcon() As Boolean Dim constr As String = _clconstr Try Using t As New SqlConnection() constr = constr & " ; Connect Timeout=1" If Not t.State = Data.ConnectionState.Open Then t.ConnectionString = constr t.Open() If t.State = Data.ConnectionState.Open Then Return True Else Return False End If Else Return True End If End Using Catch ex As Exception Return False End Try End Function I do not want to execute a query, just to check the connection, but no matter what the time out parameter is ignored. I search here (Stackoverflow) and internet and found nothing in how to fix this. Any one else have this problem? Or, are there any other ideas on how to let the application know that the DB is ready?

    Read the article

  • How to deserialize an html div when it has certain attributes to it?

    - by user1676874
    For example this: <div class="link_text"> <a href="http://www.stackoverflow.com"> <strong>Text</strong></a> </div> With normal tags like XML ones it is easy, you just create the class with the same name as the tag, so if the tag is: <something></something> you create a class called something, but how would you do this in HTML in an example div such as that one, with a class attribute inside?

    Read the article

  • dotNet Templated, Repeating, Databound ServerControl: Counting the templates OnDataBind?

    - by Campbeln
    I have a server control that wraps an underlying class which manages a number of indexes to track where it is in a dataset (ie: RenderedRecordCount, ErroredRecordCount, NewRecordCount, etc.). I've got the server control rendering great, but OnDataBinding I'm having an issue as to seems to happen after CreateChildControls and before Render (both of which properly manage the iteration of the underlying indexes). While I'm somewhat familiar with the ASP.NET page lifecycle, this one seems to be beyond me at the moment. So... how do I hook into the iterative process OnDataBinding uses so I can manage the underlying indexes? Will I have to iterate over the ITemplates myself, managing the indexes as I go or is there an easier solution? Also... I implemented the iteration of the underlying indexes during CreateChildControls originally in the belief that was the proper place to hook in for events like OnDataBinding (thining it was done as the controls were being .Add'd). Now it seems that this may actually be unnecessary. So I guess the secondary question is: What happens during CreateChildControls? Are the unadulterated (read: with <%-tags in place) controls added to the .Controls collection without any other processing?

    Read the article

  • Raise differing beeps

    - by themaninthesuitcase
    I need to be able to raise different types of audio notifications to the user. I need an "ok" and an "error" type sounds, I was hoping to be able to raise a simple beep and a critical stop type sound but I can only find the Beep() command which doesn't allow for differing sounds. Is there a library that does what I need or will I need to roll my own using the system wavs.

    Read the article

  • How can a property resolve its own name and type with reflection?

    - by Tim Santeford
    Is there a way for a property to access its own name and type at runtime using reflection? I want to access this info without hard coding the name or index of the property in the class. Simple Example Code: Private ReadOnly Property MyProperyName() As String Get Console.WriteLine((Get Current Property Info).Type.ToString) Console.WriteLine((Get Current Property Info).Name) Return "" End Get End Property Expected output: System.String MyPropertyName

    Read the article

  • How do you create a generic method in a class?

    - by Seth Spearman
    Hello, I am really trying to follow the DRY principle. I have a sub that looks like this? Private Sub DoSupplyModel OutputLine("ITEM SUMMARIES") Dim ItemSumms As New SupplyModel.ItemSummaries(_currentSupplyModel, _excelRows) ItemSumms.FillRows() OutputLine("") OutputLine("NUMBERED INVENTORIES") Dim numInvs As New SupplyModel.NumberedInventories(_currentSupplyModel, _excelRows) numInvs.FillRows() OutputLine("") End Sub I would like to collapse these into a single method using generics. For the record, ItemSummaries and NumberedInventories are both derived from the same base class DataBuilderBase. I can't figure out the syntax that will allow me to do ItemSumms.FillRows and numInvs.FillRows in the method. FillRows is declared as Public Overridable Sub FillRows in the base class. Thanks in advance. EDIT Here is my end result Private Sub DoSupplyModels() DoSupplyModelType("ITEM SUMMARIES",New DataBlocks(_currentSupplyModel,_excelRows) DoSupplyModelType("DATA BLOCKS",New DataBlocks(_currentSupplyModel,_excelRows) End Sub Private Sub DoSupplyModelType(ByVal outputDescription As String, ByVal type As DataBuilderBase) OutputLine(outputDescription) type.FillRows() OutputLine("") End Sub But to answer my own question...I could have done this... Private Sub DoSupplyModels() DoSupplyModelType(Of Projections)("ITEM SUMMARIES") DoSupplyModelType(Of DataBlocks)("DATA BLOCKS") End Sub Private Sub DoSupplyModelType(Of T as DataBuilderBase)(ByVal outputDescription As String, ByVal type As T) OutputLine(outputDescription) dim type as New T(_currentSupplyModel,_excelRows) type.FillRows() OutputLine("") End Sub Is that right? Does the New T() work? Seth

    Read the article

  • Add text into a desktop application

    - by John
    Hello, I would like to come up with a simple application that would add a specific phrase into a specific location on a desktop application. I assume this isn't very hard, but I'm kind of new. Any help?? Thanks!

    Read the article

  • Can't get a List(Of <my class>) from a Dictionary in .NET?

    - by magsto
    I have a Dictionary with key of type UInteger and the value is List(Of Session) where the (Public) class Session contains a couple of variables and a constructor (Public Sub New(...)). Some of the variables in my Session class is: Private count As Integer Private StartDate As Date Private Values As List(Of Integer) and a couple of methods like: Friend Sub Counter(ByVal c as Integer) count += c End Sub There is no problem to add values to the Dictionary: Dim Sessions As New List(Of Session) Dim dict As New Dictionary(Of Integer, Sessions) then some code to fill up a couple of Session objects in Sessions (not shown here) and then: dict.Add(17, Sessions) 'No problem Sessions.Clear() Sessions = dict(17) 'This doesn't return anything! The Sessions object is empty even if the code doesn't returned any error. Is my class Session to compex to be stored in a Dictionary?

    Read the article

< Previous Page | 110 111 112 113 114 115 116 117 118 119 120 121  | Next Page >