|
tatchung wrote: I know...that's a great deal of my problem
What does this mean ? VB6 was always crap, and it's been unsupported for a long time. In VB.NET, you drag a WMP control onto your form and tell it what to play, easy.
Christian Graus
Driven to the arms of OSX by Vista.
|
|
|
|
|
Couldn't agree more...i meant using vb6 has been a burden for me. Unfortunately this was a requirement...client haven't, couldn't, wouldn't install a .NET framework for reasons they "wouldn't" disclose. Lotsa "'s"s in there
Aim small, miss small
|
|
|
|
|
Perhaps this one?
Shell "C:\Program Files\Windows Media Player\wmplayer.exe " & Chr(34) & txtscreenshot.Text & Chr34, vbNormalFocus
The above code will put quotation-marks inside the command. That way Windows knows that the path doesn't end after the first space that it sees.
Enjoy[^]
I are troll
|
|
|
|
|
|
In my project while images are loading in to application if i try to close application its not closing, After the completion of loading only it is closing.
Please help me what is the problem. How to close the Application.
|
|
|
|
|
All your images are being loaded by code on the UI thread. It's busy doing that, so there's no way for the UI thread to respond to the Close messages it's getting. You have to move your image loading code to another thread so the UI thread can get the messages to close.
|
|
|
|
|
Hi,
as Dave said, use another thread to load the images.
Don't forget to make it a background thread, i.e. one that does not prevent the app from closing
while it, the thread, still has some work left.
Luc Pattyn [Forum Guidelines] [My Articles]
- before you ask a question here, search CodeProject, then Google
- the quality and detail of your question reflects on the effectiveness of the help you are likely to get
- use the code block button (PRE tags) to preserve formatting when showing multi-line code snippets
|
|
|
|
|
When I Working on this code it will work properly with minimize status.
Shell("cmd", AppWinStyle.MinimizedFocus)
SendKeys.Send("-")
SendKeys.Send("C:{ENTER}")
SendKeys.Send("DIR{ENTER}")
SendKeys.Send("CD WINDOWS{ENTER}")
But same code with small change in Open the Command Prompt(Hide status).
It open the maximum Process. I checked in Task manager
The Code as Follows.
Shell("cmd", AppWinStyle.Hide)
SendKeys.Send("-")
SendKeys.Send("C:{ENTER}")
SendKeys.Send("DIR{ENTER}")
SendKeys.Send("CD WINDOWS{ENTER}")
plzzz help me.
|
|
|
|
|
This isn't going to work. SendKeys sends keystrokes to the window that has the input focus. Since you launched the CMD prompt hidden, it can't possibly have the input focus. Your app retains the input focus, so you just sent all those keystrokes to your own app, not the CMD prompt you launched.
I have no idea what you're trying to accomplish with this, so I can't tell you what the best solution would be...
|
|
|
|
|
I want take a backup from PostgreSQL from vb.net so I know only one way is command prompt.
When user click on Backup I want take backup. but user not aware of open command prompt.
Sorry My English is poor plzz understand i help me.
|
|
|
|
|
You don't use a command prompt to do this. Use the Process class[^] to launch the same command you would type at that prompt to do it without the prompt.
|
|
|
|
|
I have a DataGridView whos datasource is a bindingSource. I wish to filter the DataGridView via a comboBox, with a button to instigate the whole thing. So I have:
Private sub selectionButton_Click(ByVal sender as system object, byVal e as system.eventargs) handles selectionButton.click
transactionBindingSource.filter = String.format("TranType = '{0}'", itemSelectionComboBox.text)
End Sub
But although tracing the code shows that the filter is correctly selected, my DataGridView does not reflect the filtering selected.
What am I doing wrong please?
|
|
|
|
|
You need to rebind the data source
Bob
Ashfield Consultants Ltd
Proud to be a 2009 Code Project MVP
|
|
|
|
|
Well, I originally thought that too Bob, and tried adding:
transactionDataGridView.DataSource = nothing<br />
transactionDataGridView.DataSource = transactionBindingSource
without success
|
|
|
|
|
I think you have to make the underlying source a view. This is the code from VS help
Private Sub PopulateDataViewAndFilter()
Dim set1 As New DataSet()
' Some xml data to populate the DataSet with.
Dim musicXml As String = " & _
"<music>" & _
"<recording><artist>Coldplay</artist><cd>X & Y</cd></recording>" & _
"<recording><artist>Dave Matthews</artist><cd>Under the Table and Dreaming</cd></recording>" & _
"</music>"
' Read the xml.
Dim reader As New StringReader(musicXml)
set1.ReadXml(reader)
' Get a DataView of the table contained in the dataset.
Dim tables As DataTableCollection = set1.Tables
Dim view1 As New DataView(tables(0))
' Create a DataGridView control and add it to the form.
Dim datagridview1 As New DataGridView()
datagridview1.AutoGenerateColumns = True
Me.Controls.Add(datagridview1)
' Create a BindingSource and set its DataSource property to
' the DataView.
Dim source1 As New BindingSource()
source1.DataSource = view1
' Set the data source for the DataGridView.
datagridview1.DataSource = source1
source1.Filter = "artist = 'Dave Matthews'"
End Sub
(I chopped some of the xml out, so I may have been over enthusiastic and chopped too much!)
Bob
Ashfield Consultants Ltd
Proud to be a 2009 Code Project MVP
|
|
|
|
|
|
hii all..
im beginner in using VB..how can i validate the hex input in a textbox..
plss help me..
|
|
|
|
|
You can use ReguarExpression to validate the text. All you need is a regular expression that checks if the input contains A-F(both case) and 0-9 and nothing else. You can do this in Validating event or TextChanged event.
The word "politics" describes the process so well: "Poli" in Latin meaning "many" and "tics" meaning "bloodsucking creatures."
जय हिंद
modified on Friday, January 30, 2009 12:27 AM
|
|
|
|
|
|
Thanks for pointing out. Corrected.
I had mixed octal and hexadecimal.
The word "politics" describes the process so well: "Poli" in Latin meaning "many" and "tics" meaning "bloodsucking creatures."
जय हिंद
|
|
|
|
|
hii!..look at this one.
Function StringToHex(ByVal text As String) As String
Dim hex As String
For i As Integer = 0 To text.Length - 1
hex &= Asc(text.Substring(i, 1)).ToString("x").ToUpper
Next
Return hex
End Function
null referrence exception occured..why?..
plss help me..
|
|
|
|
|
The only reason that would happen is if you send a null reference (Nothing in VB) to the method.
You are not initialising the hex variable to a string, so it's Nothing from the start, but eventhough that is not recommended (you get a compiler warning about it), it doesn't cause an exception.
Alos, you should use a StringBuilder to build a string. Using the &= operator in a loop scales very badly.
|
|
|
|
|
Can I make my combobox object only for read
|
|
|
|
|
What do yo mean by readonly? Is the user still able to open the list in combo but not able to select from that list?
|
|
|
|
|
I mean that don't write the text area in combobox but I understand how make that -Combobox-dropdownstyle make dropdownlist thanks
|
|
|
|