Answer Questions
GuyFawkes exporting visual basic textbox strings to an excel spreadsheet, need some direction...
I am very new at Visual basic. I am currently at a stopping point. I want to be able to take the text that is entered on the form and send it into a excel spreadsheet, everytime I invoke the click event of a button. Is this possible if so, can you give me some direction, I've attempted searches, and have come across everything but this in vb. An interesting article which will show you how to get VB.Net to interact with Excel. How to automate Excel from VB.Net http://support.microsoft.com/kb/q301982/ Here's an example which will add the contents of an array into an excel spreadsheet. You'll need to ensure that you set the reference to the Excel Object Class L ...Show All
MuscleHead How to get context menu for webBrowser control
I am using the webBrowser control to do ftp and this works great... When i right click on a folder in the browser window i am presented with the standard menu items.. I have alredy worked with the ShellAPI and have project that wraps a treeview so that i can get the shellFolder that is assoisated with the treeNode...The code below is what i use to get the context menu for a shellFolder. I would like to get be able to capture the context menu and add items, then handle the commands with the system.windows.forms.webBrowser.. how do i capture the context menu so that i can add items.. thanks erik public static bool GetIContextMenu( IShellFolder parent, IntPtr [] pidls, out IntPtr iContextMenuPtr, ...Show All
DotFrammie How to use the WMI classes "Win32_LogicalFileAuditing" and "Win32_SecuritySettingAuditing"?
I have to extract details about file, directory and registry auditing setting. I am not able to use the above WMI classes directly to get the required data. so can anyone tell me how to use those classes to get the required data Really neat tool from MS web site called WMICodeCreator, you just set language, select Class then you get a choice of class properties, select one and the code appears in the text window ready to cut and paste. It does more... You can download the WMI SDK from MSDN, lots of information there. When I used WMI I have had to look at some of the scripts on MSDN and convert them, looked on some of the other sites I have used and none mention or make use of these classes. ...Show All
CodeDjinn try,catch, end try problem
Since 2002 I've been using try, catch, end try just like all of you have. I have many completed projects where it worked fine. Right now I've been reading a book of generics and started an example. For the first time, I typed try, pressed enter and got the usual Try Catch ex As Exception End Try The problem is Exception is underlined and says a type is expected. If I substitute a particular exception it works fine, but Exception itself demands a type. I opened up an old project and Exception wasn't underlined. Below the block I type try pressed enter and Exception was accepted. Just as a test in the new example project I added a new windows form. Here's the code Public Class ...Show All
Faraz_Ahmed ToolStripButton and PrintDialog (Vb.NET Beta2)
I find the Print Dialog Box is not in activate when fired by button on ToolStrip, like: Private Sub ToolStripButton1_Click( ByVal sender As System. Object , ByVal e As System.EventArgs) Handles ToolStripButton1.Click PrintDialog1.ShowDialog() End Sub The printDialog has to be made active by clicking once before making any print options. However, it is alright by normal buton, like: Private Sub Button1_Click( ByVal sender As System. Object , ByVal e As System.EventArgs) Handles Button1.Click PrintDialog1.ShowDialog() End Sub Is this a bug or not Thanks. Hi, Is there an error happening Or is it just that it ...Show All
Rajani N Debugger problem "The breakpoint will not currently be hit. No symbols have been loaded for this document
There was a similar question posed on the C++ forum back in February to which I responded yesterday, but unfortunately, did not get a response. I am therefore putting this question in the VB forum. I have a VB 2005 project which is actually an add-in to Outlook 2003, which was I was able to debug fine until earlier this week. Now I cannot debug it at all - the message in the subject is displayed when I hover the mouse over the breakpoint which shows a yellow icon in place. Can anyone here tell me what I should do to correct this So are we saying this is a known problem that essentially has no solution Man, I'm up the creek if so. I need to develope a PPC2003 app via VS2005 using the VB.NET IDE. ...Show All
Northern Rob Unexpected exception occurred during upgrade engine operation
Hi, During a every conversion of a 'VB6 project' to 'VB 2005 Express', I'm always getting folowing error: --------------------------- Visual Basic Upgrade Wizard error --------------------------- Unexpected exception occurred during upgrade engine operation: Kan niet aan de bron binden (Exception from HRESULT: 0x8004000A (OLE_E_CANT_BINDTOSOURCE)) --------------------------- OK --------------------------- My System : Windows 2000 SP4 (Clean Install) - Visual Basic 2005 Express ed. Any ideas howto resolve this Thx. This is a bug with the Upgrade Tool where it gets confused on where its registry settings are if there is an HLKM\Software\Wow3264Node key in the registry on a 32-bit machi ...Show All
ShrikantBijapurkar Regarding the usage of Openforms property in application.
Hi, i have created a sample application in VB.NET. Also i want to count the number of open forms in the application at run time. so i have used the following code to work My.Application.openForms.count. It works fine. now i want to start the project from main function, so i have written one module.vb. and disabled the aplication framework in settings and changed the project startup as sub main(). when i compile the code it throws error as 'OpenForms' is not a member of 'Springboard.My.MyApplication'. Pls let me know if any one experienced this scenario. Thanks, Ganesh Hi, i have found out the answer. we can use System.Windows.Forms.Application.OpenForms. Th ...Show All
Srikanth Ramakrishnan Call EXE method from DLL
Hi Is there a way that I can call a method in an EXE (managed code, VB.NET) from a .NET DLL by passing a reference to the instance of the EXE Multiple instances of EXE might be running and loaded in memory and I need the DLL to invoke a method within the running instance by passing a reference (such as the application title, window handler etc). In case you are wondering why the DLL is calling the EXE method and not the other way around, it is because this DLL is like a wrapper class and the method that invokes the method in the EXE is actually called from an Access VBA module. TIA I hadn't looked into that. That's actually the kind of lead I was hoping to get. However, I found an easier way. (though a bit of a hack) In the N ...Show All
NLCandyman VB configuration file
Hi i have 2 configuration file in my project, how can i know which application configuration file i point to thanks hi thanks for reply im sorry i cant get what u mean, can show me sample code If you have an application called ConsoleApplication1.exe then the configuration file for this will be called ConsoleApplication1.exe.Config So your two applications will have different names and hence different configuration file names. Is there any reason why you have two configuration files for you application and not one. The file used is based on the app's filename and the file inquestion ...Show All
R-Learning Cannot Save Registry Key
I wrote this function: Public Function PS_save(ByVal setting As String, ByVal value As String) As Object Dim key As Microsoft.Win32.RegistryKey Try key = Microsoft.Win32.Registry.CurrentUser.OpenSubKey("Software\\Microsoft\\Internet Explorer\\PageSetup") key.SetValue(setting, value) Return Nothing Catch MsgBox("An internal error has occured.", MsgBoxStyle.Critical, "Error") Return Nothing End Try End Function I am attempting to chage the IE Page Setup settings, which are registry based. My functions to see if a key exists and to read a key work fine but this won't. I get the message box error. Not sure whats causing the error its based off of my read class ...Show All
Paul Pavlinovich Make vb 2005 exe
Dear, I cann't find make project exe in the VB 2005! The question is how to make a project exe in the VB 2005 and make it installable with my best regardes You ight want to search arround a bit. I now I saw someting like make a setup file or something, Try right click in Solution Explorer on the name of your Appliation, then click Publish... , when the dialog apperas specify the WEB page, FTP server or a File path to deploy the setup.exe file. But still you'll have to have installed .Net enviroment on the target macchine. I think that this shud do it. Remember click on the name of application not the form.vb (or other names). Just the APP Name. Thanks Spotty ...Show All
Rahul Singla Execute Code on Application Exit
I need to find out how to add a confirmation dialog box if the application is going to exit, ie i call application.exit() or the last form is being closed. I need my app to confirm the exit with the user and also perform some maintenance type tasks before it exists as well. the problem with my code i just noticed is i can't use e.cancel() to exit the shutdown procedure if they cancel it via the message box, their is not cancel option for e. How do i stop the application from exiting then If you call Application.Exit then you should easily be able to code up a confirmation around this and not call it if the user decides not to quit. If the user is closing forms usi ...Show All
Wayne Sepega How do I user VB.NET to Open Command Prompt, Call .bat File, and Send Parameters to .bat file?
Greetings, I am Creating an ASP.NET application that our users may go to to unlock a locked out computer. Once the user supplies the IP Address and UserName they click the unlock button. The button Runs VB.Net code that takes the IP Address and UserName, looks at the first 2 octets of the IP and from that chooses which .bat file to run. All of that works great. The problem I am having is when I try to open the command prompt to call the .bat file nothing happens. I've searched and found many helpful ways but none seem to support passing the IP and UserName to the .bat file. the .bat file calls a .vbe that logs onto the remote computer as admin and then calls another .bat which calls the unlocking .vbe This is about the only way w ...Show All
davidwii How to mark a method overrides in Interface
Hi gurus, I am creating custom controls for Vb.net application, I would like all my controls to move at runtime. For that I have write code on three events MouseDown, MouseUp, MouseMove now the scenerio is I would like to have an interface Called "IMoveable", by implementing which I like my custom controls to overrides the above method from theri base class. example : In case of TextBox, it should override Textbox.MouseDown but unfortunately I cannot use overrides in interface furthermore, I can also achieve this goal by creating an abstract class but I am already inheriting one class for each of my custom control Example : Public class MyTextBox inherits TextBox I got stuck now, and need your help. Cheers ...Show All
