|
I am afraid this isn't the exact solution. THe thing is, I need to embed this in my application so that it is transparent for the user (from an intranet web application I launch word through havascript to open a dynamic XML from a web service and an XSL to build the document - HTML). I don't want the user to interact at all (needs to be fully automatic) and it needs to be triggered right after the document loads.
|
|
|
|
|
hi there,
i have a problem in adding backgroundimage to listbox control in vb.net.
how can i add a backgroundimage to a listbox control.
i tried with following code. but its not the right solution to my problem.
i want to add a backgroundimage to listbox and also it should not be highlighted when i select any item in listbox.
" Dim g As Graphics
Dim font As Font = New Font("Verdana", 20, FontStyle.Bold,GraphicsUnit.Pixel)
Dim WBrush As New SolidBrush(Me.BackColor)
listbox1.CreateGraphics.DrawString("CONFLICT", font, WBrush, 0, 200)
please can anyone find the solution to this problem.
i will be very thankful if anyone can find a solution to this problem
thanks in advance.
nagaraju
|
|
|
|
|
You should go with protected overwrites of paint and use drawimage statement for background picture.
|
|
|
|
|
can u give few lines of code to draw any image on listbox as a hint
i didn't get ur words exactly.
the problem is when add code to drawstring its getting highlighted when i select any item in the listbox
hope u understand.
thanks for ur interest
kondepudi
-- modified at 6:57 Tuesday 31st January, 2006
|
|
|
|
|
hi there,
i have a problem in adding backgroundimage to listbox control in vb.net.
how can i add a backgroundimage to a listbox control.
i tried with following code. but its not the right solution to my problem.
i want to add a backgroundimage to listbox and also it should not be highlighted when i select any item in listbox.
" Dim g As Graphics
Dim font As Font = New Font("Verdana", 20, FontStyle.Bold,GraphicsUnit.Pixel)
Dim WBrush As New SolidBrush(Me.BackColor)
listbox1.CreateGraphics.DrawString("CONFLICT", font, WBrush, 0, 200)
i will be very thankful if anyone can find a solution to this problem
thanks in advance.
nagaraju
|
|
|
|
|
Hi
I want to display a control(ListView) inside the datagrid view
So the problem I encounter r:
1.How to get the Top & Left of the cell underneath I want to display that List View
2. If I add that List View with
me.datagridview1.controls.add(Lisview)
Listview.setBounds(hti.ColumnX,Hti.RowY,100,100)
But this is also not suceeded Properly
Then the control at the last or last to last row Cuts
As the ListView does not get the proper Space to occupy
Should I add that control to form Rather than DataGridView
But then how to Show the list view correspondingly with Datagridview cells (Like every cell in the Column2 has a image Clik on that iamge will show LisView underneath that cell)
Thanks For this Help
Hema Chaudhry
|
|
|
|
|
Hello!
I don't know how I can make an entry in to WAB (Windows Address Book) and how I could check if the entry I am intending to make is already exist or not.
I am seeking Vb.NET code samples about WAB and It has been for days I haven't found any.
If you help me to work it out, I would really appreciate it!
Thanks!
Bedri
|
|
|
|
|
|
Thanks Jason!
Kwab is not a solution for me. I need to have the full source code in VB.net. There are some written in C++ but I do not have any knowledge about C++ language.
If youcome cross it to somewhere would you please let me know because it has been over 5 days I couldn't find a sample code of it in VB.net
The life is an unknown cirle and we are the dot in it!
|
|
|
|
|
Hello
Eery one know the Address Bar for the internet explorer, it's like a combobox but with additional features(if the address is writen before, it shows you down,the scrollbar didn't appear only if the choice is more than 5), so how can i do the sam in VB.Net 2003.
With my best regard;)
Assaf
|
|
|
|
|
Not sure if this is what you're after, but this[^] is a good article on shell autocompletion (its C#, but a class library, so shouldn't matter). Maybe that will help.
Cheers,
Will H
|
|
|
|
|
I'm using the DataAdapter & the DataSet without using the wizard, but the problem that occured with me that i can't display the content of the Database in the appropriate textbox and combobox.
knowing that i verify if the connection is well established and the dataset contain the right data.
with my best regard;)
Assaf
|
|
|
|
|
Hey, If you are using the dataset then you can access individual field of the dataset using the row and column no. Please explain that exact problem that you are having.
With Best Regards,
Mayur
|
|
|
|
|
My problem is that i can't display the data in the appropriate textbox & combobox in the forme
Notice that the data is in the dataset.
Assaf
|
|
|
|
|
To set a textbox to have a value from a dataset use:
TextBox1.Text = dsData.Tables(0).Rows(0).Item("ColumnName").ToString
This is to get a specific value out of the dataset. You can also use the textbox.databinding property
To set values in a combobox:
<br />
ComboBox1.DataSource = dsData.Tables(0)<br />
ComboBox1.DisplayMember = "Name of Column to DISPLAY"<br />
ComboBox1.ValueMember = "VALUE of the Column"<br />
You would then have to set the selected item of the combobox to be the current record's.
Is this the information you were after?
/jason
|
|
|
|
|
I try this code before but it didn't show the data either in textbox or in combobox?
Assaf
|
|
|
|
|
show me the code you tried, and I will try and help you work out what is going wrong, or someone else will :->
/jason
|
|
|
|
|
Is your code running in a separate thread?
-Jason
|
|
|
|
|
Private Sub Mouch_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim Querry As String
Querry = "select * from mouchtarayat"
'the trial function take commandText, this function contain all the needed value to establish the connection.
trial(Querry)
'Dataset=ds
ds.Clear()
'DataAdapter=daM
daM.SelectCommand = cmd
Try
cnn.Open()
Catch ex As Exception
Finally
MessageBox.Show(cnn.State)
End Try
'fill the data into the appropriate place
daM.Fill(ds, "Mouch")
End Sub
Private Sub TextBox5_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TextBox5.TextChanged
'TextBox5.Text = ds.Tables(0).Rows(0).Item("التاريخ").ToString
TextBox5.DataBindings.Add("text", ds, "Mouch.")
'the two way didn't work
End Sub
Private Sub cmbNaw_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Naw.SelectedIndexChanged
cmbNaw.DataSource = ds.Tables("Mouch")
cmbNaw.DisplayMember = "النوع"
'Me.cmbNaw.DataBindings.Add("text", ds, "Mouch.النوع")
'the two way didn't work
End Sub
Thanks a lot in advance
Assaf
|
|
|
|
|
Assaf82 wrote:
TextBox5.DataBindings.Add("text", ds, "Mouch.")
Try this...
TextBox5.Text = ds.Tables(0).Rows(0).Item("التاريخ").ToString
TextBox5.DataBindings.Add("Text", ds.Tables("Mouch"), "التاريخ")
I am assuming that "التاريخ" is an Item of the Table "Mouch"
-Jason
|
|
|
|
|
Yes "التاريخ" is an Item of The Table "Mouch"
but the statment you just give me didn't work.
and to be sure that the dataset contain the appropriate table with the appropriate column i put some message to give the data inside:
Dim dt As DataTable
For Each dt In ds.Tables
'msgbox(dt.tablename)
Next
Dim dc As DataColumn
For Each dc In ds.Tables("mouch").Columns
MsgBox(dc.ColumnName)
Next
Dim drw As DataRow
For Each drw In ds.Tables("mouch").Rows
MsgBox(drw(1))
MsgBox(drw(2))
MsgBox(drw(3))
Next()
and all give me the right data
with my best regards
Assaf
|
|
|
|
|
The code I posted should work for your databinding.
If not, the only other thing I can think of is it dont like the Characters التاريخ . Try replacing them characters with the actual integer index of the column if you know what that would be.
-Jason
|
|
|
|
|
I go far,and i change all the database to an English one but no satisfied result, (i think if it's not written in english it cause trouble).
also i put instead of the name of the field his number, nothing different.
The think that make me confused in this problem that there no one give a real example about using this features without using the wizard to create the adapter,connection and the dataset, and if you try this using the wizard it done well.
With my best regards
Assaf
|
|
|
|
|
I want to validate a text box, that it only accept the numeric characters on key press/key down event. I dont want message boxes when any alpha character press.
Muhammad Ali Ghauri
ABN AMRO Bank N.V. - Pakistan
|
|
|
|
|
you need to handle your textbox's keyboard events, either keydown , keyup or keypress . Then check the contents of the textbox and delete any characters you don't want.
make sure you set the maxlength property because otherwise this will take some time
/jason
|
|
|
|