|
The sender parameter is a reference to the button that has been clicked.
---
b { font-weight: normal; }
|
|
|
|
|
yes, i know that, but i dont know how to use that.
|
|
|
|
|
Cast the reference to Button , then you can reference it's properties:
Button button = DirectCast(sender, Button);
---
b { font-weight: normal; }
|
|
|
|
|
hello, my question is this. i've been wondering how do i show the list of services running in a machine, through vb.net? and i'm not getting anything usable while i search google.
any help would be appreciated.
thanks in advance
|
|
|
|
|
You're looking for the ServiceController[^] class.
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
that's it, thanks for the help
and can anyone help in some way, how to "see" the instances of msde using vb.net?
any help would be appreciated
-- modified at 13:05 Friday 29th September, 2006
|
|
|
|
|
I would like to play a beep with a particular lenght in milliseconds. How to do this in VB.net? Is there a way to play the beep with soundcard and not with PC Speaker (the beep function would instead call a wav/mid file and adjust its length according to the target length)?
All help is welcome!
|
|
|
|
|
Which version of VB.NET? In 2005, you have the <a href="http://msdn2.microsoft.com/en-us/library/081ed2x7.aspx">My.Computer.Audio</a>[<a href="http://msdn2.microsoft.com/en-us/library/081ed2x7.aspx" target="_blank" title="New Window">^</a>] object that will do something like this.
There is no method or function call to resample a wave file and strech/compress it to play in x number of milliseconds. You'll have to find a library to do this for you. I don't know of any off the top of my head.
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
Is there a way to generate a sine wave sound with a particular frequency?
|
|
|
|
|
|
|
use int.TryParse to turn your string into a number, and ToString to turn the result back into a string.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
|
Does google not work where you are ? I gave you all the keywords you needed to find what you wanted.
dim i as int
if int.tryparse(textbox1.text, i out) then
i += 27
textbox2.text = i.tostring()
end if
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
man can you chat me online at yahoo!???
|
|
|
|
|
This is my select statement
Dim mySelectQuery As String = "Select id,ClosedDate,Status,RecvdDate,SUrgent,EValue,GroupName,owner,CallDesc From vwHeat where recvddate >='" & startDate & "' and GroupName ='" & ListBox1.SelectedItem & "'"
In my database,some data in CallDesc in not in the same line eg.
My name is Rigard.
My surname is Mossi.
I write all the above data in a .cvs file.
I want this to appear as :
My name is Rigard. My surname is Mossi. in one line.
But when it get to my .csv file, it writes "My name is Rigard" in one line and "My surname is Mossi in the nest line"
How can I make this to be in one line in my .csv file?
|
|
|
|
|
By removing the Environment.Newline that's obviously contained in the string in your database.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
i have this code :
private Sub DataGridDesign()
Dim ts As DataGridTableStyle
ts = New DataGridTableStyle
dataGrid1.TableStyles.Clear
ts.MappingName = "Printers"
Dim TBC As DataGridTextBoxColumn
TBC = New DataGridTextBoxColumn
With TBC
.MappingName = "Print"
.NullText = "לא קיים "
.HeaderText = "מדפסת"
.Width = 200
End With
ts.GridColumnStyles.Add(TBC)
dataGrid1.TableStyles.Add(ts)
ts = Nothing
TBC = Nothing
End Sub
and here i do the call to this function:
private Sub MainFormLoad(sender As Object, e As System.EventArgs)
Call ConnectDgToDB()
call DataGridDesign()
call ConnectCompToDB()
call ConnectIdToDB()
call ConnectEmpToDB()
End Sub
but its dont do well i dont know what is the problem that i cant succses to fix this problem ,ther is no chane in the datagrid i hope that i accept the solution know
|
|
|
|
|
jeryes danial wrote: but its dont do well i dont know what is the problem
Neither do we. What do you mean by "it dont do well"? What is it supposed to do and what is it doing that's wrong?
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
Hello,
I have 2 applications. In application 1 have a developed a simple setup wizard where the user has to enter some details. After they click next to continue and enter some more details. After they have done that, they will click finish. And Application 1 will call the setup of application 2 to install application 2
Application 2 will execute this line to install application 2
returnType = Shell("C:\Application2\setup.exe", AppWinStyle.NormalFocus, True)
The problem I have is that I will have 2 deployments, with the same name (setup). I wonder if it would be possible to merge these together, to make 1 setup.
I hope you can understand,
Many thanks in advance,
Steve
|
|
|
|
|
No, you can't combine 2 .EXE's into one.
steve_rm wrote: The problem I have is that I will have 2 deployments, with the same name (setup).
What do you mean by this? You'll have to files with the same name is what? An .MSI installation you're making?
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
Hi guys,
I'm using DataTable, DataRow, and DataColumn on my DataGrid, and i wonder how can i programmatically set the width of a certain column on my grid.
Any code on workin on these three?(Data/Table,Row,Column) to set the width of a certain column?
Thanks in advance...
-::maximus::-
|
|
|
|
|
A datatable is a construct that contains data, NOT formatting information. You set the widths on your DataGrid itself.
Are you using it in ASP.NET, or in Winforms ?
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
Imports mshtml
Imports SHDocVw
Imports Automation
Imports InternetMacros
Public Class Form1
Inherits System.Windows.Forms.Form
#Region " Windows Form Designer generated code "
Public Sub New()
MyBase.New()
'This call is required by the Windows Form Designer.
InitializeComponent()
'Add any initialization after the InitializeComponent() call
End Sub
'Form overrides dispose to clean up the component list.
Protected Overloads Overrides Sub Dispose(ByVal disposing As Boolean)
If disposing Then
If Not (components Is Nothing) Then
components.Dispose()
End If
End If
MyBase.Dispose(disposing)
End Sub
'Required by the Windows Form Designer
Private components As System.ComponentModel.IContainer
'NOTE: The following procedure is required by the Windows Form Designer
'It can be modified using the Windows Form Designer.
'Do not modify it using the code editor.
<system.diagnostics.debuggerstepthrough()> Private Sub InitializeComponent()
'
'Form1
'
Me.AutoScaleBaseSize = New System.Drawing.Size(5, 13)
Me.ClientSize = New System.Drawing.Size(552, 341)
Me.Name = "Form1"
Me.Text = "Form1"
End Sub
#End Region
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim wbbrowser As New SHDocVw.InternetExplorer
wbbrowser.Visible = True
wbbrowser.Navigate("http://elf.meterpower.co.uk/login.asp", Nothing, Nothing, Nothing, Nothing)
Do
Loop Until Not wbbrowser.Busy
LoginIntoSite(wbbrowser)
OpenDownloadDataPage(wbbrowser)
Dim iim As New InternetMacros.Apps
End Sub
Public Sub LoginIntoSite(ByRef wbBrowser As SHDocVw.InternetExplorer)
Dim HTMLDoc As mshtml.HTMLDocument
Do
Loop Until Not wbBrowser.Busy
HTMLDoc = wbBrowser.Document
Dim iHTMLCol As IHTMLElementCollection
Dim iHTMLEle As IHTMLElement
Dim str, groupid, password, userid As String
iHTMLCol = HTMLDoc.getElementsByTagName("input")
'Type Groupid
For Each iHTMLEle In iHTMLCol
If Not iHTMLEle.getAttribute("name") Is Nothing Then
str = iHTMLEle.getAttribute("name").ToString
If str = "groupid" Then
iHTMLEle.setAttribute("value", "")
Exit For
End If
End If
Next
' Type the userid in the password text box
For Each iHTMLEle In iHTMLCol
If Not iHTMLEle.getAttribute("name") Is Nothing Then
str = iHTMLEle.getAttribute("name").ToString
If str = "userid" Then
iHTMLEle.setAttribute("value", "")
Exit For
End If
End If
Next
'Type the password in the password textbox provided
For Each iHTMLEle In iHTMLCol
If Not iHTMLEle.getAttribute("name") Is Nothing Then
str = iHTMLEle.getAttribute("name").ToString
If str = "password" Then
iHTMLEle.setAttribute("value", "")
Exit For
End If
End If
Next
' Press the submit button
For Each iHTMLEle In iHTMLCol
If Not iHTMLEle.getAttribute("name") Is Nothing Then
str = iHTMLEle.getAttribute("name").ToString
If str = "Enter" Then
' If iHTMLEle.outerHTML = "<=href" & _
' " height=21 width=26 " & _
'"border = 0 > " Then
iHTMLEle.click()
Exit For
End If
End If
Next
Do
Loop Until Not wbBrowser.Busy
End Sub
Public Sub OpenDownloadDataPage(ByRef wbBrowser As SHDocVw.InternetExplorer)
Dim HTMLDoc1 As mshtml.HTMLDocument
Dim iHtmlCol As IHTMLElementCollection
Dim iHtmlEle As IHTMLElement
Dim iHtmlIn As mshtml.HTMLInputElement
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 . I am using this code to select radio button
'by name demcons and value is kwh. The html code for radio button is as
'follows
For Each iHtmlEle In iHtmlCol
If Not iHtmlEle.getAttribute("name") Is Nothing Then
str1 = iHtmlEle.getAttribute("name").ToString
If str1 = "demcons" Then
MsgBox("hi")
If iHtmlEle.outerHTML = " " Then
iHtmlEle.click()
' MsgBox("hi")
Exit For
End If
End If
End If
Next
' iHtmlCol = HTMLDoc1.getElementsByTagName("input")
' For Each iHtmlIn In iHtmlCol
' If iHtmlIn.name = "demcons" And iHtmlIn.value = "KWH" Then
'iHtmlIn.select()
' End If
' Next
Do
Loop Until Not wbBrowser.Busy
End Sub
End Class
Satishk
|
|
|
|
|
As far as I can see, you've posted way too much code, and no question ?
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|