|
I'm not writing it for you. I barely have enough time to look at my own code, let alone someone elses.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Hey,
I have a full file path e.g.
C:\Test\File.doc
Obviously this is a MS Word document. But is there a way from this file name to get the Application that is used, in this case winword.exe?
Thanks for your help, this is very urgent
chris
|
|
|
|
|
|
Cheers tom
a dream it does indeed
Take care
Chris
|
|
|
|
|
Hi,
I was able to write a piece of code that would hook a process and if I try to open a *.txt file, for example, a message would be displayed and the application, Notepad, would wait until I respond to the message. Now I would like to do the same thing remotely. For example..
1, Enable the hook on a server.
2, Access a network share on that server from my desktop
3, Open a file on that share and have a message displayed on the server side while at the same time making Notepad on my desktop wait until I respond to the message on the server.
A good example of this is in an HSM tool. No software is installed on the desktops but the applications wait for the recall to be complete before giving back control to the user.
Any help would be greatly appreciated.
Thanks,
|
|
|
|
|
Hi,
Does any one know a way in .Net to read and write at the disk block level?
Thanks
|
|
|
|
|
It cannot be done using the .NET Base Class Library. You'll have to P/Invoke the API calls yourself. You need to start with CreateFile[^]. There is alot to read and you MUST understand how to use these functions and structures completely. There is no example in VB.NET, this is all low level stuff best handled by C++.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Whenever i try to install assembly throug gacutil /i it shows Unkown Option: and help me out. Tell me how to install through gacutil
|
|
|
|
|
GacUtil checks each argument to see if it is a valid switch. If an invalid switch is found you get the "Unknown Option" error.
The most likely cause of this error is specifying an assembly (possible including the path) where there is a space in the name( or path).
The solution is to use quotes around the file name.
Eg.
GacUtil /i c:\My Dlls\MyDll.dll - Will error.
GacUtil /i "c:\My Dlls\MyDll.dll" - Will register fine.
If you have knowledge, let others light their candles at it.
Margaret Fuller (1810 - 1850)
|
|
|
|
|
Dear All,
I really need help.
Does anybody know how to hide Treeview node in VB.net ?
Thank you very much for any helps and ideas.
Regards.
Edit/Delete Message
|
|
|
|
|
You can't. The control that the TreeView class wraps doesn't support it.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
I want to position a button programmatically, and I found a section of code. Is this the only way to do it?
' Visual Basic
Button1.Location = New Point(100, 100)
// C#
button1.Location = new Point(100, 100);
Thanks
Brendan
|
|
|
|
|
if u want to put it in any point ,
Yeah that is the only way really.
but u can dock it like
Button1.Dock = DockStylr.'as u like .
button1.Dock = DockStyle.// asu like also
or if u want to keep the diffrence between it and another Control u might use the Anchor property
ByMindOnlyYouCanDoIt
|
|
|
|
|
How do I open an URL using .NET? In Visual Basic 6 I used the ShellExecute API call. I defined the constant variables in a module file like this:
' Constant variables for the ShellExecute API
Public Const SW_SHOWNORMAL = 1
Public Const SW_SHOWMINIMIZED = 2
Public Const SW_SHOWMAXIMIZED = 3
Public Const SW_SHOW = 5
Public Const SW_MINIMIZE = 6
Public Const SW_SHOWMINNOACTIVE = 7
Public Const SW_SHOWNA = 8
Public Const SW_RESTORE = 9
Public Const SW_SHOWDEFAULT = 10
If this is the API to be used in .NET, where do I declare these constant variables? If there is another way of doing it, please let me know.
Thanks
Brendan
|
|
|
|
|
In the future, search the forums first. You answer has been covered so many times, it's silly. For instance, the same question was posted about 8 down from yours.
You need to use the Process class and just launch the URL. This will launch the default web browser with the URL you give it.
Process.Start("http://myurl.somehwere.com")
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
I need help with regards to my frmSplash form. Not sure where to load it. I want it to display while the application loads. Where do I put the call to the frmSplash form? And how does a person determine how long an application loads? The name of my main/startup form is frmMain. Will this differ between VB.net and C#.net? I went through some Visual Basic 6 code and they did it in a module file like this:
Sub Main()
frmSplash.Show
End Sub
Thanks
Brendan
|
|
|
|
|
Why dont you put the form in a ascx file, set it in a Sub Control_load function.
file.ascx
<%@ Control Language="VB" Src="file.vb" Inherits="Classname">
<td
<asp:textbox="" id="Namefield" runat="server"> |
file.vb
Public Sub Control_Load(ByVal Sender As Object, ByVal E As EventArgs)
'The code in here will execute when loading a ascx file
End Sub
file.aspx
<%@ Register TagPrefix="UsrCtrl" TagName="FormSplash" Src="file.ascx" %>
'Point to it from your aspx code.
<usrctrl:formsplash id="Form" runat="server">
etc, etc
|
|
|
|
|
It's not a website, but an application.
|
|
|
|
|
declare your splash form as a class variable i.e.
dim splashForm as new splashFrm = null
then in the forms constructor show the form i.e
splashfrm = new splashFrm
spashFrm.show
application.doEvents 'this is to force the application to show the splash immediately
then you can continue processing in the constructor. Then in the forms load event do something like
if splashFrm <> null then
splashFrm.dispose
end if
sometimes the processing is too quick to actually see the splash form - in this case before you dispose of the splash form do something like - System.Threading.thread.sleep(3000)
|
|
|
|
|
I have a form called frmAbout which displays basic information about the application. When someone clicks on the About Us menu, this form is displayed. I display it as follows:
The code executes in the menu’s mnuHelpAbout_Click event handler.
' Load the about form
Dim aboutForm As New frmAbout()
aboutForm.ShowDialog()
On the about form is a button which allows the user to close the window. The code in the event handler cmdClose_Click is:
' Close form and release from memory
Me.Close()
I need to know, when I use the Form.close() method, does this mean the reference to this form is destroyed and no longer exists? Is there a better way of doing this? I also read that there is a Dispose method. When is this used?
Thanks
Brendan
|
|
|
|
|
Brendan Vogt wrote:
I need to know, when I use the Form.close() method, does this mean the reference to this form is destroyed and no longer exists?
No, it doesn't. You actually don't have to put any .Close() statement in the Closing event of the form. The form is already closing when this event fires.
But, when you use .ShowDialog() , you have to explicitly .Dispose() of the form when your done. If you don't, you will cause a resource leak in your application. Form 's use resources outside the managed framework which must be explicitly .Dispose() ed of.
'Load the about form
Dim aboutForm As New frmAbout()
aboutForm.ShowDialog()
aboutForm.Dispose()
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
I have two separate programs that worked just fine one is in VB6 the other is in VB.Net. I get error when I tried to upgrade VB6 to VB.Net. ( Got an error message about MSCOMMX etc...) The first program is in VB6, reads in the barcode scanner data great. (source code can be found at www.freevbcode.com/ShowCode.asp?ID=2408)and the Second part of the code copy to the clipboard (VB.Net).
Public Class frmMain
Inherits System.Windows.Forms.Form
Private Sub btnCopy_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnCopy.Click
'This will add the text in the textbox to the clipboard. With
'the value set to false it will clear the clipboard of the data
'added by this program when the program exits.
Clipboard.SetDataObject(txtSource.Text, False)
End Sub
Private Sub btnPaste_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnPaste.Click
'We want the data to be in a text format to add in our textbox
txtDest.Text = Clipboard.GetDataObject.GetData(DataFormats.Text, True)
End Sub
Private Sub frmMain_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
End Sub
Private Sub txtSource_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles txtSource.TextChanged
End Sub
End Class
I want to compare the serial data that comes in from the first program to a list of other data. For example: if the serial data is YES, it will compare "YES", "NO", OR "MAYBE" will be the three choices. When yes is true, then it would print out a phrase, Ex: "You are correct". Then copy to the clipboard "You are correct"
So, my questions are is there a way I can convert VB6 to VB.Net, or VB.Net to Vb6. And is there a simple code to do the above compare function.
|
|
|
|
|
How can i change datagrid's column heading and how con i change null values to what ever i want.
|
|
|
|
|
I had problem opening SaveAs Dialog in Powerpoint.
and managed to solve this issue. However, I am
still trying to get the name file that I decided
to save from the dialog. Anyone has idea please
help.
Thanks in advance.
Shinya
With Application.FileDialog(ppFileDialogSave)
' Set file filter flags
Call .Extensions.Add("*.PPT", "PowerPoint Presentation")
Call .Extensions.Add("*.PPS", "PowerPoint Show")
.ActionButtonName = "Save"
.DefaultDirectoryRegKey = "Default"
.DialogTitle = "Save as"
.DirectoriesOnly = False
.InitialView = ppFileDialogViewPreview
.IsMultiSelect = False
.IsPrintEnabled = False
.IsReadOnlyEnabled = True
.OnAction = "ProcessSelection"
.UseODMADlgs = False
.Launch
End With
End Sub
|
|
|
|
|
Hi
I'm trying to read from MP3 Vedio File, I Found Many way to read the header but i need to read the Picture. Can any one help me to do that?
i'll be thankfull for you.
The_Debugger
|
|
|
|