Search results

  1. A

    Resolved hashset to remove items

    My question. I have hs as hashset(of integers) And always f.e. with items 57,54,51,43,28,26,5,4 , the numbers are always ordered from high to law How can I delete on the most fast way all the numbers starting from 51 to the last number Thanks for any response
  2. A

    dictionary, item ad random

    My question, can I reach ad random an item in my dictionary? And take then the value of the key of that item something like : dim n as integer = rand.next(1,mydic.count +1) or another way
  3. A

    Question why format changing ?

    Why do I receive another format and how can I make it good? Dim a As Double = 5.126 Dim w As String w = CStr(a) ' w = 5,126 not good I have to get w = 5.126 Thanks for any response
  4. A

    Question sorting lists

    I have a list of strings. These strings are f.e. 5,8...a,k... When I sort then 5,8... is placed before a, k... Can I sort the list so that I get a,k,...,5,8.. Thanks for any response.
  5. A

    Question power of biginteger

    To get a power of a biginteger is easy : result = numerics.biginteger.pow(bignumber,6) But how can I get the result if the power is not 6 but 0.238 , numerics.biginteger.pow(bignumber,0.238) ? Thanks for any response
  6. A

    Question big floating numbers

    It was not possible to me to get a floating number result using biginteger or using what? f.e. the division 123456789123456789123456789123456789/987654321 I want some result like 874587964569874568.36521457885476 Is it possible?
  7. A

    Question to draw polygon

    I have a array of points with coodinates (ar can have f.e. 200 points) ar(1,0) = 1 ar(1,1) = 10 ar(2,0) = 5 ar(2,1) = 15 .. .. where point1 x = 1 y = 10 point2 x = 5 y = 15 How can I draw the polygon with these points f.e. for i = 1 to ar.getupperbounds(0) ?? next g.drawpolygon(??? I can...
  8. A

    Question random item in list

    Suppose I have 50 items in a list. nr (random value) Can I take item nr = 37 ? Thanks for any response
  9. A

    Question distances between chars

    Let us take Dim reeks1, reeks2 As String reeks1 = "11111" reeks2 = "1111111111" reeks1 = reeks1 & Space(30 - reeks1.Length) & "?" & vbCrLf reeks2 = reeks2 & Space(30 - reeks2.Length) & "?" MessageBox.Show(reeks1 & reeks2) Using fs As New...
  10. A

    Question threading

    Hi, I am totally new in threadings. Normally, without threading, when I do calculations I want to see the intermediate results during the calculations. Therefor I use the method : For keer = 1 To 40000000 If keer Mod 2000 = 0 Then Application.DoEvents() Form1.Label2.Text = minsom.ToString...
  11. A

    Question problem with streamreader

    I use streamreader to read a textfile. That textfile contains extended ascii letters The string variable that is read bij streamreader is not readed as them It is a encoding problem but how to solve it? Thanks for any response.
  12. A

    Question copy selected items in listbox

    I selected several items in a lisbox. How to copy? It seems that Ctrl C is not possible.
  13. A

    Question click buttons

    I have a matrix of buttons and I want by clicking any button to set a text (1 letter) in the button like something : (matrixbut(i,j).text = inputbox(... The sub : Public Sub makebuttongrid() Dim i, j As Integer myFont = New System.Drawing.Font("Arial", 11, FontStyle.Bold)...
  14. A

    Question button in runtime

    I am trying to make a button in runtime but the button is not to see in de form1.vb I put dim but as new button Private Sub Form1_Load(sender As System.Object, e As System.EventArgs) Handles MyBase.Load but.Left = 100 but.Top = 100 but.Width = 20 but.Height =...
  15. A

    Question to scroll a listbox

    Maybe simple question but I do not know the answer. In my program is filling a listbox with words and I want to scroll the listbox because there are many words. And then I have to put in a choosen word in a inputbox but I can not scroll the listbox because the inputbox is already waiting for a...
  16. A

    Question font in streamwriter

    In my program I use filestream and streamwriter to write text to a textfile. How can I set the text to a font that I want like courier new? Thanks for any response
  17. A

    Question increasing the stack

    I have a recurse function for sorting a big array. But the stack is to small because I get a message stackoverflow. When the array is smaller there is no message and the array is sorted. How can I make the stack bigger? Thanks for any response.
  18. A

    Question leaving textbox

    My program has a textbox. When typing something I want to leave the textbox by the enter button and setting the focus and the cursor to another textbox. How to do? Thanks for response.
  19. A

    Question read text file

    Hi, I want to read a text file with some letters like ? ? ... I do it with using streamwriter and put it in a string array but those letters are something else. I think it had to do with the ascii code and others. How to solve it? Thanks for any response. Andrews
  20. A

    Question Decimal Double conversion?

    Hi, Dim db As Double = 1509736837875804.0 Dim dc As Decimal = 1509736837875804D Dim dbconv As Decimal = CDec(db) MessageBox.Show((dbconv - dc).ToString) Why do I get -4 ?
Top Bottom