|
|
http://users.telenet.be/voorbeeld/vb.JPG[^]
how can i create somthing like this in visual studio 2008
i don't find nothing for doing this like the exampel and i don't want to use 100's off button's any help or direction
T'hanks
|
|
|
|
|
I am not going to follow a link from someone I do not know. This is no reflection on you, just a rule I have.
Therefore can you describe what you are trying to do?
Henry Minute
Do not read medical books! You could die of a misprint. - Mark Twain
Girl: (staring) "Why do you need an icy cucumber?"
“I want to report a fraud. The government is lying to us all.”
|
|
|
|
|
i try to explain
you have 14 Squares with 42 numbers in it
you can select 6 numbers at eatch Square
if you do this with buttons you have 588 this is big
is there a other way to do this
t'hanks
|
|
|
|
|
As Luc has said below, I would simply draw lines to represent the squares and use the Graphics.DrawString() method to 'paint' the numbers in each square.
Again, as Luc has said, you could use a Panel and add the code to do the above to the Paint event handler of the Panel .
Henry Minute
Do not read medical books! You could die of a misprint. - Mark Twain
Girl: (staring) "Why do you need an icy cucumber?"
“I want to report a fraud. The government is lying to us all.”
|
|
|
|
|
Things like that I create by code, and not through Visual Designer.
So get a Panel, and add stuff to its Paint handler for drawing the squares and the numbers.
Decide on a data structure to keep track of the numbers you want marked.
Good luck with our lottery!
Luc Pattyn
I only read code that is properly indented, and rendered in a non-proportional font; hint: use PRE tags in forum messages
|
|
|
|
|
Hello,
I have 15 textboxes ( textbox1 => textbox15).
After calculating the values, i want to clear them with a single press on a button:
I tried:
For Each ctl As Control In Me.Controls
If TypeOf ctl Is TextBox Then
ctl.Text = ""
End If
Next
but it won't work. What am I doing wrong?
Thanks in advance
Luc
|
|
|
|
|
hi
dim arratxt as object = {textbox1,textbox2textbox3,textbox4,textbox5, ... textbox15}
for i as integer = 0 to arratxt.length
arratxt(i).text=""
next
|
|
|
|
|
Putting object to an array initializer?
|
|
|
|
|
|
That doesn't work
See following error:
Error 1 Array initializers are valid only for arrays, but the type of 'arratxt' is 'Object'.
|
|
|
|
|
this is for 3 textbox
Dim ObjArray() As Object = {TextBox1, TextBox2, TextBox3}
For i As Integer = 0 To ObjArray.Length - 1
ObjArray(i).text = ""
Next
|
|
|
|
|
This works;
Dim xTextBox As TextBox = Nothing
For Each xObject As Object In Me.Controls
If TypeOf xObject Is TextBox Then
xTextBox = xObject
xTextBox.Text = ""
End If
Next
|
|
|
|
|
He still doesn't clear anything of my textboxes
|
|
|
|
|
Who doesn't?
I chucked some text boxes and a button on the form, the text boxes had random text in them, the code above is in the button click event.
It works for me! Did you try what i posted?
|
|
|
|
|
Yes, i copied into the button click event. But nothing happened
Could it be a problem that my textboxes are also inside a groupbox?
|
|
|
|
|
no problem
no defrence
Dim ob() As Object = {TextBox1, TextBox2}
For i As Integer = 0 To ob.Length - 1
ob(i).text = ""
Next
|
|
|
|
|
Yes, but you didn't state that in you original problem statement!
change it to;
Dim xTextBox As TextBox = Nothing
For Each xObject As Object In Me.GroupBox1.Controls
If TypeOf xObject Is TextBox Then
xTextBox = xObject
xTextBox.Text = ""
End If
Next
|
|
|
|
|
THanks, this worked. I forgot also the "1" after groupbox. Thanks
|
|
|
|
|
|
What you gibbering on about now! Didn't see you fixing his problem! just filling thread with cr@p.
Looks like someone has been uni-voting you this morning, can't understand why.........
|
|
|
|
|
hi every body,
how to display categories by tree view
i am read my data from database (acesss)
my table is :
filds:
CategoryId - Root - CategoryName
1 0 country
2 1 city
3 2 school
4 3 class 102
5 4 Chair
6 5 leg
thank you very match before your ansewer .
please hury up ... help
|
|
|
|
|
miladbiranvand wrote: please hury up
NO !!!!!
Steve Jowett
-------------------------
Real programmers don't comment their code. If it was hard to write, it should be hard to read.
|
|
|
|
|
|
I have a table in the following format and I want to create a form with a tree view control to display the data to the end user.
All the rows with LeafCategory is 0 have children. Leaf category 1 means its last category. i.e not expandable.
In the following example category id 20081 is the Main category. A category is considered main category when the CategoryID and CategoryParentId are same.
CategoryId 's 37903 and 4707 are children of 20081. 37909, 63516, 37911 are childen of 4707... etc.
I don't want to write a sql statmet for each node to find out the childen. I'm looking for a solution with arrays, hash table .. etc. VB.NET
CategoryId CategoryLevel CategoryName CategoryParentId LeafCategory
----------- ------------- -------------------------------------------------- ---------------- ------------
20081 1 Antiques 20081 0
37903 2 Antiquities (Classical, Amer.) 20081 0
4707 2 Architectural & Garden 20081 0
37909 3 Ceiling Tins 4707 1
63516 3 Chandeliers, Fixtures, Sconces 4707 1
37911 3 Hardware 4707 0
37912 4 Door Bells, Knockers 37911 1
37913 4 Hooks & Brackets 37911 1
37914 4 Knobs & Handles 37911 1
|
|
|
|