|
That's a clear explanation, I'll try it out. I'm new to VB 2005 - I never realised it would be so complicated. I thought the Treeview would have built in sort functionality; it seems very fundamental.
Thanks a lot for replying, much appreciated.
Iain
|
|
|
|
|
It doesn't have a built-in sort (most of the sorting options in the .NET Framework standard controls don't come with any kind of sort), but there is a reason for this. Since supplying a sort would lock you into using only the data types supported by that sort, it limits the possible uses and how you use a control.
All the controls in the .NET Base Class Library (BCL) that support sorting, do so through one of the ICompare interfaces. This give every control the ability to support custom sorting on ANY class! All you have to do is supply the little piece of code to compare the objects since only you would know how to compare them.
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
How do i set the properties of the data environment connection and the command?
|
|
|
|
|
"data environment"?? What are you refering to? Something in VB6? What are you working with or trying to do?
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
Hi,
Can anybody help me!!!!!!
how to automate selection of radio buttons using vb.net.
I am using mshtml.htmldocument
Public Sub OpenDownloadDataPage(ByRef wbBrowser As SHDocVw.InternetExplorer)
Dim HTMLDoc1 As mshtml.HTMLDocument
Dim iHtmlCol As IHTMLElementCollection
Dim iHtmlEle As IHTMLElement
Dim str1 As String
Do
Loop Until Not wbBrowser.Busy
HTMLDoc1 = wbBrowser.Document
iHtmlCol = HTMLDoc1.getElementsByTagName("a")
' Press the anchor tag to open DownloadData page
For Each iHtmlEle In iHtmlCol
If Not iHtmlEle.outerText Is Nothing Then
If iHtmlEle.outerText.ToLower = "Download Data".ToLower Then
iHtmlEle.click()
Exit For
End If
End If
Next
'Select Radio Buttons
For Each iHtmlEle In iHtmlCol
If Not iHtmlEle.getAttribute("name") Is Nothing Then
str1 = iHtmlEle.getAttribute("name").ToString
If str1 = "KWH" Then
If iHtmlEle.outerHTML = " " Then
iHtmlEle.click()
Exit For
End If
End If
End If
Next
Do
Loop Until Not wbBrowser.Busy
End Sub
Satishk
|
|
|
|
|
I must get a date from SQL database but it is declared as varchar. I want to use it as date type in my vb .net application.
How can I convert the value from sql varchar to vb .net date?
It is stored as "2006-09-27" in the database.
|
|
|
|
|
just run the string through a split.
put it back together the way you need it it
use cdate
for example:
Dim myDate As String
myDate = strVal.Split("-")
Dim newVal as string
newVal=myDate(1) & "/" myDate(2) & "/" & myDate(0)
dim newDate as date= cDate(newVal)
|
|
|
|
|
Hello Everyone. i have done an application in vs2005 who reads some input from a barcode scanner, displays the string read by the barcode on a textbox, updates a database and shows the results on some datagridviews. the barcode scanner is attached to a COM port. my problem is that when i attempt to process the data read (using the SerialPort.DataReceived event), i get a cross thread invalid operation exception (it says it can't access the textbox, because it's a different thread from the one who created it). if i try to set the control.CheckForIllegalCrossThreadCalls property to false, i can write text on the textbox, but my application locks up as it tries to do other things as refreshing datagrids or showing other forms. Please understand i have very little knowledge of VB.NET 2005. is there a simple way to solve this? Thanks in advance.
~~~ From Milano to The Hague, easy as it goes ~~~
|
|
|
|
|
I solved the problem, i discovered the magic world of delegates. Thanks anyway to everyone who read this message and thought of a solution for me.
~~~ From Milano to The Hague, easy as it goes ~~~
|
|
|
|
|
Hi, I want create a Label with transparent Color as "Color.FromArgb(40, 0, 0, 255)"
how can I do?
Please help me
|
|
|
|
|
Please don't cross post.
---
b { font-weight: normal; }
|
|
|
|
|
do it on the form_load event:
label.backcolor = color.fromargb(40,0,0,255)
Posted by The ANZAC
|
|
|
|
|
My problem is that Label did not transparent to other controls on form.
in example : if you have a PictureBox on form and a Label over the PicturBox ,Back Color of Label Cover the pictureBox and Part of PictureBox that is behind of Label is not visible.
How i can set transparent color to label for All controls;
|
|
|
|
|
It won't do that. There is a very common misconception that setting the BackColor to Transparent will make the label actually transparent. NO, it won't! When that control is redrawn, its Background takes on the background properties of it's parent container. It does NOT show other controls through it.
In order to do this, you have to make your own label control, inheriting from the existing label. Override the it's OnPaintBackground method, and just don't paint that background and you should, in theory, get what you want.
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
Dear Dave Kreskowiak
Thank You, but I found simple way.
I add Label to PictureBox as :
Label1.BackColor=Color.Transparent;
PictureBox1.Controls.Add(Label1);
in conclude Label1 is transparent to PictureBox
Regards
|
|
|
|
|
I must not be getting what you said in your original post. I thought you wanted the controls in the same container to show through the label. Apparently, that's not the case. From what I'm not gathering, you just wanted a picture to show through the label.
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
how to remove effect of Ctrl + M / Ctrl + D on Form
i.e. NO MINIMIZE ??
"You can do any thing you set to your mind" - theGhost_k8
|
|
|
|
|
On the properties for the form you should find a property called minimize box, set it to false.
Posted by The ANZAC
|
|
|
|
|
wat da??? I just cant understand why ppl just keep answering without understanding the question?
Read Carefully:-
I've used wndProc to handle windows message of minimise..
So that when ever my form get msg of Minimise, I stop it being minimized.
Well minimization can be done using keyboard too: Ctrl + M and Ctrl+D
IN that the case Ctrl + M is easily handled by me. and in that sceanario i can handle the state of the form.
But in Ctrl+D it does get minimized. I want to stop that.
Dont just type out something....
"You can do any thing you set to your mind" - theGhost_k8
|
|
|
|
|
It's not Ctrl-D and Ctrl-M, it's WindowsLey-D, and WindowsKey-M.
Both of these combinations are MEANT to minimize everything so the user can see the Desktop. Unless your application is running on a kiosk machine, I don't recommend trapping this.
Your handling the WM_SYSCOMMAND, but you're NOT handling the WM_SIZE and WM_SIZING messages. Try those and see what you get.
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
actually iam converting the datagridview content in to excel format and printing the excel sheet.
but i wnat to print the contents of datagridview directly pressing the print button..
pl help...
raju
|
|
|
|
|
|
use these links:
http://www.codeproject.com/KB/printing/ControlPrint.aspx
http://www.codeproject.com/KB/printing/datagridviewprinter.aspx
Sourie
|
|
|
|
|
Does anyone know how to debug a c# .dll that i have included in my vb.net project. Am using visual studio 2005.
thanks in advance
|
|
|
|
|
Did you write the dll ? If not, you're out of luck. If you build a debug version of the dll, you should just be able to step into it.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|