|
But doing this , i have only one textbox on node and i want more than one textbox associated with each node. what to do?
TC
|
|
|
|
|
|
is it posible to add more than one textbox horizontally with each node? if yes then how?
TC
|
|
|
|
|
I had created application using VB 6.0 and Crystal report 8.5.
I want to install this application on client system, which does not have VB 6.0 and crystal report installed.
For VB application I will use deploymnet and package wizard.
But for crysatal report - how can I create set up.
Yor help is appreciated.
Thanks in Advance.
Kumar
-- modified at 3:25 Sunday 12th November, 2006
|
|
|
|
|
Good Day everyone,
i would like to ask for you help guys, i want to create a programs about
the circle packing, but dont know how to start with this, how can i draw equal circle without overlapping inside a bigger circle, i googled it but the result is discrete mathematics, im not a "math guy", so i cant understand those symbols..:=), thanks in advance for your help.. and GOD BLESS...
Kenshee
|
|
|
|
|
You'll want to use methods exposed from the Graphics Class[^] in the System.Drawing namespace.
Below is a quick sample I threw together - is this what you mean? Paste this code into a new form & run it.
Public Class Form1
Private Sub Form1_Paint(ByVal sender As Object, _
ByVal e As System.Windows.Forms.PaintEventArgs) _
Handles Me.Paint
'draw three circles over each other
e.Graphics.FillEllipse(Brushes.Red, New Rectangle(0, 0, 300, 300))
e.Graphics.FillEllipse(Brushes.Blue, New Rectangle(25, 25, 250, 250))
e.Graphics.FillEllipse(Brushes.Green, New Rectangle(50, 50, 200, 200))
'dispose of the graphics object
e.Dispose()
End Sub
Private Sub Form1_Resize(ByVal sender As Object, _
ByVal e As System.EventArgs) Handles Me.Resize
Me.Invalidate()
End Sub
End Class
|
|
|
|
|
may i know the way to fill the data from database to the combobox?
for datagrid the code is
datagridname.setDataBinding(dsStu, "StuTable")
then how about the combobox?
|
|
|
|
|
Create & fill a dataset object then use the combobox's DataSource and DisplayMember properties display data from the dataset.
|
|
|
|
|
|
Here is one way of binding data in combo box:
In code behind:
Dim ds As New DataSet
ds = class_Ratetype.ComboRateDisplay()
Dim dvs As New DataView(ds.Tables(0))
If dvs.Count > 0 Then
Me.ComboRoomType.DataSource = dvs
Me.ComboRoomType.DisplayMember = "Roomtype"
Me.ComboRoomType.ValueMember = "Roomtype_Id"
End If
End Sub
Class file content for this:
Public Function ComboRateDisplay() As DataSet
Dim constr As String = SqlHelper.GetConnectionString()
Dim conn As New SqlConnection(constr)
Dim cmdSQL As New SqlCommand("SP_COMBORATEDISPLAY", conn)
Dim da As New SqlDataAdapter
Dim ds As New DataSet
Dim dv As New DataView
cmdSQL.CommandType = CommandType.StoredProcedure
conn.Open()
da.SelectCommand = cmdSQL
da.Fill(ds, "TBL_Roomtype")
ComboRateDisplay = ds.Copy
da.Dispose()
If (Not conn Is Nothing) Then
conn.Close()
conn.Dispose()
End If
GC.Collect()
End Function
For ur reference:
class_Ratetype ---> object for class file
ComboRoomType ----> combobox name
Roomtype ----> Display member
Roomtype_Id ----> Value member
SP_COMBORATEDISPLAY --> Stored procedure
TBL_Roomtype ----> Table name
Janani
|
|
|
|
|
I always do it like this:
comboBox1.DataSource = dtTable<br />
comboBox1.DisplayMember = "FieldToDisplay"<br />
comboBox1.ValueMember = "FieldContainingValue"
|
|
|
|
|
private sub num_KeyPress (ByVal sender......blah blah....)
If e.KeyChar < "0" or e.KeyChar > "9" then
e.handled = true
end if
end sub
can someone plz help iam only using the numbers and want to include the backspace button as well...
|
|
|
|
|
Try this:
...
If (e.KeyChar < '0' Or e.KeyChar > '9') And e.KeyChar <> '\b' Then
...
Additionally if using .NET 2.0 probably it would be better if you used PreviewKeyDown event:
Private Sub num_PreviewKeyDown(ByVal sender As Object, e As PreviewKeyDownEventArgs)
e.IsInputKey = ((e.KeyCode = Keys.Back) And (e.Modifiers = 0)) Or ((e.KeyCode >= Keys.D0 Or e.KeyCode <= D9 Or e.KeyCode >= Keys.NumPad0 Or e.KeyCode <= Keys.NumPad9) And (e.Modifiers = 0))
End Sub
This way you can handle key combinations like Alt + 0, Ctrl + Backspace, etc.
If using .NET 1.1 then use KeyDown to set a flag and check the flag value on the KeyPress event to set the Handled property.
- Xint0
|
|
|
|
|
Hi, In Vb6 if I want to write a any program that working with an operating system (example: checking the memory status, size...) I have to work with windows api. If I work with vb.net 2003, what is the technique that I use to work with windows like vb6?
|
|
|
|
|
|
I have a deadline and I need some help!
1. Is there a way in VB that you can access the computer's default programs (i.e. Browser, E-Mail etc.), and if so, how do you access it to open it.
2. I have tried everything but a Marquee progress bar does not work. It justs sits there. The code I'm using is:
<br />
Private Sub Prog_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load<br />
<br />
StatProgBar.Enabled = True<br />
StatProgBar.MarqueeAnimationSpeed = 70<br />
ProgressTimer.Enabled = True<br />
Run.Enabled = True<br />
<br />
End sub<br />
<br />
<br />
Private Sub ProgressTimer_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ProgressTimer.Tick<br />
StatProgBar.Value = StatProg.Value + 20<br />
If StatProgBar.Value = 100 Then<br />
StatProgBar.Value = 0<br />
End If<br />
<br />
End Sub<br />
It seems to have stopped working when I installed a new computer theme, but I don't know how this could effect it since I have seen other program's Marquee Progress Bars work fine with this theme.
Here is the theme that I have installed.
Any help would be extremely appreciated!!
|
|
|
|
|
The "default program" as you call it is tied the file extension of the file you're opening. When you double click a file, it checks the extension in the Registry, under HKEY_CLASSES_ROOT, and finds any Command values under the extensions key. That value shows the command line that's used to launch the application for that file.
To open any document or web page, all you ahve to do is start a new Process and pass it the full path to the file you want to open:
Dim proc As Process = Process.Start("C:\Documents and Settings\userid\folder\document.doc")
OR
Dim proc As Process = Process.Start("http://www.google.com")
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
UltraCoder wrote: 2. I have tried everything but a Marquee progress bar does not work. It justs sits there. The code I'm using is:
The Marquee style only works on Windows XP and above and only if you have EnableVisualStyles turned on in your application. It won't work at all on Window 2000 and below.
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
Hey,
Is there a way to keep a form from closing? Example, if someone clicks on the close button in my program, I want the program to show a message box asking if they really want to close the program (I've got that), and then if they click no, then I want the program to stay open.
Is there a way to do this, I've seen it in other programs but I can't figure it out.
Please help! Thank you.
|
|
|
|
|
Check out the Form.Closing[^] event, complete with a sample of what you want to do.
Are you really sure you're an "Ultra" coder?
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
Hi
I need some help with this piece of code bellow.
I'm extracting pieces of information from Excel throug the following ADO connection.
This is a piece of VBA code implemented inside Access.
[code]Dim con As ADODB.Connection
Dim rs As ADODB.Recordset
Set con = New ADODB.Connection
With con
.CursorLocation = adUseClient
.Mode = adModeRead
.Provider = "Microsoft.Jet.OLEDB.4.0"
.ConnectionString = "Data Source=E:\ExcelFileTool.xls" & _
";Extended Properties=""Excel 8.0;HDR=Yes"""
.Open
End With
Set rs = con.Execute("SELECT Site FROM [Clients$] WHERE Site = 'SiteOne'")
Debug.Print rs.Fields(0)
rs.Close
Set rs = Nothing
con.Close
Set con = Nothing [/code]
This code is part of an Access Module and it's inside a loop process. The problem it's related with Excel processes are kept open in the memory.
I'll try to explain the best I can, and sorry about my bad english.
If I run this piece of code without the Excel file opened, everything runs Ok.
But when I run the code with the Excel file in question opened (and I need it opened for other reasons), every loop will increase the Excel process memory about 250KB plus (I see it in TaskManager), and there's more.
When the loop ended, even closing the opened Excel, the Excel Process keeps open on the TaskManager.
The 250KB increasing is very problematic because this macro will run thounsands of loops per day.
Thanks
P&V
|
|
|
|
|
I have a vb2005 logon.aspx page and i have on that page i have the standered System.web.UI.WeControls.login. what im trying to find out is how to dynamicly poition the control in the centre of the page
I really do need help..... all this computer stuff is way over my head !!
|
|
|
|
|
Hi, using VB net(2003) I have 2 questions. First how to change dynamically the property of textAlign in a textBox, see my ex: property of textAlign in the textBox1 is already set to the right, what I would like to do is when I change the value in that txtBox would be that data move to left, and after I finish then hit tab button on keyboard data move back to the right. My second question is how to set a value like zero 0 as a default in that same textBox only when that textBox is empty. Thank you in advance for your help.
|
|
|
|
|
You just need to capture the events: Enter and Leave
This code might help you:
<br />
Private Sub TextBox1_Enter(ByVal sender As Object, ByVal e As System.EventArgs) Handles TextBox1.Enter<br />
Me.TextBox1.TextAlign = HorizontalAlignment.Left<br />
End Sub<br />
<br />
Private Sub TextBox1_Leave(ByVal sender As Object, ByVal e As System.EventArgs) Handles TextBox1.Leave<br />
Me.TextBox1.TextAlign = HorizontalAlignment.Right<br />
End Sub<br />
If you are using this code many times, you might wanna implement this code in your custom textbox, so you wont have to repeat this code for every textbox you have in your form.
-- modified at 16:54 Friday 27th October, 2006
Dave Kreskowiak (Below) is very right, For your second question, capturing the TextChanged Event would fire the same event again.
If you explain a little bit more about what you are trying to do, maybe someone could give you the best way of doing it.
Alexei Rodriguez
|
|
|
|
|
you can use this:
Private Sub Textbox1_TextChanged(byval .....)
if Textbox1.Text = "" then
Textbox1.Text = "1"
End if
Regard,
Adrian
Adrian De Battista: .Net Programmer, Java Programmer and Web Designer.
|
|
|
|