|
sphlynx wrote: I dont think the use of proper english should be an issue here am not writing an essay or term paper
But it does make it very difficult for me to read. The reason essays and term papers for school, college or universities require you to write in proper English is to prepare you for the real world.
For example, I recently had to scope out some work for a client. In that I had to seek some suppliers for data that was needed for the solution. One potenatial supplier was the Royal Mail. They communicated like you in emails. They lost the sale.
If I can't read what you are tying to say then I find it difficult to help you. You have to help me (understand your problem) to help you (find a solution).
sphlynx wrote: if u hav an answer to the question, pls kindly state it, instead of deviating from the issue at hand.
I'm not deviating. I am trying to help you. You will find that if you write properly more people are willing to help you. That benefits you. Therefore by pointing this out to you I am helping you. I can work around the odd typo or slight grammatical error if English is your second language, but showing an arrogant disregard to the language you are attempting to communicate in will not help you.
If you want the text box to remember what was in it when a particular tab was active then create some sort of tab state object (i.e. create your own class to put things in) with a property to hold the information in the text box. Add an object of this class to the Tag property of each tab. When the text is updated in the text box then also update the property in your object.
|
|
|
|
|
|
Hi Everyone,
I am building an app where it will be necessary to delete files from a drive.
This I have noticed will need some administrator privileges. I don't want to adjust
the UAC settings of the project. I just need this privilege at run time. I have been using
the System.Security.AccessControl class but to change the rights has not just been possible.
Can someone help.
|
|
|
|
|
If your app requires the use of the user's admin account, you'll have to add a manifest to your project. You can follow this[^] for the step-by-step.
|
|
|
|
|
I have a menu item control. Which has four buttons.On clicking each button show the
window, except the one button, which shows the show dialog windows.
After opening all windows other then show dialog window, and finally opening the show dialog window, I changes the windows states for all(i.e minimizing all windows.)
Now I am opening a window other then the show dialog window, by clicking the mouse on it(because this is presently in minimized mode).
Now I am unable to perform any action in this window.
My Question is , How should i bring the opened show dialogbox window in front of this non show dialog box window? So as to alert the user, to first perform any action on th show dialog box.
|
|
|
|
|
Your question is difficult to understand, but I'm going to take a stab and say that you might have to set the TopMost property of your dialog window to True before you show it.
|
|
|
|
|
Dave,
At which point u find the problem in understanding the question?
Thanks
|
|
|
|
|
Beginning to end. It's not your English that has the problem. Most of your description makes assumptions that the reader knows exactly what you're talking about at all times without you explaining or assigning concrete references to objects and concepts.
modified on Monday, March 9, 2009 3:11 PM
|
|
|
|
|
Dave,
How are you?
ok, No Problem.
Sorry for not coming back in time.
Now, I am explaining the whole process again.
I have a form. In this form, I have a menu control, this menu control has four buttons.
On clicking the first three buttons, open the window with Show() event.
and the fourth button open the screen with ShowDialog()
Now, One by one I am clicking the button , so finally i have now four windows of this application.(Three with Show() and one with ShowDialog())
Right?
Now I am minimizing all the windows with the help of Window + D Button.
After this, If I use the keyboard(Alt+ Tab) keys. This is opening the showDialog window on top because , As suggested by you , I changed the TopMost = True for this showDialog window.
Now I come back to my problem.
Again, All the windows are minimized. In the taskbar and Startmenu properties , I have selected the Group Similar Taskbar buttons
This resulted in the heap of my application windows, one on the other.
I hope you have understood this point. By doing this , same kind of windows lie one on the other.
Now i click on one of my application window , and If I click the window other then the Show Dialog opened Window, this is not bringing the show dialog window to topMost.
This is the problem.
Please let me know if you still face any problem in understanding the question.
Thanks and Regards
Pankaj
modified on Wednesday, March 11, 2009 1:58 AM
|
|
|
|
|
Many mice have a back button. Many applications implement a goback kind of function, mostly browsers. I'd like to capture a mouse back button so I can offer a similar functionality. Any idea how to tell if the mouse "back" button has been pressed?
|
|
|
|
|
Well, you'd have to override your Form's WndProc and check for two messages. m.Msg 523 is WM_XBUTTONDOWN and 524 is WM_XBUTTONUP. This is, hopefully obvious, the pressing and releasing of any of the extra buttons on the mouse. When receiving either of these messages, look at the high-order word in the m.WParam property of the message. This will tell you which mouse "extra" button was pressed/released.
|
|
|
|
|
I had considered intercepting the xbutton messages but the value of a button is programmable on most mice isn't it? Doesn't that mean that some other message is being sent which means "Back". Coding a specific mouse button would not use a mouse's programmed setting.
|
|
|
|
|
I've gotten a bit closer. It looks like what I want is a virtual key, VK_BROWSER_BACK. It is also recognized as a key modifier, Keys.BrowserBack. These don't seem to come through in the OnKeyDown override. I've seen code samples that implement IMessageFilter.
Public Class Form2
Implements IMessageFilter
Public Function PreFilterMessage(ByRef m As System.Windows.Forms.Message) As Boolean _
Implements System.Windows.Forms.IMessageFilter.PreFilterMessage
Dim keyCode As Keys = CType(m.WParam.ToInt32(), Keys) And Keys.KeyCode
If keyCode = Keys.BrowserBack Then
Console.WriteLine("I found it")
End If
End Function
End Class
Of course this doesn't work either. It never finds Keys.BrowserBack. I've seen m.WParam have values 65568(10020h) & 65536(10000h) when I press my browser back key (xButton on the mouse).
Any ideas?
modified on Monday, March 9, 2009 2:25 PM
|
|
|
|
|
The only thing I can suggest would be the documentation on WM+_XBUTTONDOWN[^].
Since the values in the Params are the result of the combining of smaller fields into a 32-bit value, you have to do some math to figure out what each of these fields means.
|
|
|
|
|
Hello Experts
i am working on a VB 6.0 Project
i am using Datacombo1 and a Text box,
what i want that when i am typing in text box datacombo1 must
Highlighted matched items.
How can i do that.
Your Help will be appreciated.
|
|
|
|
|
It looks like a DataCombo can have only one item selected at a time. I'm guessing you would have to handle the TextChanged event in the TextBox and search through the DataCombo's data, one item at a time, and find the first item in the list that matches what was typed. Then you take that index number and set the DataCombo's SelectedItem property with it.
No, I don't have any examples, 'cause I haven't used VB6 in over 7 years.
|
|
|
|
|
hello
iam working on old soluation vb.net 2003
i have problem
i have general dataset
that used n reports
so i add new element in that dataset
and i update my report to see new field to add in report
but it can't see new filed
i need help
thanks
md_refay
|
|
|
|
|
whether you use crystal report?
if yes, then from Menu Crystal Report, select Database and then Verify Database
|
|
|
|
|
|
Core Programmers wrote: Please give some suggestions....
suggestion : go somewhere else ?
this question gets asked here quite frequently. The general stand is we dont support the writing of code like this wherein the basic intent is 'dubious'/'less than kosher' (or just plain malicious)
'g'
|
|
|
|
|
Hi, does anyone one know what sort of wave header the My.Computer.Audio Play routines require?
I am creating wave files with a basic standard header, which play fine in Windows Media Player, Audacity, VLC etc, but as soon as I try to play them in the program using Play, it says the header is corrupt. These are very low sample rate files. Could that have something to do with it? They are often as low as 600 Hz (Sound files of seismic activity). They are PCM 16 bit uncompressed.
The help (VB/MSDN and various other sources) gives very little detail, and anyway details of wave files seems to be difficult to come by unless you are takling music/stereo/44000 sample rate etc.
Still working my way trough 13,600 entries on MSDN but nothing relevant sp far!
|
|
|
|
|
Sorry, jumped the gun. I found the answer. Seems to be a bug you can get round with:
Private player As New System.Media.SoundPlayer() <br />
Public Sub PlaySound(ByVal sound As Stream) <br />
sound.Position = 0 <br />
' Manually rewind stream <br />
player.Stream = Nothing <br />
' Then we have to set stream to null <br />
player.Stream = sound <br />
' And set it again, to force it to be loaded again... <br />
player.Play() <br />
' Yes! We can play the sound! <br />
End Sub
Apparently when you use the Audio Play it starts the end of the stream for some reason.
|
|
|
|
|
Public Class Form12
Dim ds As New DataSet
Dim da As New SqlClient.SqlDataAdapter
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim CN As New SqlClient.SqlConnection
CN.ConnectionString = "Data Source=homepc\sqlexpress;Initial Catalog=Northwind;Integrated Security=True"
Dim cmd As New SqlClient.SqlCommand
cmd.Connection = CN
cmd.CommandText = "Select * From Customers"
da.SelectCommand = cmd
da.Fill(ds, "Customers")
da.Fill(ds, "CustomersDummy")
Dim PK(0) As DataColumn
PK(0) = ds.Tables("Customers").Columns("CustomerId")
ds.Tables("Customers").PrimaryKey = PK
MsgBox("ok")
Me.DataGridView1.DataSource = ds
Me.DataGridView1.DataMember = "Customers"
End Sub
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
MsgBox(Me.ds.Tables.Count)
Me.ComboBox1.Items.Clear()
For Each tbl As DataTable In ds.Tables
Me.ComboBox1.Items.Add(tbl.TableName)
Next
End Sub
Private Sub ComboBox1_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ComboBox1.SelectedIndexChanged
Dim tbl As DataTable = ds.Tables(Me.ComboBox1.SelectedItem)
Me.ComboBox2.Items.Clear()
For Each col As DataColumn In tbl.Columns
Me.ComboBox2.Items.Add(col.ColumnName)
Next
End Sub
Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click
Dim tbl As DataTable = ds.Tables(Me.ComboBox1.SelectedItem)
Dim Ans As String = ""
For Each dr As DataRow In tbl.Rows
Ans &= dr.Item(Me.ComboBox2.SelectedItem) & ", "
Next
MsgBox(Ans)
End Sub
Private Sub Button4_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button4.Click
Dim dr As DataRow
Dim Str As String = InputBox("Enter Customerid")
dr = ds.Tables("Customers").Rows.Find(Str)
If dr Is Nothing Then
MsgBox("Not found...")
Exit Sub
End If
MsgBox(dr.Item("ContactName") & "-" & dr.Item("Country"))
dr.BeginEdit()
dr.Item("ContactName") = "Mr. " & dr.Item("ContactName")
dr.Item("Country") = dr.Item("Country").ToString.ToUpper
dr.EndEdit()
MsgBox(dr.Item("ContactName") & "-" & dr.Item("Country"))
End Sub
Private Sub Button5_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button5.Click
Dim dr As DataRow
For Each dr In ds.Tables("Customers").Rows
dr.BeginEdit()
dr.Item("Country") = dr.Item("Country").ToString.ToUpper
dr.EndEdit()
Next
End Sub
Private Sub Button6_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button6.Click
Dim dr, drs() As DataRow
drs = ds.Tables("Customers").Select("Country = 'UK'")
For Each dr In drs
dr.BeginEdit()
dr.Item("ContactName") = dr.Item("ContactName").ToString.ToUpper
dr.EndEdit()
Next
End Sub
Private Sub Button7_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button7.Click
Dim Row As DataRow
Row = ds.Tables("Customers").NewRow
Row.BeginEdit()
Row.Item("CustomerId") = "SAMIR"
Row.Item("ContactName") = "ABC"
Row.Item("ContactTitle") = "XYZ"
Row.Item("Country") = "INDIA"
Row.EndEdit()
ds.Tables("Customers").Rows.Add(Row)
End Sub
Private Sub Button8_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button8.Click
Dim dr As DataRow
Dim Str As String = InputBox("Enter Customerid")
dr = ds.Tables("Customers").Rows.Find(Str)
If dr Is Nothing Then
MsgBox("Not found...")
Exit Sub
End If
dr.Delete()
End Sub
Private Sub Button9_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button9.Click
Dim Criteria As String = "Country = 'UK'"
Dim Ans As Integer
Ans = ds.Tables("Customers").Compute("Count(CustomerId)", Criteria)
MsgBox(Ans)
End Sub
Private Sub Button10_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button10.Click
Dim Criteria As String = "Country Like '" & Me.TextBox1.Text & "*'"
Dim dv As DataView
dv = ds.Tables("Customers").DefaultView
dv.RowFilter = Criteria
Me.DataGridView1.DataSource = dv
End Sub
Private Sub Button11_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button11.Click
Dim CN As New SqlClient.SqlConnection
CN.ConnectionString = "Data Source=homepc\sqlexpress;Initial Catalog=Northwind;Integrated Security=True"
Dim StrSql As String
StrSql = "Update Customers Set Country = Upper(Country) "
StrSql &= " Where Country = 'UK'"
Dim cmd As New SqlClient.SqlCommand
cmd.Connection = CN
cmd.CommandText = StrSql
Try
CN.Open()
cmd.ExecuteNonQuery()
MsgBox("Ok")
Catch ex As Exception
MsgBox(ex.Message)
Finally
CN.Close()
End Try
End Sub
Private Sub Button12_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button12.Click
Dim CN As New SqlClient.SqlConnection
CN.ConnectionString = "Data Source=homepc\sqlexpress;Initial Catalog=Northwind;Integrated Security=True"
Dim StrSql As String
StrSql = "Select Count(*) From Customers"
Dim cmd As New SqlClient.SqlCommand
cmd.Connection = CN
cmd.CommandText = StrSql
Dim Ans As Integer
Try
CN.Open()
Ans = cmd.ExecuteScalar
MsgBox(Ans)
Catch ex As Exception
MsgBox(ex.Message)
Finally
CN.Close()
End Try
End Sub
Private Sub Button13_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button13.Click
Dim CN As New SqlClient.SqlConnection
CN.ConnectionString = "Data Source=homepc\sqlexpress;Initial Catalog=Northwind;Integrated Security=True"
Dim StrSql As String
StrSql = "Select * From Customers"
StrSql &= " Where Country = 'UK'"
Dim cmd As New SqlClient.SqlCommand
cmd.Connection = CN
cmd.CommandText = StrSql
Dim dr As SqlClient.SqlDataReader
Dim Ans As String
Try
CN.Open()
dr = cmd.ExecuteReader
Do While dr.Read
Ans &= dr.Item("CustomerId") & ", "
Loop
MsgBox(Ans)
Catch ex As Exception
MsgBox(ex.Message)
Finally
dr.Close()
CN.Close()
End Try
End Sub
Private Sub Form12_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
End Sub
End Class
|
|
|
|
|
Since you didn't ask a question I will:
do you already have any idea why you are getting more 1-votes than you have posted messages around here?
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
|
|
|
|
|
This guy is a retard. Seriously, he posts like this every day.
Christian Graus
Driven to the arms of OSX by Vista.
|
|
|
|
|