|
Having a weird problem. On some of my forms, my textboxes are appearing flat with a blue border around them instead of fixed3d. My property for the textbox says BorderStyle Fixed3D. I'm using vb.net 2003. Anyone come accross this problem?
"The things that will destroy us are: politics without principle; pleasure without conscience; wealth without work; knowledge without character; business without morality; science without humanity; and worship without sacrifice."
-Mahatma Gandhi (1869-1948)
|
|
|
|
|
Hi,
Standard .net webcontrol Datagrid has some features that standard winform Datagrid has not those. Is there anybody know a free advanced .net winform Datagrid control that can add some fields (runtime), concatenate some fields together, add a control (like button) to some added fields and etc with it? Or any idea? Please help me.
Regards
|
|
|
|
|
search the keyword "DataGrid" in articles .there aremany artivles availabe in this group. I thini it'll help a lot
|
|
|
|
|
Good Morning,
I am working on a file parsing project where I must parse each line of a text file into multiple segments, then parse the segments into fields. Not a huge issue, so I think, using the REGEX functionality.
What I am attempting is to utilze the REGEX.Spilt to split each line into the segments (placing them in an array of strings), then copying that array to a 3-d array (looping as I go).
then finally parsing the segments within the 3-d array into data grids for furhter processing.
My issue is that I cannot seem to move the data from one array to the next
...
While sContent <>"" 'While there is data from the file
ArrayofStrings = oRegex.Split(sContent) '1-d dynamic Array to capture all segments
for j = 0 to 8 'I know the real number of segments
'copy the 1-d arry into the 3-d array
ArrayofStrings(j)(i) = ArrayofStrings2(j)
next j
scontent = oReader.Readline
i += 1
end while
...proceed until fished
UPDATE: Okay, I see one of my issues now. It appears that my 2d-array needs to be bigger than the 1d-array. Is there a way for it to be dynamic or will I be required to know the size first?
Thanks for any assistance you can share.
MTognetti
|
|
|
|
|
Arrays in VB.Net can be created dynamically. The way to do this is when you need to make the array bigger use the ReDim statement. If you want to keep all of the current data in the array and just want to add some more elements you must also add the keyword Preserve. Care must be taken because if you have an array of “Dim myStr(9, 10) As String” you want to add 5 more elements you would execute the statement “ReDim Preserve myStr(9, 15)”. Make sure that the new array is bigger then the old array because if it is smaller the old data will be truncated in the new size. Also on multidimensional arrays the only dimension that can be resized is the right most dimension.
Dim myString( 2, 5 ) As String
…
Some Processing
…
‘ Need to make array bigger by 25 elements
ReDim Preserve myString(2, myString.GetUpperBound(1) + 25)
…
|
|
|
|
|
Thanks. This is what I was looking for.
|
|
|
|
|
New to VB.Net but know VB6.
The question is the following.....
I want a MDI Form with menu options on it. When you select a menu option a form will appear e.g. Employer Form.
In VB6 it was just a case of adding >>>> form.Show in the click event of say the mnuEmployerForm
I must be doing something else but I cannot get this in VB.Net. It would be a great help if you could show the coding. Any ideas where I am going wrong.
Could you also recommend a good sample code site as I feel I am getting lost and need some examples to get started and see how things are done.
|
|
|
|
|
Forms in VB.NET don't work the same way they do in VB6. You can read more about it here[^] on MSDN. Be sure to follow the links at the bottom of the article. You'll find a ton more information.
But, to answer your quesiton:
' Code in Menu handler in Parent MDI Form
Dim myNewChildForm As New mnuEmployerForm
myNewChildForm.MdiParent = Me
myNewChildForm.Show()
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Does anybody know where to get a good tutorial about control development
Thanks Dan
Dan
|
|
|
|
|
If you want to develop the control in VB.Net, let try this book.[^] But if you want to develop ASP.Net control, try to use this book.[^]
A thousand mile of journey, begin with the first step.
APO-CEDC
Save Children Norway-Cambodia Office
|
|
|
|
|
Hi all,
The follwoing code is used to display the statistics of the given '.NET Solution' File.
1. Form Name
2. Controls from Each Form, Etc.,
Design
------
1. Add RichTextBox , 2 Labels, Button, OpenFile, DataGrid class on Form.
Code
----
Imports System.Data.SqlClient
Private Dset As DataSet
Dim _Starts As Integer, _Path As String
Private Sub Button1_Click(...) Handles Button1.Click
Dset = New DataSet()
With OpenFile1
.InitialDirectory = "C:\"
.Filter = ".NET Solution(*.vbproj)|*.vbproj"
If .ShowDialog = DialogResult.OK Then
If Not .FileName.Length > 0 Then
MsgBox("Please Select File Name...!", MsgBoxStyle.Critical, "Warning")
Application.ExitThread()
Else
Label1.Text = .FileName
_Starts = Label1.Text.LastIndexOf("\")
_Path = Label1.Text.Substring(0, _Starts) & "\"
FileCopy(Label1.Text, Label1.Text & ".xml")
RichTextBox1.Clear()
Dset.ReadXml(Label1.Text & ".xml", XmlReadMode.Auto)
Dim i As Integer, strForms As String
For i = 0 To Dset.Tables("File").Rows.Count - 1
If Dset.Tables("File").Rows(i)(1).ToString().ToUpper = "FORM" Then
strForms = Dset.Tables("File").Rows(i)(0)
GetControls(strForms)
End If
Next
Dset.Dispose()
End If
End If
End With
End Sub
Private Function GetControls(ByVal strFormName As String) As String
Dim _FormName As String = strFormName.Substring(0, strFormName.Length - 3) & ".resx"
Dim R As Integer, strControls As String, intDot As Integer, strCtrlName As String
FileCopy(_Path & _FormName, _Path & _FormName & ".xml")
Dim Dset1 As New DataSet()
Dset1.ReadXml(_Path & _FormName & ".xml", XmlReadMode.Auto)
For R = 0 To Dset1.Tables("Data").Rows.Count - 1
intDot = Dset1.Tables("Data").Rows(R)(0).ToString().ToUpper.IndexOf(".")
strCtrlName = Dset1.Tables("Data").Rows(R)(0).ToString().ToUpper.Substring(intDot + 1)
If strCtrlName = "MODIFIERS" Then
strControls &= Dset1.Tables("Data").Rows(R)(0).ToString().Substring(0, intDot) & Chr(13)
End If
Next
Dim strFinal As String
strFinal = strFormName & Chr(13)
strFinal &= "---------------" & Chr(13)
strFinal &= strControls & Chr(13)
RichTextBox1.Text += strFinal
End Function
Notes:
------
- Run the code and select the Button.
- Open file dialog display.
- Select the .NET Solution file name.
I hope the code will help to make documentation of .NET Solutions.
With Regards,
PANDIAN S
pandians@ho.netaccess-india.com
|
|
|
|
|
Instead of posting this in the forums, where it will disappear off the first page in a day or two, write it up in an article and post it. Hardly anyone searches the forums for stuff like this.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Hi,
I am using below code to clear picturebox content, means drawn line but it doesn't work
Code:
Me.picboard.BackColor = System.Drawing.Color.White
Me.picboard.BackgroundImage = System.Drawing.Image.FromFile(Application.StartupPath & "\white.bmp")
If (picboard.Image Is Nothing) Then picboard.Image = New Bitmap(picboard.Width, picboard.Height)
Dim g2 As Graphics = Graphics.FromImage(picboard.Image)
g2.Clear(System.Drawing.Color.White)
Me.picboard.Show()
'g2.Dispose()
But not works
plz help me!!
|
|
|
|
|
picboard.BackgroundImage = Nothing
Regards,
PANDIAN S
|
|
|
|
|
All you need is this:
Dim g As Graphics = picboard.CreateGraphics()
g.Clear(Color.White)
g.Dispose()
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
No need, Please try it.
PANDIAN S
|
|
|
|
|
I have and your method doesn't work to clear the PictureBox.
Private Sub DrawPoints()
' Your method
PictureBox1.BackgroundImage = Nothing
Dim g As Graphics = PictureBox1.CreateGraphics()
' My method
'g.Clear(PictureBox1.BackColor)
g.DrawLine(Pens.Gray, CInt(PictureBox1.Width / 2), 0, CInt(PictureBox1.Width / 2), CInt(PictureBox1.Height))
g.DrawCurve(Pens.Red, Points)
g.Dispose()
End Sub
Using your method, the picture box is never cleared before the curves are redrawn. Using my method, it's cleared every time.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Hello'
I want to creat a way to customize the report design at run time. mean from this user can create his own report design according to organization need.
i.e there is a report to print cheque for bank system. banks have there own cheque layout.
so please guide me to creat a form to customize the report deign using VB.NET.
Thanks in advance
|
|
|
|
|
a=26
how to set b=2?
In c, you can do
b=a/10;
I try
b=CInt(a/10) in VB, and I got b=3. Thank you.
<italic>Work hard, Work effectively.
|
|
|
|
|
In C if “a “ was assigned the value of 2.6 and you executed the statement b=a/10, then b would have the value of 0.26 if it was a double and if b was an integer then it would have the value of 0.
In Visual Basic .Net we have two division operators, the / meaning floating point division and the \ meaning integer division.
Dim a As Double = 12
Dim b As Double ‘ Holds the value of integer division
Dim c As Double ‘ Holds the value of floating point division
b = a \ 5 ‘ b would have the value of 2.0
c = a / 5 ‘ c would have the value of 2.4
I hope this was of some help.
|
|
|
|
|
According to my help document IsKeyColumn is one of the columns returned when you execute a data reader for GetSchemeTable
When I execute this code:
reader = cmdSel.ExecuteReader(CommandBehavior.KeyInfo)
Dim dt As DataTable = reader.GetSchemaTable
While reader.Read()
If dt.Rows(idx).Item("IsKeyColumn") = True then
.
.
.
I get this error on the "If" line
Column 'IsKeyColumn' does not belong to table SchemaTable.
Any help??????
Thanks,
-Len Miller
"If I had eight hours to chop down a tree, I'd spend six sharpening my axe."
-Abraham Lincoln
|
|
|
|
|
As it turns out - I dumped the schematable to see the column names
CONTRARY to my documentation, the column is named "IsKey" not "IsKeyColumn"
grrrmph....
If anyone cares, I attached code that dumps the schematable:
reader = cmdSel.ExecuteReader(CommandBehavior.KeyInfo)
Dim dt As DataTable = reader.GetSchemaTable
Dim schemaTable As DataTable
Dim myProperty As DataColumn
Dim str As String = ""
Dim myField As DataRow
schemaTable = reader.GetSchemaTable()
For Each myField In schemaTable.Rows
'For each property of the field...
For Each myProperty In schemaTable.Columns
'Display the field name and value.
str = String.Concat(str, _
String.Format("[{0}]=[{1}]{2}" _
, myProperty.ColumnName _
, myField(myProperty).ToString() _
, Microsoft.VisualBasic.ControlChars.CrLf) _
)
Next
Next
MessageBox.Show(str)
Thanks,
-Len Miller
"If I had eight hours to chop down a tree, I'd spend six sharpening my axe."
-Abraham Lincoln
|
|
|
|
|
Does anyone know how VB translates extended keycodes (exspecialy on WinXP). When ALT+0176 is pressed, the keycode should be 0xB0 but we get 0xFFFFB0FF instead.
Signed: John R. Shaw
Blast: I must remember to find my password!
|
|
|
|
|
Hi John,
I am in no way a Hex expert, but the similarity of 0xB0 and 0xFFFFB0FF make me wonder if .NET is just specifying a longer format of the same value. dotNET also has several conversion classes that may help in the process, like converting from Hex to Decimal or bit conversions.
Probably of no help, but I hope it sparks some ideas,
Scott Page
|
|
|
|
|
Hi..Can you please tell me how can I shutdown my computer or restart it in VB.net.Please Help!!
Snaker
|
|
|
|