|
You can check for this in the AfterLabelEdit[^] event of the TreeView control.
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
thanks,,,
your idea worked,,,
regards
manisha vyas
|
|
|
|
|
Hi,
I am developing a VB.NET desktop application. I am using Threading in my application. In the main thread I am creating a thread like this to start Scanning.
Try
Dim thrd1 As Thread
thrd1 = New Thread(AddressOf StartScanning)
thrd1.Priority = ThreadPriority.Normal
thrd1.Start()
Catch ex As System.Runtime.InteropServices.SEHException
MessageBox.Show(ex.Message & vbCrLf & "ErrorCode: " & ex.ErrorCode, "Error",
MessageBoxButtons.OK, MessageBoxIcon.Stop)
Exit Sub
End Try
I am having a button on GUI to stop the scanning process. My problem is I am unable to click the STOP button (i.e. the button is not being clicked, enenthough i click on it). Not only this button, I am unable to click on any of the controls of my form.
Is there any problem with threading or something else?
Thanx,
Sujanakar
|
|
|
|
|
There's nothing wrong with the code you've posted. Perhaps the problem is in the StartScanning method?? Does the component you're using support being manipulated from the non GUI thread?
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
Hello everyone,
I have a little question. I have a datagridview with an unbound column, and some other columns inserted from a datatable as the datasource for the grid.
My problem is, the unbound column is always shown as the first column on the left. I need that column to be the last on the right. any idea on how to do this?
thanks in advance for your help!
~~~ From Milano to The Hague, easy as it goes ~~~
|
|
|
|
|
You can set the order of DataGridView Columns using the DisplayIndex property.
DataGridViewName.Columns("ColumnName").DisplayIndex = X
|
|
|
|
|
Hi
I'd like to change the original form caption contextmenu, for example, to disenable the "Close" menuitem and add my "Cancel". Does anybody know how to make that? Thanks.
David
|
|
|
|
|
Will, I've never had a reason to do it myself, but this[^] is where you start.
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
Could you please solve the issue for me ?
Requirements:
I have several form midchildren (Please note they are midchild forms). Each has formborderstyle.sizableToolwindow -on every form caption, there is a systemmenu Cancel button.
Now click the Cancel button, the form is closed/disposed. Instead of to close the form, my purpose is to hide it or activate an event when click the button.
Do your guys have any advice? Thanks.
abc
|
|
|
|
|
Private WithEvents _oChildForm As New System.Windows.Forms.Form
Private Sub frmMain_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
_oChildForm = New System.Windows.Forms.Form
With _oChildForm
.FormBorderStyle = FormBorderStyle.Sizable
.Text = "ChildForm"
.MdiParent = Me
End With
_oChildForm.Show()
End Sub
Protected Sub _oChildForm_Cancel(ByVal sender As Object, ByVal e As System.ComponentModel.CancelEventArgs) Handles _oChildForm.Closing
_oChildForm.Hide()
End Sub
abc
|
|
|
|
|
With all the new deatils, this question now has absolutely nothing to do with your original post. I'll refer you to the top post in all the programming forums for an explanation...
You can't change the behavior of that little X. Period. End of story.
No matter what, you're MDIChild form is going to get a FormClosing event. Sooooo, just handle that event, call Me.Hide or whatever you want the form to do, then set the Cancel property of the FormCloseEventArgs to True to cancel closing the form.
Now, you've introduced a problem. When you go to close your application, the child forms will force your app to stay open! Your parent form has to expose a flag to signal these child forms that the the application is closing. Your little Closing event handlers in the child forms must check this flag to see if they really should close and not hide themselves!
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
is there a way to know the number of tables in an sql database without opening sql enterprise manager/configuration? using vb.net 2005 application a simple codes/explanation will help thanks...
-- modified at 4:04 Monday 3rd July, 2006
|
|
|
|
|
You can find this information from sysobjects table. All the user defined table having the type 'U'
So writing a query like this will give u number of tables in a database
select count(*) from sysobjects where type = 'U'
NOTE :- Check for the table named "dtProperties", it is a system defined table but type is "U" only (so whatever the count comes COUNT-1 will give u exact number), no idea why, if anyone know about this then please clear my doubt regarding this table.
|
|
|
|
|
thanks this will help... ill try this one....
thank you again...
|
|
|
|
|
I don't know how to wirte Boostrapper in vb.net check DotNetFramework is installed in Client machine
................
-- modified at 4:01 Monday 3rd July, 2006
|
|
|
|
|
Bootstrapper?? For what? What is this app supposed to be doing?
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
Bootstrapper for dot net framework? I 1 2 check machine is installed it or not, if not install
................
|
|
|
|
|
Socheat.Net wrote: I 1 2 check machine
Enough with the SMS speak. You have a full keyboard in front of you - use it!
I take it you're looking to see if the .NET Framework is installed before your .MSI is launched for installation. You can't write this in VB.NET, or C#, or any other Managed Language. If the .NET Framework isn't installed, how is your code to check for the presence of it going to execute??
There are a bunch of examples out there on how to do this, in unmanaged languages - even prewritten packages. All you have to do is either search the articles here for "bootstrap" or Google for ".NET Framework install bootstrap".
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
Dave Kreskowiak wrote: the articles here for "bootstrap" or Google for ".NET Framework install bootstrap".
Where?
|
|
|
|
|
Roath Kanel wrote: Where?
You're joking, right?
You've never seen the search box directly under Bob? The little green CP alien at the top of the screen?
And don't you dare tell me you don't know what Google is!
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
Dave Kreskowiak wrote: You're joking, right?
No I'm not.
Dave Kreskowiak wrote: You've never seen the search box directly under Bob?
No I haven't.
Dave Kreskowiak wrote: The little green CP alien at the top of the screen?
Where?
Dave Kreskowiak wrote: And don't you dare tell me you don't know what Google is!
Yes I know google.
|
|
|
|
|
Roath Kanel wrote: Dave Kreskowiak wrote:
The little green CP alien at the top of the screen?
Where?
Directly under the little green alien at the top of The CodeProject web page!!
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
Ok, I see what you mean now. You mean the search text box under the code project title. We are in the problem of miss cummunication.
|
|
|
|
|
Socheat, you do not need to write your donw bootstrapper. Try to check Microsoft Download Center[^] then download it. But work only for vs.net 2003.
|
|
|
|
|
Hi,
I am developing crystal report in VB.NET. While i printing the report directly "Logon failed" Occurs. How to over come this.
Below the code i used in the project.
Dim Reportviewer As New frmReportviewer
Dim PrinttoKitchen As New crptPrinttokitchen
Str_Query = "{View_HeaderFooterRecord.fd_bill_id} = " & Int_OrderBillID
PrinttoKitchen.RecordSelectionFormula = Str_Query
Reportviewer.repnam = PrinttoKitchen
'Reportviewer.Show()
PrinttoKitchen.PrintOptions.PrinterName = PrinterName
PrinttoKitchen.PrintToPrinter(1, False, 0, 0)
Thank's in advance,
Senthil V.
|
|
|
|