Can't Figure Out The Format For This Operation?
Jun 13, 2012I have an array of a structure and I need to assign an element of this array to a variable of the same type. In vb6 I'd use something like the following pseudo-
View 3 RepliesI have an array of a structure and I need to assign an element of this array to a variable of the same type. In vb6 I'd use something like the following pseudo-
View 3 RepliesI'm trying to convert code from Delphi to .Net. I'm stuck on one line:
//Delphi code ss := Copy(ss, Length(ss), 1) + Copy(ss, 1,Length(ss) - 1); 'vb.net code ss = ss.Substring(0, ss.Length - 1) + ss.Substring(1, ss.Length - 1)
Delphi combines the two substrings, while .Net just concatenate them like a copy.
My programming days are many years in the past - so I'm trying to get back into it. My current problem is as follows - I have a word document that is set up as a mailmerge document that is merged to email (through outlook). The merge records are in an excel spreadsheet (the email address is in a field called EMAIL). My emails are getting rejected by the recipient domain because they're being sent too fast (so they therefore think that they're spam).
I need to create a VB Program that will use the document called MASTER and merge it with the spreadsheet called RECIPIENTS and send via Outlook. However, I need it to send the first 10 emails, wait 10 minutes, send the next 10, wait another 10 minutes and continue cycling through until all of the emails have been sent.
[URL]It is a sub that is meant to add a user to a group in Active Directory. However, I can't seem to figure out how to use it. Here is the code:
''' <summary>
''' Method to add a user to a group
''' </summary>
''' <param name="de">DirectoryEntry to use</param>
[code]....
I'm not sure what to put for the first argument when calling it. For example:
AddUserToGroup(?, User, Group)
I am trying to write a program where every 30 seconds a jpg file is put in a PictureBox object. So far I am only able to get 1 jpg file every 30 seconds - twice - that is only 2 jpg files and not say 30 jpg files.
View 5 RepliesI have two text boxes, submit button. and a dropdown list with the items(even, odd, and all). I want to calculate the sum of either all "Even", "Odd" or "All" numbers according the selection. In the code below, I have the "all" section working correctly but I'm trying to figure out a way to get the Even and Odd to work.
Some one suggested me to develope a good formula for determining whether a number is even or odd, then calling that from within the program as needed. I've tried that below with the IsEvenNumber function but got stuck. Protected Sub btnSubmit_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnSubmit.Click
[code]...
Below is the code im using to select fields from a table.I have 6 labels on a form. I want each label to have the value of the field selected.
Example,
I have a label named lblTeacher on the form. Because i'm selecting the Teacher field from the table in the OLE string, i want to be able to assign the value of that to the label. This is the same for all the other fields selected. How would i manage this?
[code...]
i have my project working fine in vb6,,but when i try to convert it ..well you know what happens 99.9% of the time.Anyhow all i have been able to get working is the code below.which basically just throws a textbox up onto the listview where ever the mouse is clicked at..but i can't figure out how to get it to lock into any of the cells,columns etc.can someone just show me the simplest way to get the textbox to lock into the cell that the mouse clicks on..or subitem etc.I have no more hair to pull out..I'd start pulling teeth..but I'm already passed that option too
[Code]...
I'm trying to figure out the 'bytestowrite' command, but I'm not having much luck.I'm sending some info over COM1 to and LED sign, and since it runs at 300 baud it takes a minute or so to transfer. I was trying to use the 'bytestowrite' command to find out how many bytes still needed to be sent, and use that info with a progress bar, but I'm always getting 0 when using 'bytestowrite'
Below is the code I tried to get the bytes left to write into a label box, but I've probably got it wrong (but I like to try to figure things out before I ask for help).
Private Sub Timer2_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer2.Tick
Using com1 As IO.Ports.SerialPort = My.Computer.Ports.OpenSerialPort("COM1", 300, Ports.Parity.None, 8, Ports.StopBits.One)
Label1.Text = com1.BytesToWrite
[code]....
I thought putting it in a timer would keep checking the com port to see if there were any bytes to be written, but it always shows 0.
I cannot figureout to which class ItemStatus should link to!please refer to my blog in the following link to detail description of the issue
View 2 RepliesI am currently using Florian Leitner's HID USB library in my VB.NET solution for communicating with a pin pad. As per his sample code, I set up an event handler to handle incoming responses from the device which are stored in an ArrayList called usbBuffer:
View 1 RepliesI cannot get my hands on any "save" or "save as" code to figure it out, can anyone point me in the right direction?
usiing VisualStudio 2008 vb.net
Brenton W Garman
I am trying to work out an ASCII protocol and I have managed to parse everything I need from the transmission, but have not been able to figure out bytes 14-17 and byte 20 of the response. Here is a transmission packet in Hex.
[Code]...
I need to figure out the time between timestamps and then average that time by the number of timestamps. Not sure how to go about this...
View 13 RepliesI found this code on here while doing a search and would like to be able to use it but it was written in C and I dont know much about that (don't know that much about VB.NET either but trying to learn)[code]What I do have is a text box where a user enteres a desired number of US dollars to convert to three types of currency.I know how to convert the string entered to an integer so the calculation can take place. What I don't know how to do is modify the above code so that the results will show up in the correct text boxes after each calculation (yes I know I have to convert the integer back to text).If someone could show me how to do the first Select Case I can figure the rest out.
View 12 RepliesI have a string with some custom formula like FVAL("A")+FVAL(B). I want to figure out all string inside FVAL() which does not have quotes around it.
So basically I want to extract out B because it does not have quotes around it.
No errors are given in either first or second code besides theinputbox whats wrong here ?
1:)
Dim readings(-1) As integer
2:)
[code].....
I'm Jojo and i'm developing a program to help ppl in WoW.There's just 1 function which I can't manage to figure out, the program has to switch to the WoW window when I click a button.
View 19 Repliesi need to draw a figure around a panel (so with the method startfigure and close) with different dimension and colors, but i don't know how to do.
View 9 RepliesI've been going through a VB book I had while in College, and was trying to figure out different ways of making programs work.One assignment was to create a multi-dimensional array to figure out wind chill factors. The only part I really can't get to work right is using 2 numericUpDown controls. Using 2 dropdown menus was obviously easy because the items are indexed, but as far as I know, numericUpDown controls are not indexed.
Instead I used 2 selectCase statements to determine the index in each updown control, then passed the indexes to a function to determine the answer.The numericUpDown controls both increment by 5, (wind from 5 to 30) (temp from -20 to 15)Just looking to see if someone has any ideas of a better way of doing this.
[Code]...
I've got a form that's supposed to position itself at the far right edge of the screen, and stretch in height to fill the whole heigth of the working area.Nothing too strange about that, and so I wrote a solution using Screen.WorkingArea.Height, which worked fine as long as I ran locally. The snag is that in production the form is run in a Citrix environment, and it seems to completely ignore the taskbar height. In Citrix Screen.WorkingArea.Height returns the exact same value as Screen.Bounds.Height - thus stretching itself under the taskbar.My idea is to use Screen.Bounds.Height (as that seems to be returned correctly) and subtract the taskbar height on my own. Only problem is the only examples I can find on how to do this involve Screen.Bounds.Height - Screen.WorkingArea.Height.
View 1 RepliesI have got the program to record from the microphone and save it, while this works fine, what im trying to figure out is when the program is recording the voice of the user i would like it to display this in a ProgressBar to show the input moving up and down and the user speaks? any help would be apriciated.
Here's My full source
[code]...
I'm just trying to figure VB out from a couple tutorials. I thought I was doing this right, but apparently not. Can anone tell me what it is?Public Class Form1 Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Dim g As Graphics = Me.CreateGraphics() g.DrawLine(Pens.Black, 0, 0, 50, 50) End Sub End Class
View 4 RepliesI am trying to filter a dataset by adding together numbers within a specified field (say field1) within the dataset until i reach a specified number.
The filtered dataset should either be precisley equal to the number or most likley less than. In short if a row exceeds the number it should revert to the previous record.
I have no probs with general filtering and using data adapters to access the data. But im struggerling with the loop side of things.
i made a program in which you put in a number like 10, and there are 10 cards. If you put in a number like 23, here is a possible output -
Card #1 - 3
Card #2 - 20
the rest 0
etc, where all the cards values adds up to the number you submit (the values displayed will be random)
The thing is, when i do a number below 10,000, it will come up as one card equaling that number and the rest equaling zero. If i do it a number 10,000 or larger, it will split it like it is supposed to.
[Code]...
interestingly, if you put in a break point, it works like it is supposed to!
What is going on? And why does it matter the size of the number for it to matter?
When i get home i'll edit this with screenshots.
i think this is the right place to post this.i am just learning vb and have spent the last week trying to figure out directx. im using visual basic 2008. i have installed directx i got it to render a blank screen but i cant get it to draw anything. what i have is a program that collects gps coordinates and i want to plot them to screen. i got it to work using gdi+ but i wanted a 3d view. i want a view like a tomtom(without Map) and draw a line where i have been.
this is what i have for creating a vector to plot i think it is creating the vector ok. when i stop in debug and mouseover there is data in it (ie x,y,z Coordinates). i think it is drawing i think i just am not "looking at it"
[Code]...
i was wondering how i can make a simple program that when for eg a user enters 4 it gives this figure **** and so i want that if the user enters 5 it gives ***** etc.
View 9 RepliesI would like to draw a figure like this. But i do not know how to start drawing it. What i could do is simple mathematics calculation, display something in a label and taking some values from a textbox.
View 18 RepliesI want to have a stick figure kind of person who moves around with the arrow keys, and i want to have him move in different positions depending on what key is pressed. What is the best way to acomplish this without using pictureboxes?
View 4 RepliesI'm in need of some help trying to figure out the RegEx formula for finding the values within the tags of HTML mark-up like this:
<span class=""releaseYear"">1993</span>
<span class=""mpaa"">R</span>
<span class=""average-rating"">2.8</span>
<span class=""rt-fresh-small rt-fresh"" title=""Rotten Tomatoes score"">94%</span>
I only need 1993, R, 2.8 and 94% from that HTML above.