|
Hello.
I writing some vb ( using vb 6 ) application and in some place i need to show some window on the top of all other windows.
The other windows are working in different application and i don't have any connection with them.
How can i be sure that my window in really will be on top ? i always find some place that the other window show their windows on me - so my window is not on top.
Thanks for any help.
|
|
|
|
|
For the top of all window, You must open your window as modal window. In modal window, No window comes on top unless your window have been closed.
form1.show vbmodal
Kumar Prabhakar
|
|
|
|
|
I'm using Nemanja's Task Pane project and I have all the panels laid out the way I need them and I'd like to add click events to the items in each panel. Could someone tell me or show me how to do this?
Thanks,
Andy
P.S. It's way too much code to post here and I don't see how to attach a file here, so here's the link to Nemanja's project. http://www.codeproject.com/useritems/TaskPane_Source_Works.asp[^]
|
|
|
|
|
Hi,
I am developing a Multithreaded Application for Scanning using Black ICE Imaging SDK. In one Primary Thread I am scanning Images and saving them to collection. In Second Thread, I am doing Image processing on the scanned Image by taking it from Collection.
My Problem is the Primary thread is scanning Images, but in Secondary thread when I try to load it from temporary file or Collection, I am getting some Exceptions. The brief Code for this is given below:
Sub StartScan( )
BiTwain.Action = BITWAINLib.enumScanOperations.TWSTAT_BATCHSCAN
Dim thrd as Thread
Thrd=new Thread(AddressOf ProcessImage)
Thrs.Start()
End Sub
Sub BatchPageDone( )
BIDIBObj.SaveDIBInImageFormatExt("C:\Temp\” & TempCount & “.tif", hDib, 1,
BIDIBLib.enumFileFormats.imgffTiff,
BIDIBLib.enumCompressionModes.imgcmCcittG4, BIDIBLib.enumFillOrderModes.imgfoNormal,
False)
TempCollection.Add(("C:\Temp\” & TempCount & “.tif")
End Sub
Sub ProcessImage( )
While TempCollection.Count = 0
Thread.CurrentThread.Sleep(100)
End While
'Loading Image to Memory
'I am geting error at this point
Hdib=BITiffobj.LoadTiffIntoDIB(TempCollection.Item(0).ToString(), 0, False)
'Processing HDib
End Sub
When the Secondary thread try to Load the Image from file, I am getting two errors. While trying to load First time, the Exception is “Request Timed out”. When try to load second time, the exception is “Because this evaluation could cause side effects, it will not be executed until enabled by user.”
Thanx,
.Net Programmer, Software Engineer
|
|
|
|
|
Dim thrd as Thread
Thrd=new Thread(AddressOf ProcessImage)
Thrs.Start()
Is this your actual code? Should be Thrd.Start() instead of Thrs.Start()
|
|
|
|
|
Sorry, It's a typing mistake.
It is Thrd.Start()
.Net Programmer, Software Engineer
|
|
|
|
|
Visual Basic 2005 Express Edition:
This works, but, I need to get the .wav file from Resources:
My.Computer.Audio.Play("C:\Documents and Settings\Owner\My Documents\Visual Studio 2005\Projects\OrthoLabRx\OrthoLabRx\Resources\PodVwBy.wav")
I placed the .wav file in Resources, but, I can't seem to access it from there.
This does not work:
My.Computer.Audio.Play(My.Resources.PodVwBy)
It says "value of type 'System.IO.UnmangedMemoryStream' cannot be converted to 'String'.
This worked, but, instead of a click, it played a grinding noise:
Dim sndPing As New SoundPlayer(My.Resources.PodVwBy)
sndPing.Play()
My.Computer.Audio.Play(My.Resources.PodVwBy)
|
|
|
|
|
I have an application that I wrote that causes a variety of message boxes to come up. Can somone here help me with how to make the message box color change.
Thanks
|
|
|
|
|
What part of the message box change color ?
If you are talking about the actual form part i dont think you can do that... On the other hand you could create your own custom message box which you could do that with
|
|
|
|
|
How do you create a custom message box?
|
|
|
|
|
hi all
Dim openFile As New System.Windows.Forms.OpenFileDialog
openFile.DefaultExt = "txt"
openFile.Filter = "All File(*.*) |*.*"
openFile.ShowDialog()
i wante to give me multi choices pdf and doc and jpeg
can u give me anther codes coz this program shoud be a one choice (all file)
merci
|
|
|
|
|
hi all
Dim openFile As New System.Windows.Forms.OpenFileDialog
openFile.DefaultExt = "txt"
openFile.Filter = "All File(*.*) |*.*"
openFile.ShowDialog()
i wante to give me multi choices pdf and doc and jpeg
openFile.Filter = "adobe(pdf) |document(doc)|jpeg(jpg)"
this code is error
give me the right code please
|
|
|
|
|
Please write a descriptive subject. The subject "help me" provides no useful information what so ever.
What do you mean when you say that the code "is error"? Do you get an error message? Doesn't it do what you expected, and if so, what did you expect and what happens?
Follow the pattern in the code you have; a description followed by a file mask.
---
b { font-weight: normal; }
|
|
|
|
|
Not that hard
openFile.Filter = "adobe(*.pdf) |*.pdf|document(*.doc) |*.doc|jpeg(*.jpg) |*.jpg"
|
|
|
|
|
"adobe(pdf)|*.pdf |document(doc)|*.doc|jpeg(jpg)|*.jpg"
Each pairing is | delimited eg. "type_HumanReadable|FileSystemMask".
then each pair is futher delimited by a pipe eg. "adobe(pdf)|*.pdf |document(doc)|*.doc"
also watch out for .jpeg s
I think you can add ", *.jpeg" to the end, but I can't quite recall off the top of my head.
oh and the other had some good points. look over his/her post.
next time just highlight "Openfile.Filter" and hit F1 to look at the help doc. I have to look this one up every time...
hey...slang is the vernacular for the vernacular...wow
|
|
|
|
|
hi, can someone tell me how to insert a new record. i have 2 values and i want them to be saved in the database. i have the username and password. all i want to do is to make the user fill the textfields and the values will be saved in the database. can someone help me pls with this??
Adrian De Battista: .Net Programmer, Java Programmer and Web Designer.
|
|
|
|
|
ADY007 wrote: To insert a new record in asp.net
It is ADO.NET that is the part of the .NET Framework that deals with databases. ASP.NET is the part of the .NET Framework that deals with web applications.
ADY007 wrote: can someone tell me how to insert a new record. i have 2 values and i want them to be saved in the database.
There are many ways to insert data into the database here is one:
Dim conn As SqlConnection = New SqlConnection(connectionString)
Dim cmd As SqlCommand = New SqlCommand()
cmd.CommandText = "INSERT MyTable(Column1, Column2) VALUES (@value1, @value2)"
cmd.Parameters.Add("@value1", firstValue)
cmd.Parameters.Add("@value2", secondValue)
conn.Open()
cmd.ExecuteNonQuery()
conn.Close()
Assumptions:
* You are using SQL Server
* You have a connection string already called connectionString
* You have a table called MyTable
* MyTable has two columns called Column1 and Column2
* The values you wish to insert are stored in variables called firstValue and secondValue
"On two occasions, I have been asked [by members of Parliament], 'Pray, Mr. Babbage, if you put into the machine wrong figures, will the right answers come out?' I am not able to rightly apprehend the kind of confusion of ideas that could provoke such a question."
--Charles Babbage (1791-1871)
My: Website | Blog
|
|
|
|
|
Yes i made it but it was all useless! the cmd.ExecuteNonQuery is not good i think! because the error is always in there.!! i am using MS Access
Adrian De Battista: .Net Programmer, Java Programmer and Web Designer.
|
|
|
|
|
ADY007 wrote: i am using MS Access
You should have said before.
Use OleDb classes instead of Sql classes.
"On two occasions, I have been asked [by members of Parliament], 'Pray, Mr. Babbage, if you put into the machine wrong figures, will the right answers come out?' I am not able to rightly apprehend the kind of confusion of ideas that could provoke such a question."
--Charles Babbage (1791-1871)
My: Website | Blog
|
|
|
|
|
yes i am doing it with the oledb! but its useless.! i amm doing this right now.
Private Sub Save()
Dim daMem As OleDbDataAdapter = New OleDbDataAdapter("Insert Into tblMembers(Name,Surname) values('Hello', 'F***')", odcConnection)
daMem = New OleDbDataAdapter("Select * From tblMembers", odcConnection)
Dim cb As OleDbCommandBuilder = New OleDbCommandBuilder(daMem)
Dim dsNewRow As DataRow
dsNewRow = dsMembers.Tables("tblMembers").NewRow
dsNewRow.Item("Name") = txtName.Text
dsNewRow.Item("Surname") = txtSurname.Text
dsNewRow.Item("Phone") = txtPhone.Text
dsNewRow.Item("Mobile") = txtMobile.Text
dsNewRow.Item("Username") = txtUsername.Text
dsNewRow.Item("Password") = txtPassword.Text
dsNewRow.Item("TimesEntered") = intTimesEntered
dsMembers.Tables("tblMembers").Rows.Add(dsNewRow)
daMem.Update(dsMembers, "tblMembers")
End Sub
But daMem.Update(dsMembers, "tblMembers") he is telling me that the Insert Command isn't there! but i am making a new row! can someone help pls??
This is the exact error:
Exception Details: System.Data.OleDb.OleDbException: Syntax error in INSERT INTO statement.
Adrian De Battista: .Net Programmer, Java Programmer and Web Designer.
-- modified at 16:26 Saturday 27th May, 2006
|
|
|
|
|
ADY007 wrote: But daMem.Update(dsMembers, "tblMembers") he is telling me that the Insert Command isn't there! but i am making a new row!
That is correct you have not written an INSERT statement. The INSERT statement has nothing to do with creating a new row in a DataTable . DataTable s know nothing about your database.
For such a simple action you are overcomplicating the whole thing. You do not need DataRows or DataTables.
Go back to my first response to you and see what I wrote. Change it to use the equivalent OleDb classes and change the parameters to ? (because access doesn't accept named parameters. That is a simpler and less convoluted solution.
"On two occasions, I have been asked [by members of Parliament], 'Pray, Mr. Babbage, if you put into the machine wrong figures, will the right answers come out?' I am not able to rightly apprehend the kind of confusion of ideas that could provoke such a question."
--Charles Babbage (1791-1871)
My: Website | Blog
|
|
|
|
|
I wrote everything you told me but here is the error i told you before about :
Exception Details: System.InvalidOperationException: ExecuteNonQuery: Connection property has not been initialized.
Adrian De Battista: .Net Programmer, Java Programmer and Web Designer.
|
|
|
|
|
After creating the cmd object put the line
cmd.Connection = conn
"On two occasions, I have been asked [by members of Parliament], 'Pray, Mr. Babbage, if you put into the machine wrong figures, will the right answers come out?' I am not able to rightly apprehend the kind of confusion of ideas that could provoke such a question."
--Charles Babbage (1791-1871)
My: Website | Blog
|
|
|
|
|
owww noo!!! another error occured! it is just the same as the one i made but why is this killing me
this is the error!
Exception Details: System.Data.OleDb.OleDbException: Syntax error in INSERT INTO statement.
Adrian De Battista: .Net Programmer, Java Programmer and Web Designer.
|
|
|
|
|
is it good if i write it like this??
cmd.CommandText = "INSERT tblMembers(Name, Surname) VALUES (@value1, @value2)"
cmd.Parameters.Add("@value1", firstValue)
cmd.Parameters.Add("@value2", secondValue)
Adrian De Battista: .Net Programmer, Java Programmer and Web Designer.
|
|
|
|