|
|
When I'm using an API spy over the "webpage" part of the web browser, Firefox to be exact, it never reads an textbox's handle or any control. Just "MozillaWindowClass". So my question is how do I find its handle? or is it even possible?
P.S. Its the same thing with IE and the new AIM6.
|
|
|
|
|
Hi,
I am looking for a soulution in VB.Net to have a drag and drop and over a db. This would mean updating the db after a drag and drop. Also the ability to add, delete and change information on nodes and update the underlying db.
Thanks in advance
|
|
|
|
|
I'm not sure if this is right board.... Does anyone know if there are problems using msscript.ocx in multithreaded environment? specificaly I'm using it from C++ COM object that is called from IIS. Each clients session has an object for processing some vbscripts. What I'm seeing is that if one client destroys the msscript object/ or even just calls "reset" on it another object of it on another thread dies as well. - cut right in a middle of a vb call
Please help!
"personal world record"
|
|
|
|
|
hi
I'm programming a Yahoo! Messenger mini-client.
I'm using BrickSoftIM FastIM COM class...
Here's the code:
Dim WithEvents myYAHOO As FastIM_YAHOO<br />
Public Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load<br />
myYAHOO = New FastIM_YAHOO<br />
End Sub
with only one event-handler:
Sub myYAHOO_OnLogin() Handles myYAHOO.OnLogin<br />
log.Text = log.Text & "Logged IN!!!" & vbCrLf<br />
End Sub
like this, It works perfectly, BUT when I add anoder event-handler:
Private Sub myYAHOO_OnError(ByVal ErrorCode As Integer) Handles myYAHOO.OnError<br />
log.Text = log.Text & "Error Code:" & CStr(ErrorCode) & vbCrLf<br />
End Sub
I get this error: "Exception from HRESULT: 0x80040202"
I saw many help-requests on the net about more than just one event-handler when using COM classes but haven't found a solution
Help much appreciated tnx !!!
EDIT: This problem is only in VB.Net, The same code in VB6 works perfect...
|
|
|
|
|
Hi,
I am not sure about the multiple event problem in general, but in your case, I strongly recommend not to try and handle errors "manually". Vb.net has the try and catch statements if you need to handle errors:
<br />
Private Sub something()<br />
Try<br />
'your code here<br />
Catch ex as Exception<br />
'your response to the expected error here, for example:<br />
MsgBox(ex.Message)<br />
End Try<br />
End Sub<br />
The Catch statement can monitor for specific errors, or errors of a certain type (for example sql errors). If you don't want to write your error handling code for each Sub and Function separately, just write your own error handling function or sub somewhere, for example:
<br />
Public Function ErrorHandler(ByVal err As Exception)<br />
MsgBox(err.Message)<br />
End Function<br />
Good luck,
Johan
My advice is free, and you may get what you paid for.
|
|
|
|
|
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
|
|
|
|