trying to convert phonenumber to a fixed lenght of bytes.Example: 30172985 phonenumber is 8 byte. But my hardware wants 32 byte size.How do I automaticly insert 0x00 from 8 byte and upwards to 32? [code]
I want it to do is that you input a string, then you select an algorithm (Theres only going to be one RijnDael) then you input a key, then the Initialization Vector comes from "txtIV.text" then you select the key bytes and the block bytes from the numeric up/down, then you either encrypt or decrypt.
Ok i am having some issues designing a base-class to handle generics.Caveat is i need to restrict the type put in as a Numeric type, specifically Int16, Int32, or Int64 (Short or Long).I know you can do Of T as {Structure} but i dont want to select the key bytes and the block bytes from the numeric up/down.
in propertygrid having name property .. How to restrict user only type in name property maximum 50 characters.. how to do this..always user is enter only 50 character ..after enter 51 character don't allow to typing.. This is the code i am adding Item in propertygrid..
<Category("Misc")> <Browsable(True)> <DisplayName("(Name)")> <Description("Indicates the name of the control to identify on the page")> _ Public Property Name() As String Get
I keep getting a ProtocolViolationException "Bytes to be written to the stream exceed the Content-Length bytes size specified." on the following code.I've tried setting Content-Length numerous ways with no success.
Dim url = "https://domain.com" Dim req As WebRequest = WebRequest.Create(url) req.Method = "POST" req.ContentType = "application/xml"
Does it read the entire message string sent by the client? I have a line to write to the stream later in the code and that does not seem to be sending anything back to the client, although the code around is excuting.
i = stream.Read(bytes, 0, bytes.Length) While (i <> 0) Try ' Translate data bytes to a ASCII string.
So I have a string that I need to search through for certain strings. If they exist, then copy that string to a text box. There has to be an easier way to do this then what I have below
Probably missing something silly here, Her eis what my display looks like Sending image...(401303) I would prefer it displays as Sending image...(391 kb)
Private Sub XamMenuItem_DeleteClick(ByVal sender As System.Object, ByVal e As System.EventArgs) Dim selectedRowCount As Integer = Grid.SelectionSettings.SelectedRows.Count If (Grid.Rows.Count >= selectedRowCount) Then While Grid.SelectionSettings.SelectedRows.Count > 0
[Code]...
above code throws me a "Collection was of a fixed size".
If I dim an array to say, 5 elements, should it not fail if I go to add a 6th? I thought this used to require a redim. In .NET 2.0, I have a character array of length = 3. When I populate it from the db, one record had 4 characters in it and it successfully added all 4 characters to the array?
i want to set the default value of a combobox in my edit account module based on the levelofaccesstextbox in my login module but my codes doesn't work here's my code:
Private Sub editaccount_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load If login.LevelofAccessTextBox.Text = "Student" Then With Me.ComboBox1.Items
I have subclassed a control that would be vastly better if it was a certain size. At first, I thought I could simply set the height and width in the constructor. That would annoy people, as the control would be placed on the form at some size, and the size would then shift when the program starts, but it doesn't work anyways because the control constructor is called before the size properties are applied to it. Is there a way to fix the size of a control at design time? The only controls that I can think of that don't have the ability to be sized are pretty highly specialized.
I am having some problems declaring a fixed lenght string in vb.net. I am studying code for using webcam in vb.net, although the code is from vb6 but I am told it works in dot net. Everyting else seems to be working except this line[url]...
suppose i am using 1024X768 old resolution but i want to use that form in 600x400resolution,task is that when any part of form goes outside of that specified 600x400 resolution
I have a windows forms project in VS2010 with a simple line chart.The data is dynamic and always ranging between 1.4000 and 1.5000.I want the Y axis's gridlines/labels to always be displayed on every #.##20 data point, as in: [code] So I tried the Interval property for the axis gridlines/ labels, setting it to 0.002, and the result was that the gridlines/labels were displayed every 0.0020 points, like for example this: [code] but not on 0.0020 points too as shown previously.
I am aware that this is a visual basic dot net post. However It was extremely simple for me to write out a file in VB6 using lines such as the following snippet
[Code]...
I want basically to export an array A (I used zero based array here) with three columns and a particular value B in fixed widths, hence the @@@@@ which means 5 spaces in to a text file defined by the FreeFNum (FreeFileNumber).
I would like to use CSV and all the other formats but some scientific programs written in FORTRAN may not support them. Anyway my file output here needs to be in this fixed width format because it will be used by proprietary software that I have no access to the source code.
I have files that are one long line of text but are made up of individual segments. I have managed to parse the segments into a string array but now need to parse each segment into its individual fields, based upon a field structure defined by the first 2 characters of the segment.For example:
CA12345ABC999999XXPPPPPPPP55 CA segment (CA is first 2 characters of segment) has fields defined as: Field Name,Start,Length
I am trying to create a function that will take a fixed value, and increment another cell. It does this until another cell using a formula equals the fixed value. You can see what I have below, but this is my first VBA programming ever so I dont know exactly how to declare everything.
Function meetMargin(Margin, calcM, nrc) Dim x0 As Double, x1 As Double, x2 As Double, t1 As Double t1 = 0.05 Do While t1 >= 0.01 x0 = Range("Margin").Value x1 = Range("calcM").Value [Code] .....
I don't know if I can do this here...but here goes. I want to generate a unique ID of fixed length The trouble is, the code example I found on the web is in C# (or C maybe) which I know nothing about. I tried a web-based C# to VB.net converter but the result doesn't work so its hard to understand what's going on (especially since I have not worked with bytes either this makes it more difficult).
I need to write an application that does the following, and I figured it was a good opportunity to write my first VB.Net application:
1. Get the list of fixed disks in the computer 2. For each disk, recurse through all its directories and sub-directories looking for filenames that match a given regex (eg. MyFile.d{3}) 3. If found, hash this file to get a unique ID, eg. MD5 (just to check if this file already exists elsewhere) 4. If this file hasn't already been seen elsewhere on the disk, copy it to a central directory