|
You what something like this :-
Dim f as WorkingForm<br />
f.show<br />
'Do something here<br />
f.close<br />
f.dispose<br />
f = nothing
Ensure the TopMost property of the WorkingForm is set to True.
Steve Jowett
-------------------------
Sometimes a man who deserves to be looked down upon because he is a fool, is only despised only because he is an 'I.T. Consultant'
|
|
|
|
|
I'm not shure but this might have the problem that the animation isn't going to go to well/smooth
perhaps multithreading would solve that problem
at the end of the thread that save the file fire an event that closes the form?
If my help was helpfull let me know, if not let me know why.
The only way we learn is by making mistakes.
|
|
|
|
|
I have a third party executable that I run, which writes its results to a text file. Unfortunately, it writes only to a single file, overwriting itself each time, and locking the file as it writes. As a result, if I run four copies of this simultaneously, for example, only one of those copies will sucessfully write to the log file.
Is there some way I could launch the file and intercept its file output operations (bearing in mind I have no knowledge of how it's doing that output), redirecting them to a unique instance of the log file each time it runs?
Thanks for any input, and do let me know if the above doesn't clearly explain what it is I am trying to do.
|
|
|
|
|
Hi,
if the log file's path or name somehow depends on the EXE's path or name, you could
create copies of the EXE with different paths or names.
Luc Pattyn [Forum Guidelines] [My Articles]
this months tips:
- use PRE tags to preserve formatting when showing multi-line code snippets
- before you ask a question here, search CodeProject, then Google
|
|
|
|
|
Unfortunately I'm looking at being able to run up to 100s of instances simultaneously, so that's just not practical. Thanks, though.
|
|
|
|
|
Hi, if the EXE creates the log at a relative position you could programmatically start it with
different explicit "current directory" values (use Process and ProcessStartInfo classes).
Luc Pattyn [Forum Guidelines] [My Articles]
this months tips:
- use PRE tags to preserve formatting when showing multi-line code snippets
- before you ask a question here, search CodeProject, then Google
|
|
|
|
|
Ooh - I'll look into that, thanks.
|
|
|
|
|
Could anyone please help on how to disable the click event of datagrid. Bc when I disable the datagrid, the datagrid is just gray out but it's not disabled. I want the datagrid disable so the user can see it but can not click on it for SelectedIndexChanged event.
Thanks in advance
|
|
|
|
|
Why not just make it ReadOnly?
|
|
|
|
|
I have created a Button Bar user control which consists on a Panel control.
Public Class ButtonBar<br />
<br />
Public ReadOnly Property Buttons() As ButtonCollection<br />
Get<br />
Return buttonPanel.Controls<br />
End Get<br />
End Property<br />
<br />
<br />
Private Sub ButtonBar_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load<br />
Me.Dock = DockStyle.Bottom<br />
End Sub<br />
<br />
End Class
Into the panel I wish to add a collection of Buttons, therefore I have created a ButtonCollection class which inherits from ControlCollection
Public Class ButtonCollection<br />
Inherits System.Windows.Forms.Control.ControlCollection<br />
<br />
Public Sub New(ByVal Owner As System.Windows.Forms.Control)<br />
MyBase.New(Owner)<br />
End Sub<br />
<br />
Public Shadows ReadOnly Property Count() As Integer<br />
Get<br />
Return MyBase.Count<br />
End Get<br />
End Property<br />
<br />
Public Shadows ReadOnly Property IsReadOnly() As Boolean<br />
Get<br />
Return MyBase.IsReadOnly<br />
End Get<br />
End Property<br />
<br />
Public Shadows ReadOnly Property Item(ByVal Key As String) As Infragistics.Win.Misc.UltraButton<br />
Get<br />
Return CType(MyBase.Item(Key), Infragistics.Win.Misc.UltraButton)<br />
End Get<br />
End Property<br />
<br />
Public Shadows ReadOnly Property Owner() As System.Windows.Forms.Control<br />
Get<br />
Return MyBase.Owner<br />
End Get<br />
End Property<br />
<br />
Public Shadows ReadOnly Property Item(ByVal Index As Integer) As Infragistics.Win.Misc.UltraButton<br />
Get<br />
Return CType(MyBase.Item(Index), Infragistics.Win.Misc.UltraButton)<br />
End Get<br />
End Property<br />
<br />
Public Shadows Sub Add(ByVal Button As Infragistics.Win.Misc.UltraButton)<br />
Dim x As Integer = Item(Count - 1).Location.X + Item(Count - 1).Width + 10<br />
Button.Location = New System.Drawing.Point(x, 8)<br />
MyBase.Add(Button)<br />
End Sub<br />
<br />
Public Shadows Sub AddRange(ByVal Buttons() As Infragistics.Win.Misc.UltraButton)<br />
MyBase.AddRange(Buttons)<br />
End Sub<br />
<br />
Public Shadows Sub Clear()<br />
MyBase.Clear()<br />
End Sub<br />
<br />
Public Shadows Function Contains(ByVal Button As Infragistics.Win.Misc.UltraButton) As Boolean<br />
Return MyBase.Contains(Button)<br />
End Function<br />
<br />
Public Shadows Function Contains(ByVal Key As String) As Boolean<br />
Return MyBase.ContainsKey(Key)<br />
End Function<br />
<br />
Public Shadows Function ContainsKey(ByVal Key As String) As Boolean<br />
Return MyBase.ContainsKey(Key)<br />
End Function<br />
<br />
Public Shadows Sub CopyTo(ByRef Array As System.Array, ByVal Index As Integer)<br />
MyBase.CopyTo(Array, Index)<br />
End Sub<br />
<br />
Public Shadows Function Find(ByVal Key As String, ByVal SearchAllChildren As Boolean) As Infragistics.Win.Misc.UltraButton()<br />
Return MyBase.Find(Key, SearchAllChildren)<br />
End Function<br />
<br />
Public Shadows Function IndexOf(ByVal Button As Infragistics.Win.Misc.UltraButton) As Integer<br />
MyBase.IndexOf(Button)<br />
End Function<br />
<br />
Public Shadows Function IndexOf(ByVal Key As String) As Integer<br />
MyBase.IndexOfKey(Key)<br />
End Function<br />
<br />
Public Shadows Function IndexOfKey(ByVal Key As String) As Integer<br />
MyBase.IndexOfKey(Key)<br />
End Function<br />
<br />
Public Shadows Sub Remove(ByVal Button As Infragistics.Win.Misc.UltraButton)<br />
MyBase.Remove(Button)<br />
End Sub<br />
<br />
Public Shadows Sub Remove(ByVal Index As Integer)<br />
MyBase.RemoveAt(Index)<br />
End Sub<br />
<br />
Public Shadows Sub Remove(ByVal Key As String)<br />
MyBase.RemoveByKey(Key)<br />
End Sub<br />
<br />
Public Shadows Sub RemoveAt(ByVal Index As Integer)<br />
MyBase.RemoveAt(Index)<br />
End Sub<br />
<br />
Public Shadows Sub RemoveByKey(ByVal Key As String)<br />
MyBase.RemoveByKey(Key)<br />
End Sub<br />
<br />
Public Shadows Function ToString() As String<br />
Return MyBase.ToString<br />
End Function<br />
<br />
End Class
My problem is that the property Buttons appears on the properties window in the VB.NET IDE, but :-
a) Does not show any buttons that I have added previously.
b) When a button is added, it is not displayed on the form.
Any pointers on where I should go from here would be greatly appreciated.
Thanks
Steve Jowett
-------------------------
Sometimes a man who deserves to be looked down upon because he is a fool, is only despised only because he is an 'I.T. Consultant'
|
|
|
|
|
|
Is the following C# code the equivalent to the VB code below:
C# code:
if (Page.Header != null)
VB.NET code:
If Not Page.Header Is Nothing Then
Thanks
|
|
|
|
|
Yes.
Experience is the sum of all the mistakes you have done.
|
|
|
|
|
Another alternative, in VB 2005 or higher, is:
If Page.Header IsNot Nothing Then
David Anton
http://www.tangiblesoftwaresolutions.com
C++ to C# Converter
C++ to VB Converter
C++ to Java Converter
C++ to C++/CLI Converter
Instant C#: VB to C# converter
Instant VB: C# to VB converter
Instant C++: converts C# to C++/CLI and VB to C++/CLI
|
|
|
|
|
Hi,
I am sort of new to VB.NET. Using .NET 2.0. In C# I would have static properties in my Globals class. No I am trying to implement the same feature in VB.NET, but it is not working. Here is my declaration in Globals.vb:
Private Const COMPANY_LONG_NAME As String = "My Company"
Public Shared ReadOnly Property CompanyLongName() As String
Get
Return COMPANY_LONG_NAME
End Get
End Property
But then I try to write this name in my .aspx page, but when I try Globals. then CompanyLongName does not show in the list to select from.
Also, the namespace is MyNameSpace, in this namespace the Globals class resides.
Please can someone explain why.
Regards
|
|
|
|
|
Edit your question instead of reposting it.
Experience is the sum of all the mistakes you have done.
|
|
|
|
|
Sorry the server was giving problems, it kept on telling me that my psot was not added due to heavy workload on IIS.
|
|
|
|
|
is your class in app_data?
|
|
|
|
|
my idea is..
when open the exe form1 will appear onto the screen.
And then when click on form1, i wanna close form1 and form2 will appear.
pls suggest to me...
|
|
|
|
|
MAke them both controls and host them on the same form.
Christian Graus - Microsoft MVP - C++
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
It the Form_Closed event of Form1 :-
Dim f as form2<br />
f.Show()
Steve Jowett
-------------------------
Sometimes a man who deserves to be looked down upon because he is a fool, is only despised only because he is an 'I.T. Consultant'
|
|
|
|
|
won't work. once the scope of the close event is done, the variable is released. you need to put the form2 in it's own message loop.
sub main
application.run(form1)
application.run(form2)
end sub
|
|
|
|
|
Hi,
I am sort of new to VB.NET. Using .NET 2.0. In C# I would have static properties in my Globals class. No I am trying to implement the same feature in VB.NET, but it is not working. Here is my declaration in Globals.vb:
Private Const COMPANY_LONG_NAME As String = "My Company"
Public Shared ReadOnly Property CompanyLongName() As String
Get
Return COMPANY_LONG_NAME
End Get
End Property
But then I try to write this name in my .aspx page, but when I try Globals. then CompanyLongName does not show in the list to select from.
Please can someone explain why.
Regards
|
|
|
|
|
Do you use the same namespace for the aspx pages? If not, have you imported the namespace? If not, then you have to use MyNameSpace.Globals to access the class.
Experience is the sum of all the mistakes you have done.
|
|
|
|
|
my idea is..
open the exe form1 will appear onto the screen.
And then when click on form1, i wanna close form1 and form2 will appear.
pls suggest to me...
|
|
|
|