|
Yeah I know about try/catch, and I did implement it along with anoder code hoping that the HRESULT would be translated into a .Net exeption... but yet again the msgbox contains only "Exception from HRESULT: 0x80040202"
I saw many many translations of this HRESULT on net, but still no solution...
|
|
|
|
|
I'm looking for a good manual about writing code for developing controls, as well for the code as for the designer part. I need good and extensive information about the several classes often used in controls: parentcontrols, containercontrols, controldesigner, etc... Anyone has a interesting link for me?
|
|
|
|
|
I am trying to use the following code to make sure all codes are closed when clicking the x in the top right hand corner.
---
Private Sub frmTestTop_FormClosing(ByVal sender As Object, ByVal e As system.Windows.Forms.FormClosingEventArgs) Handles Me.FormClosing
me.close
End Sub
---
It is however coming up with an dll stock overflow error, what am i doing wrong?
Is there an easier way to do this???
Cheers
|
|
|
|
|
if u wanna close alll your forms, you can just put a close button on your form and code application.exit() or End in its clickin event ..
thats it....
|
|
|
|
|
Its the close button in the control box, which when you click it just closes the current form, not any that may be hidden.
Any ideas?
Its in vb.net 2005 btw
|
|
|
|
|
Application.Exit() ?
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
I hadn't ever heard of that one either, but it really exists...
My advice is free, and you may get what you paid for.
|
|
|
|
|
The reason you are getting a Stack Overflow Error is because in your code, FormClosing allows you to perform last minute steps before the app shuts down. So when your app tries to close, you call Me.Close() which loops back and calls the same function continually.
I hope that makes since.
Trinity: Neo... nobody has ever done this before.
Neo: That's why it's going to work.
|
|
|
|
|
Yeah i get it. The reason i am trying to use it, is because the first form, i want to show another one and CLOSE the original form, however, when i close the first form, the whole program closes, so i had to hide it to get around this. Is there any way to get around this??? Sorry to bother you all, I'm just really stuck and its annoying!!
|
|
|
|
|
Well you can just hide the first form (Me.Hide() ), and then when you want to close all the forms, use Application.Exit() .
Trinity: Neo... nobody has ever done this before.
Neo: That's why it's going to work.
|
|
|
|
|
well i think if first form is hidden by using me.hide(), then u wont be able to close it through form2(or your most active form)using that cross button in controll box. and even if you could then why to increase complexity.
jst hide yr form one and close yr succesive forms by me.close
and appliction.exit on the last form will be the easiest way...
try it out...
|
|
|
|
|
Why are my validator controls grayed out in VS 2005 for a Windows app? Ive never had that issue before but this is the first time Ive tried to use them in 2005.
CleaKO
"I think you'll be okay here, they have a thin candy shell. 'Surprised you didn't know that.'" - Tommy (Tommy Boy) "Fill it up again! Fill it up again! Once it hits your lips, it's so good!" - Frank the Tank (Old School)
|
|
|
|
|
Dunno, tell us more.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
Well according to this[^] it looks like they arent used to Windows Apps anymore, but I could swear they were available for Windows Apps for 1.1. Oh well, I have no problem with just looking at the controls and popping up a message box, but Im curious as to why they arent available for Windows Apps anymore.
CleaKO
"I think you'll be okay here, they have a thin candy shell. 'Surprised you didn't know that.'" - Tommy (Tommy Boy) "Fill it up again! Fill it up again! Once it hits your lips, it's so good!" - Frank the Tank (Old School)
|
|
|
|
|
I populate two datagrids from queries to Access databases by calling GridPopulate_TS() from a thread.
The first time the datagrids are populated.
However if GridPopulate_TS() is called a second time the datagrids do not get populated with the new data (they remain populated with the old data).
It is as though the datagrids become stuck!
Anyone have any ideas that may help?
<code> Public Sub GridPopulate_TS()
Dim oDel As New _
GridPopulateDelegate( _
AddressOf Me.sendScanToGrid)
Me.Invoke(oDel)
End Sub
Public Delegate Sub GridPopulateDelegate()
Public Sub sendScanToGrid()
con.ConnectionString = "PROVIDER=Microsoft.Jet.OLEDB.4.0;Data Source =" + AccessDB
con.Open()
ds.Clear()
sql = "select * from qryFileInfo"
da = New OleDbDataAdapter(sql, con)
da.Fill(ds, "fileinfo")
DataGrid1.SetDataBinding(ds, "fileinfo")
DataGrid1.ReadOnly = True
sql = "select * from qryFileTypeInfo"
da = New OleDbDataAdapter(sql, con)
da.Fill(ds, "filetypeinfo")
DataGrid2.SetDataBinding(ds, "filetypeinfo")
DataGrid2.ReadOnly = True
con.Close()
End Sub<code></code></code>
|
|
|
|
|
Ok I fixed it.
By setting a new binding context each time the datagrids are populated.
This took me four hours of trawling the internet and experimentation - so I hope it is of help to others.
<code>Public Sub GridPopulate_TS()
Dim oDel As New _
GridPopulateDelegate( _
AddressOf Me.sendScanToGrid)
Me.Invoke(oDel)
End Sub
Public Delegate Sub GridPopulateDelegate()
Public Sub sendScanToGrid()
con.ConnectionString = "PROVIDER=Microsoft.Jet.OLEDB.4.0;Data Source =" + AccessDB
con.Open()
ds.Clear()
sql = "select * from qryFileInfo"
da = New OleDbDataAdapter(sql, con)
da.Fill(ds, "fileinfo")
DataGrid1.BindingContext = New BindingContext
DataGrid1.SetDataBinding(ds, "fileinfo")
DataGrid1.ReadOnly = True
sql = "select * from qryFileTypeInfo"
da = New OleDbDataAdapter(sql, con)
da.Fill(ds, "filetypeinfo")
DataGrid2.BindingContext = New BindingContext
DataGrid2.SetDataBinding(ds, "filetypeinfo")
DataGrid2.ReadOnly = True
con.Close()
End Sub</code>
|
|
|
|
|
How do i get the datatype size of a column or an attribute from a database...
i am working on my academic project and my topic is database migartion....
and i am doing it using vb.net 2005...
as soon as i complete my project i'll post it here,....
i needed help... i am stuck half the way thru...
i want to know how to return or retrieve the datatype size from a source database... i need that size so that i can get the datatype name and size from source database and i want to create a table with the same table name with same attribute name and size... in the destination source....
sorry.. my english is worst .. hope u understand what i meant...
this is my 1st post plz dont disappoint me.. i am a total newbie...
thanking you...in advance
Abhijith
Abhijith
|
|
|
|
|
Abhijith Rao wrote: How do i get the datatype size of a column or an attribute from a database...
What database?
In SQL Server 2000 you can write something like this:
SELECT * FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = 'Products'
|
|
|
|
|
sorry i was not able to put my view into words.. ok lemme explain... with example...
if i am connected to oracle database.. i want to read the column names,their datatype(such as varachar,number),and their datatype size
(varchar(100)... using getDatatype returnns varchar2 but not their size which is 100 here.)
how do i do that in vb 2005 which method would return me the sizes of the datatype...
i want to do that for MSACCESS,MS SERVER 2000,MS SERVER 2005,AND ORACLE...
HOPE THIS CONVEYS..
Abhijith
|
|
|
|
|
i am waiting for u r valuable solutions please help....
Abhijith
|
|
|
|
|
Does anybody know anything about writing code to function with network cameras? I’m trying to find a solution for monitoring my children and I would like to write an application that will detect motion and sound from a network camera.[^] When motion or sound is detected I would like the application to become active with the view that detected the sound or motion.
This is just a concept right now. I haven’t even purchased the camera yet. I’m just wondering if it is possible or worth the effort.
I appreciate any input including positive or negative experiences with this.
Thanks
Brad
|
|
|
|
|
It looks like it already supplies most of what you'd need, short of a web server or media server. If you wanted to do your own custom solution, you'd have to have an SDK from the manufacturer.
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
Dave Kreskowiak wrote: It looks like it already supplies most of what you'd need
That’s right. I’d like to grab the External Trigger and Motion Alarm Output and force the camera application (or my own application (with theirs embedded??)) to be active. Maybe the cameras software already does this but other cameras that I’ve looked at simply use this feature to send an email.
For example, if I’m working on my computer and one of the cameras is activated I’d like that camera view to open “in front” of what ever else I have opened.
I don’t have any experience with this but I’m assuming that the manufacturer would not be very likely to give out the SDK without me forking over a good bit of cash.
|
|
|
|
|
Brad Fackrell wrote: I’m assuming that the manufacturer would not be very likely to give out the SDK
I stand corrected. I just contacted the company that sells the camera and they are going to send me the SDK.
|
|
|
|
|
Brad Fackrell wrote: but I’m assuming that the manufacturer would not be very likely to give out the SDK without me forking over a good bit of cash.
Not really. Most companies supply their SDK's for free (if they have one!), or there's a charge that's normally not very high. But, there's only one way to find out - give them a call!
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|