|
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
|
|
|
|
|
nah i didnt write it, but ive got the source which has been compiled under debug
still not sure how you would step into it and how you would go about setting breakpoints etc from the new project...
|
|
|
|
|
You may need to put the dll project into yuor solution, but I don't think so. If yo uset a break point at a call to the dll, I think F11 will step in. If you want breakpoints within the dll, yes, you will need to make the project part of the solution.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
thanks christian for your help.. have stepped into the c# code from adding it to the solution.
many thanks.
now the fun begins...
|
|
|
|
|
Im using vs 2005 to design a database driven program. I went through a video tutorial and designed a database example that worked fine, so i used the exact same structure to design my own.
I have a list box that recieves the list of Groups(Its for a field trip schedule), then each control on the form, the list box, text boxes for group member names etc. is databound to a binding source, this binding source is in turn, bound to the instance of my dataset.
In the tutorial we used this code to save the data:
Me.BindingSource1.EndEdit(me.MyCompanyDataSet1.Customer)
Me.CustomerTableAdapter1.Update(Me.MyCompanyDataSet1.Customer)
and it worked fine, i have added this code, but changed the names to my own:
Me.GroupsBindingSource.EndEdit()
Me.GroupsTableAdapter1.Update(Me.GroupsDataSet1.Groups)
but it still doesn't work. When I load the form i fill the instance of the table adapter that's on my form via:
Me.GroupsTableAdapter1.Fill(Me.GroupsDataSet1.Groups)
Which in turn fills my Listbox and controls. When I change something in runtime, eg Group Name, the change shows on my onscreen data, but when i close and reopen the data its all back to the default and nothing has been permanently saved.
Thanks in advance for your help.
Posted by The ANZAC
|
|
|
|