how i can draw diamond with VB code by stars and i must use "for - next" ??
361581
Create a form with textbox named 'txtDiamond' and give it the following settings: 'MultiLine = True', 'ScrollBars = 2 - Vertical'\n\nThen copy the following code within Either Form_Load() or another subroutine in which you would like to generate the row. The following code is dynamic, and allows you to create diamons with the amount of rows being odd or even. I expect alot of points cuz i had to write this myself ;).\n\nHere it is:\n\n    Dim RowCount As Long\n    Dim Row As Long\n    Dim Stars As Long\n    Dim MiddleRow As Long\n    Dim SpaceCount As Long\n    Dim X As Long\n    \n    RowCount = 11\n    MiddleRow = Round((RowCount / 2) + 0.1, 0)\n\n    Stars = 1\n    \n    For Row = 1 To RowCount\n        If Row = 1 Then\n            txtDiamond = String((RowCount + 1) - Stars, " ")\n        Else\n            txtDiamond = txtDiamond & vbCrLf & String((RowCount + 1) - Stars, " ")\n        End If\n        For X = 1 To Stars\n            txtDiamond = txtDiamond & "*"\n            txtDiamond = txtDiamond & " "\n        Next X\n        \n        If Row < MiddleRow Then\n             Stars = Stars + 1\n        ElseIf Row = MiddleRow Then\n            If InStr(1, (RowCount / 2), ".") > 0 Then\n                'Odd\n                Stars = Stars - 1\n            End If\n        Else\n             Stars = Stars - 1\n        End If\n        \n    Next Row
1017649
Sounds like the Dewey Decimal System done in Visual Basic, to me.!
268014
There are function like GetChunk and AppendChunk that can be used for this purpose\nsee the detailed code here http://www.vb-helper.com/howto_database_picture.html
178173
Simply put the numbers 1 through 4 on the die, repeating two of the numbers. Is there a further requirement that you haven't given ?
987285
It's called ASCII code... but can be written into art, instead of programmes.\n\nlike a rabbit...\n\n(&#92;__/)\n(+'.'+)\n(")_(")
853215
Use DirectX!!! the only way to go! \nThere are a lot of examples on msdn\nhttp://www.vbcode.com/\nhttp://www.a1vbcode.com/\nand other sites like that
1056394
Try this link from Planet Source Code. It's in C++, but you should be able to convert it to C:\nhttp://www.planetsourcecode.com/vb/scripts/ShowCode.asp?txtCodeId=5602&lngWId=3
531174
I cant remember the commands off the top of my head, but you need to create a pen, (CPen mypen;), then select a color (using mypen.SetColor(0xff0000)?), then attach it to the text box.
1004428
' Spiro.bas\n'\nDECLARE SUB MoveTo (x AS DOUBLE, y AS DOUBLE)\nDECLARE SUB Spiro (ns AS INTEGER, nw AS INTEGER, nt AS INTEGER, d AS INTEGER, spos AS INTEGER, x AS DOUBLE, y AS DOUBLE, col AS INTEGER)\nDECLARE FUNCTION HighestCommonFactor (a AS INTEGER, b AS INTEGER)\n'\n' TEST ROUTINE\nDIM s AS INTEGER ' loop counter\nDIM col AS INTEGER ' Drawing color\nDIM r AS INTEGER, spos AS INTEGER, x AS DOUBLE, y AS DOUBLE\n\n    SCREEN 9 ' Set screen mode to 640x350, 16 colors\n    x = 320 ' or Max x coordinate / 2\n    y = 175 ' or Max y coordinate / 2\n    col = 1\n    diam = 2    ' Diameter of drawing wheel\n    spos = 100  ' Starting position\n    FOR b = 1 TO 12 ' Draw 12 spirographs\n        Spiro 360, 120, 360, r, spos, x, y, col\n        r = r + 2               ' increase distance from centre of drawing wheel\n        spos = spos + 10        ' increase starting position\n        col = col + 1           ' next color\n    NEXT\n    END\n\n' Draw the loci of a point on a circle revolving inside\n' another circle, or a circle revolving round another circle.\n' Parameters:\n' ns,   No. teeth in stationary part (-ve = outside)\n' nw,   No. teeth in wheel (-ve = clockwise)\n' nt,   No. of teeth to 'do'\n' r,    Radius\n' spos, tooth to start at\n' x, y  Coordinates of centre\n' col     Drawing color\nSUB Spiro (ns AS INTEGER, nw AS INTEGER, nt AS INTEGER, r AS INTEGER, spos AS INTEGER, x AS DOUBLE, y AS DOUBLE, col AS INTEGER)\n DIM n1 AS INTEGER, n2 AS INTEGER, i AS INTEGER, n AS INTEGER, no AS INTEGER\n DIM a AS DOUBLE, b AS DOUBLE, alpha AS DOUBLE, beta AS DOUBLE\n DIM offang AS DOUBLE, dab AS DOUBLE, adif AS DOUBLE, aob AS DOUBLE\n DIM x1 AS DOUBLE, y1 AS DOUBLE, x2 AS DOUBLE, y2 AS DOUBLE\n DIM PI AS DOUBLE\n\n    PI = 3.141592658979324#\n    n1 = ABS(ns): n2 = ABS(nw)\n    a = n1 / (2# * PI): b = n2 / (2# * PI)\n    IF ns < 0 THEN\n        dab = a + b: r = -r\n    ELSE\n        dab = a - b\n    END IF\n    \n    offang = (spos - 1) * 2# * PI / n1\n    alpha = 0#: adif = PI / n1: aob = a / b\n    n = (n2 / HighestCommonFactor(n1, n2))\n    no = 2 * n * ABS(nt)\n    x1 = dab + r: y1 = 0#\n    x2 = x1 * COS(offang) + x: y2 = x1 * SIN(offang) + y\n    MoveTo x2, y2\n    FOR i = 0 TO no - 1\n        IF nw < 0 THEN alpha = alpha - adif ELSE alpha = alpha + adif\n        IF ns < 0 THEN beta = -alpha * aob ELSE beta = alpha * aob\n        x1 = dab * COS(alpha) + r * COS(alpha - beta)\n        y1 = dab * SIN(alpha) + r * SIN(alpha - beta)\n        x2 = x1 * COS(offang) - y1 * SIN(offang) + x\n        y2 = x1 * SIN(offang) + y1 * COS(offang) + y\n        ' setcolor(col); lineto(x2, y2)\n        LINE -(x2, y2), col\n    NEXT\nEND SUB\n\n' MoveTo x, y\n' For QBasic\n' For other languages, replace or omit\nSUB MoveTo (x AS DOUBLE, y AS DOUBLE)\n DIM dr AS STRING\n    dr = "BM " + STR$(INT(x)) + "," + STR$(INT(y))\n    DRAW "X" + VARPTR$(dr)\nEND SUB\n\n' Highest common factor  - Euclid's algorithm\nFUNCTION HighestCommonFactor (a AS INTEGER, b AS INTEGER)\n DIM i AS INTEGER, j AS INTEGER, r AS INTEGER\n    IF a > b THEN\n        i = a: j = b\n    ELSE\n        i = b: j = a\n    END IF\n    r = i &#92; j\n    WHILE (r <> 0)\n        i = j: j = r: r = i &#92; j\n    WEND\n    HighestCommonFactor = j\nEND FUNCTION
881651
I'm guessing when it says all the pieces have to be inserted at 0,0,0 the pieces it refers to are pre drawn blocks (parts of the table will be drawn separately and saved as separate drawings). To do this you go to insert - blocks, then browse for the particular pre drawn block. \nTilemode to paper space is the command line way of jumping from the model tab to the layout tab at the bottom of the drawing area. You can do this by clicking the tabs at the bottom of the drawing like an excel worksheet.\nThe two mviews piece refer to creating viewports in the layout tab so you can see the model your have drawn...to do this make sure you are in the layout tab and click on View - Viewports - 2 viewports, two windows will now appear in the drawing with the same view of the table. \nAssuming the table was drawn correctly double click the area within the first view port and the click on View - 3d Views - Top, this will give you the plan view of the table, adjust the scale to suit. Then double click within the second viewport and the go to View - 3d Views - Isometric (there are 4 to chose from) this will give you your isometric view. Again adjust the scale to suit. Click outside both the view ports to return to the layout space\n\nI hope this helps, if you need any further assistance please feel free to email me.
209872
I already answered this for you in your other thread, using Visual Basic. With a little effort, you ought to be able to convert one type of Basic to another. The languages are virtually identical.\n\nOnce again, what you need to do is create a function. Let's call it DozenBetType. It is going to take one argument: an integer: DozenBetType(someInteger)\n\nThe function is going to return:\n1 if the number passed to it is 1-12\n2 if the number is 13-24\n3 if the number is 25-36\n\nThen you can simply call the function on both the number guessed and the number your program has generated.\n\nFor example, if the number your program generated is declared as intResult, and the number the person guessed is declared as intGuess:\n\nif DozenBetType(intGuess) = DozenBetType(intResult) then they have won the bet, otherwise they have not. (A simple if-then-else statement\n\nIf you don't want to use a function, or if that's too complicated for you, you can declare two new variables: intDozenTypeResult, for the number your program generated and intDozenTypeGuess, for the number your user guessed.\n\nSet intDozenTypeResult to be 1 if the program's random number is between 1-12, set it to be 2 if the value is 13-24, set it to be 3 if the value is 25-36. \n\nDo the same thing for intDozenTypeGuess.\n\nThen, simply compare those two variables:\n\nIf intDozenTypeResult = intDozenTypeGuess then they have won, otherwise they have not (again, a simple if-then-else statement).\n\nPlease, don't create new threads for the same question. Just update your old question.
1151425
it's been a while since i've used VB but give this a try\n\nIF (listbox.listitem[0].selected) AND (listbox.listitem[1].selected) THEN\nEND IF
532389
I tried to draw you one in MS Paint, but it didn't turn out too good... go here instead\nhttp://www.beyondlogic.org/keyboard/keybrd.htm
784164
sure you can use that syntax and it's correct this way:\nwrite(arraylist[x]);\nusualy this is used with a for clause\nfor i:=0 to n do\n write(arraylist[i]);\nbut if you put a pice of code when ur using this i can help you fix your errors.
550882
You can do it in a table\n<table border=1>\n<tr>\n<td>\n<img....>\n\nOr you can use a program like Fireworks or Photoshop that have plugins to do it for you.
505449
Use MSPaint.\nAnd do the free form select.
351984
If you have microsoft word...on the DRAWING toolbar there is an opiton to draw an oval. Hope this helps.