|
Dim control As Control
For Each control In Me.Controls
If control.GetType.Equals(GetType(Windows.Forms.CheckBox)) Then
Dim chkBox As CheckBox = CType(control, CheckBox)
chkBox.Checked = True
End If
Next
Mike Lasseter
|
|
|
|
|
thnx thank you very much man you can't imagine what you solved with that simple code
i really meeded it more than once but now i don't have to be worry
thank you again
try to be good if you can't be the best
|
|
|
|
|
I am having trouble with the EventHandler definition and the parameters to the routines. I have a datagrid with a template column. On that template column is a linkbutton. I want to simulate the click event of the linkbutton by bubbling events. It doesn't work. It goes through the code but the DataGrid onitemcommand event doesn't fire. Here's a code snippet. The DataGrid name is grdReceivingData, onitemcommand="ViewRecipientSubDetails", LinkButton commandname="view".
At class level:
Public Event Command As CommandEventHandler
Sub, function, eventhandler definitions:
For i As Integer = 0 To (grdReceivingData.Items.Count - 1)
If grdReceivingData.Items(i).Cells(0).Text = DBASUB.ToString Then
OnCommand(grdReceivingData.Items(i).Cells(4).Controls(1), New CommandEventArgs("view", String.Empty))
Exit For
Else
Exit Sub
End If
Next
Protected Overridable Sub OnCommand(ByVal e As CommandEventArgs)
Dim handler As CommandEventHandler = CType(MyBase.Events.Item("ViewRecipientSubDetails"), CommandEventHandler)
If (Not handler Is Nothing) Then
handler.Invoke(grdReceivingData.Items(0).Cells(4).Controls(1), e)
End If
MyBase.RaiseBubbleEvent(grdReceivingData.Items(0).Cells(4).Controls(1), e)
End Sub
Protected Overrides Function OnBubbleEvent(ByVal source As Object, _
ByVal e As EventArgs) As Boolean
If TypeOf e Is CommandEventArgs Then
Dim args As New DataGridCommandEventArgs(grdReceivingData.Items(0), _
grdReceivingData.Items(0).Cells(4).Controls(1), CType(e, CommandEventArgs))
MyBase.RaiseBubbleEvent(grdReceivingData, args)
Return True
End If
Return False
End Function
Public Delegate Sub CommandEventHandler(ByVal sender As Object, ByVal e As DataGridCommandEventArgs)
-- modified at 11:42 Tuesday 30th May, 2006
|
|
|
|
|
Hi everyone,
Hope someone can help me with this.
Let me describe the scenario. A person will enter his/her username and password on the program I am doing. The my program will send the username and password to other website such as yahoo.com and gmail.com, it will login, go in deeper such as the inbox and retrieve whatever data is there from the website database then return and store the information at my database. All this happens at the backend and the user see nothing of it.
My problem is that I am able to scan through the HTML and identify which is the button and textboxes but I have no idea how am I going to insert the username and password pass from the program into the website's login page and click the Submit button. The username and password is actually extracted from the local database
I have been cracking my head on this as it is my first time trying this. Your replies are well appreciated.
-J Liang-
|
|
|
|
|
well no need to drill into the page at primary level. check for the form name and the textbox names and button name which will submit and do the following.. on the logon page when user enter the information and click ok. on the same page put one IFrame and inside that IFrame call the page which you want to submit . make height and width of Iframe=0 so that it will be visible false. Now when user enter the value in your textboxes. you can use java script to populate the information in the Iframe page. textboxes. and then use submit of that page. so this way you can exactly keep the track of the page and can play with that using your page..
Regard
Rizwan Bashir
|
|
|
|
|
Thanks Rizwan for replying, actually I got my program to login to the website just a while ago but I think must be the session issues that it says it is forbidden for me to access the page, so no HTML is parse back to me. The website that I need to use my program to login is not in my responsibility, it is maintain by another programmer, so my job is to create a program that suite the existing website he is doing. I wonder how Vb.NET usually deal with sessions in the web pages
-J Liang-
|
|
|
|
|
Hi All,
I am building VB.NET web form application which access Web Service. I am wondering why the VB.NET send two packets to request the to the web service.
First packet:
POST /webservice/webservice1.asmx HTTP/1.1
SOAPAction: "http://webservice1/insUserName"
Content-length: xxx
Expect: 100-continue
Host: 192.168.1.1
Response from the web service:
HTTP/1.1 100 Continue
Date: ...
Second packet:
<xml version="1.0" encoding="utf-8"><soap:envelope...
response from="" the="" web="" service:
http="" 1.1="" 200="" ok
...
i="" am="" wondering="" if="" there="" is="" a="" way="" that="" this="" packet="" can="" be="" just="" one="" packet,
such="" as:
post="" webservice="" webservice1.asmx="" http="" 1.1
soapaction:="" "http:="" webservice1="" insusername"
content-length:="" xxx
expect:="" 100-continue
host:="" 192.168.1.1
<xml="" version="1.0" encoding="utf-8">
|
|
|
|
|
How do I removed a reference I have added to my project? In the class view it does not seem to allow you to do this.
|
|
|
|
|
open up your projects properties and click on the references tab. Highlight the reference you want to remove and click the remove button.
|
|
|
|
|
|
Hi, Please i want to create an advanced interfaces i want they look as XP Or VS 2005 style or even Office style
i heard abt something called "BCGPMSOffice2007" & i downloaded the demo version this is the link if you want to see their page http://www.bcgsoft.com/[^]
can you tell me when we can use this logiciels &how ??
thank you very much
try to be good if you can't be the best
|
|
|
|
|
A UI library exists to replace classes in your app and add extra 'look and feel'. To use this library, you need to rewrite your app, it's a C++ library.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
Hiya, I hope that you can help. Does anybody know how to force the 1st letter of each word in a TextBox to upper case as the key is pressed? The idea is that a user would be able to enter a name or address etc and the 1st letters of each word would automatically be changed to a capital letter WITHOUT the user having to hold down the shift key.
I was able to do this OK in VB6. I would just test the ascii value of the previous character that had been pressed. If the length of the string was zero OR the previous character was a space, I would just change the letter to upper case as shown below.
KeyAscii = Asc(UCase(Chr(KeyAscii)))
I know that the .Net TextBox has a CharacterCasing property but that just uppercases or lowercases all the characters.
Thanx
Rob
|
|
|
|
|
well , i hope i can help
in vb.net in the event :
Private Sub TextBox1_KeyPress(ByVal sender As System.Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles PrixVerreDP.KeyPress
see that e i wrote over ?? this is the stuff you look for
now write ascii = asc(e.keychar) to get the code ascii of the letter you typed
i hope this helped you
try to be good if you can't be the best
|
|
|
|
|
Thanks for your lightning response.
I was just surfing the web looking for an answer and found a suite of controls called ITTeamControls .Net. It extends the existing CharacterCasing property with a UpperFirst value. So there is no need for any coding. Think we might buy a few licences.
The product landing page is http://www.itteam.net/itteamcontrols.html[^]
Rob
|
|
|
|
|
I am trying to create an Editable Datagrid where all the users who logged in to the webpage can see the content. Yet only cerain users will be able to edit certain fields (It is a future work schedule, so the users will only be able to edit the rows that are part of their work schedule). There will be an administrator role who will be able to edit any row.
Teere will be a column on each row that will have the name of the person associated with each row, so I am thinking I could compare that against a Session variable with the login name to give access to the edit feature in the row. I can see that concept working, but I do not know how to aproach the datagrid to make this possible.
I am using VB.NET 2005 version, and was looking at the security tools included there to handle login (FormsAuthentication Class) but was unable to see how could I use it for my purposes?
Any ideas about this?
Thanks
Fedaykinn, the Programming Fremen.
|
|
|
|
|
hellow to all ..
i am looking for doing an option in datagrids , when i click the right buttton of the mouse that i can view a menue with options to do ,
where i can find help on this issue ?
thxx
|
|
|
|
|
Did you mean vb.net datagrids?
You can add a context menu to the datagrid.
|
|
|
|
|
How to create the databse and how to add table in that databse through VB6.0.
If Table created, the 'Require Property' of column is set to 'NO'
i.e value may be NULL!
Thaks in advance
..........Rahul
Rahul here
|
|
|
|
|
I think you need to create the .mdb file in MS Access. After that you can create tables using connection and command objects to execute SQL statements. Here is a quick example of what I'm talking about:
Dim strConn as String = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source='C:\MyDatabase.mdb'"
Dim myConnection as System.Data.OleDb.OleDbConnection(strConn)
Dim myCommand as System.Data.OleDb.OleDbCommand
myCommand.Connection = myConnection
myCommand.CommandText = "CREATE TABLE MyTableName(Column1 varchar(20) NULL, Column2 decimal(5,2) NULL)"
Ooops...I work with VS 2003 and VS 2005, I'm not sure how this translates to VB6.
Hope this helps.
-- modified at 11:00 Friday 26th May, 2006
|
|
|
|
|
Hi all,
This is a very simple UserControl which only contains a button on it and when this button is clicked, it draws a Rectangle object on it. However, I am having a problem that this rectangle gets visually disappeared after it's covered by some other windows form(I hope you understand what I mean by this). I know that if I want to permanently maintain it I will have to draw it in the paint method because the paint method is called every time the control needs to redraw itself, however, I want to draw this rectangle only when the button is clicked so it doesn't seem appropriate if I place the code in the paint method.
So...would somebody please tell me the best way to resolve this problem that you can think of? I would love to know if there is more than one solution. Thank you very much to you all.
<br />
Partial Public Class UserControl1<br />
Inherits UserControl<br />
<br />
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click<br />
Me.CreateGraphics.DrawRectangle(Pens.Blue, New Rectangle(60, 60, 40, 40))<br />
End Sub<br />
End Class<br />
<br />
|
|
|
|
|
The UserControl will be redrawn by the OS when the form is refreshed or the control is invalidated.
Your method paints the rectangle when the button is clicked but, does not provide for repainting of the control when other events cause it to be invalidated. Placing additional code in the OnPaint event is the standard method for persisting the painting of a control
You can make your clicked event rectangle image persist by placing code in the Button1 OnPaint event that paints one image if the control has been clicked (selected) and a different image if it has not been clicked.
in OnPaint Event
If <Button1 is clicked> then
<draw clicked image>
else
<draw unclicked image>
end if
|
|
|
|
|
Thanks a lot. This seems a nice approach.
However, I am unable to find the method to determine if the button is clicked in the MSDN website. I was looking for something like IsClicked() or IsSelected() but I couldn't find it.
|
|
|
|
|
If the clicked button keeps the focus then you can use the focus property to determine how to paint the control. If it does not then you will need to create a boolean to store the clicked state. Initialize the boolean to false and in the buttons click event set it to true.
|
|
|
|
|
I am creating a picture gallery in which the user can scroll forward and backwards. How do I connect the pictures from my folder to the databse. What are the best controls and how to use them?
|
|
|
|