|
Of course - just download the SDK and it should install managed DX automatically.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
Is there an easy way to alternate forecolors in a listbox simular to datagrids in vb.net ???
silver-gray
|
|
|
|
|
Silver-Grey wrote: Is there an easy way
What's easy for us may not be easy for you.
There is no support for this built into the ListBox control, so you'd either have to find a replacement control that supports this, or create your own ListBox control and ownerdraw the ListBox to get this effect.
Since you'd have to supply the Fore/BackColor's for the even and odd rows, you'd probably want to start by creating your own ListBox class so you can expose these properties. You can Google for "ownerdraw listbox vb[^] for examples.
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
vb.net
i'm dynamically adding buttons to my form and to these buttons adding the same sub to be handled which shows a messagebox, that should show the number of the button.
see example:
<br />
public cmd as button<br />
<br />
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load<br />
<br />
Dim i As Integer = 1<br />
Dim z As Integer = 5<br />
Dim x As Integer = 10<br />
Dim y As Integer = 10<br />
<br />
For i = 1 To z<br />
cmd = New Button<br />
cmd.Width = 100<br />
cmd.Height = 40<br />
cmd.Left = x<br />
cmd.Top = y<br />
Me.Controls.Add(cmd)<br />
AddHandler cmd.Click, AddressOf show_messagebox<br />
x += cmd.Width + 5<br />
Next i<br />
<br />
End Sub<br />
<br />
Private Sub show_messagebox(ByVal sender As System.Object, ByVal e As System.EventArgs)<br />
MsgBox("button ") ' + a number indicating what button has been clicked<br />
End Sub<br />
<br />
how can i find out, which button has been clicked?
this example uses only a few buttons, but i need to differentiate between up to several hundreds.
|
|
|
|
|
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
|
|
|
|