Answer Questions
Henri Hein FileNotFoundException error with pictures
I a seem to be having a simple problem. In VB6 I had no problems loading pictures. when I converted the program to VB2005, it modified the code to frmDetails.Elm_Pict.Image = System.Drawing.Image.FromFile( "Pictures\h.jpg" ) which is giving me a FileNotFoundException error but the path is correct ! I would greatly appriciate any advice how to fix this simple error! Thanks, Campsoup1988 Sorry I didn't mean to suggest you couldn't use relative paths, you can certainly. The key is understanding where that exe is actually running from and making sure the image is in the correct path. If you're debugging the project it will be under the Build Output P ath which is found under the project prope ...Show All
Ecrofirt PrintForm Print Preview
Probably a newbie question, How do I show a "Print Preview" before printing a form using PrintForm Sample code please Hi Ragas, It's actually very easy to send the output of the Print Form.Print method to the PrintPreview window. All you need to do is set the PrintAction property, either at design time in the properties window or at runtime via code as this example demonstrates. PrintForm1.PrintAction = Printing.PrintAction.PrintToPreview PrintForm1.Print() Please let us know if you have any other questions. D o you have a great idea for a new Power Pack Let us know what you want to see us develop to help make Visual Basic 2005 event better by going to http://connect.Micr ...Show All
A.Carter how to delimit string?
I have many fields must be delimited,just like that below "abc","aaa","ccc","ddd","abc,adf","daf,qwer" I have to delimit this via comma,but must consider a field followed by double quote how should i do thanks Thanks in Advance if this is a text file that you are trying to parse then the textfileparser is what you need: Dim tFp As FileIO . TextFieldParser = My . Computer . FileSystem . OpenTextFieldParser ( "FileName" ) tFp . Delimiters = New String () { "," } tFp . HasFieldsEnclosedInQuotes = True Dim CurrentRecord () As String = tFp . ReadField ...Show All
Chiranjeevi Undavalli Trapping Keys from a WebBrowser control
For most controls, I can capture the user's keystrokes and check them. For the webbrowser control, the key events are not bubbling up. Seems the browser is not passing them along. Have set KeyPreview to True so that's not it. Tried all the key events (down, press, up); none seem to work. Thanks. Sounds positively gruesome for a dim-witted high level type of programmer such as myself. Anyone have a working sample of all this PS Why doesn't MS just build this into the control natively http://support.microsoft.com/kb/q183235/ WBCustomizer.dll Implements IDocHostUIHandler for VB www.codeproject.com/atl/vbmhwb.asp An ATL control for hosting and customization of multipl ...Show All
SPWilkinson Excel Recordset
Hi! I want to make a excel recordset with an sql comand but my "sheet" can have several names because i'm reading multiple excel files in a path. How can i refer to the active sheet in the select command What i have now, is: RS = CONN.Execute("SELECT * FROM [Name_sheet$] ") But so it works only if the name of sheet is "Name_sheet". Recordsets are ADO, datasets are ADO.NET are you trying to do this with VB.Net or an older version of VB. I'm doing this in Vb.net ...Show All
s441 Display a tooltip when the mouse hover a specific word/phrase
Hello, I have a label with a lot of text. I want to do, that when I hover specific words/phrases it will display a tooltip with a pre-defined text. For example, if the label is written "Hello, welcome to my program. It will help you a lot.", then I want to do that if the user mousehover the word welcome it will display a tooltip with text of "Hi User", and if the mouse will hover the phrase "help you", it will display a tooltip with text of "In a lot of stuff". Thanks, Ofir. You'll have to measure the text so that you know the pixel locations of the words you want to make sensitive. Then you can check the mouse position to see of it is w ...Show All
ZergaKilla Creating an Error Log
Hello again, I have never done this but I thought it was a good ideal unless you can tell me differentlly. How do you create an error log. I know I will have to create a table for this, but I dont know how to catch the errors and put them in a file for observance at a later time. If someone can point me in a direction,code, article,etc. it would be appreciated Davids Learning Enterprise library is a good item to use but can be a little bit more advanced than beginner to get it initially working in the project - but once it is its great. This gives you lots of various ways to configure where and how your logging items. Alternatively you can simply write a plain ASCII text file by your a ...Show All
williamguy Open file
Hiiiii, How i can open file (word,excel etc) using vb.net (web base).. But not using response.redirect(namefile)... Please help me.. Thanks Jebat I think you need to restate your problem. Are you trying to open an excel file that is located on a web page using a winforms application (VB) Are you trying to open an excel file on a file share using a web application (ASP) The answer to those questions determine which forum you want to use. Yes I know...but i already send my question to www.asp.net forum... i not yet got solution for my problem.... i think in this forum i can get solution for my problem... thanks... He is trying to ...Show All
Juvefan VB6/CR 8.5 code in VB 2005
I am upgrading a VB6 application that uses the Crystal Reports control on the forms to display reports. The report filename and various other control properties are set in code, including SelectionFormula and ConnectionString, then the report is displayed or sent directly to the printer. In the IDE (VS Pro), the code works fine as is. Because of the complexity of some of the routines, I would rather not rewrite these sections but let them continue to work as is. The problem is that the distributed version does not run; it runs only in the IDE. I have managed to get the report files to go with out the installer, but even then they won't run. Am I missing something or have I screwed something up to make this not work If it can con ...Show All
hrubesh same form to block
hi for example; when user opened form2, user won't open form2 again. how can I do You want to stop a form being opened more than once I guess the logical way to do this is some sort of data structure that contains bools, such as a hash table, with the form names being the keys. Then your code can remember if a form has been open, and refuse to open it again. To only allow a single instance of a form to show you can use the my forms within you application. This application will only create one instance of Form2. It doesnt matter how many times you click the button. An example of default instancing. Public Class Form1 Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.E ...Show All
msorens How to read specified block of bytes from a file?
I want to read only bytes from (startindex) to (length) from A LARGE FILE ie: I don't want load all bytes to memory but only bytes I need, and those bytes may start from the middle of the file and end before the end of the file . eg: Suppose mydata.bin as binary file that has more than 100000 bytes how to read from byte 24000 to byte 30000 only. thank you!!!! Dim Start As Integer = 24000 Dim COunt As Integer = 6000 Dim sr As New IO . StreamReader ( "FilePath" ) Dim TheBuffer (6000) As Char sr . ReadBlock ( TheBuffer , Start , COunt ) you may wish to take a look at the FileStream class as you can seek to a certain part of the fi ...Show All
Chris_Williamson bubble sort in a list box
OK, from what I understand, I would be better off trying to sort numbers in a bubble sort in my listbox. I used the listBox.sorted = true but that does not sort larger numbers correctly., What is the code on this bubble sort and do you just call it in a subroutine you can also try to use System.Collections.SortedList() This is a very basic implementation. It's not tested but should work. There will be bugs. For example it works on the text value property of the item of the listbox, and assumes that the items are all numeric. I would also rewrite the function so it was recursive but this should at least get you started. Public Sub BubbleSort () Dim sorted As ...Show All
Amjath Missing ApplicationLog.exe
I am learning Visual Basic 2005 and I am going through the WalkThroughs in the MSDN documents. Today I was working on one that was writting to the application log. The program aborted because it could not find the program ApplicationLog.exe. The complete path is c:\Document and Settings\Robert\LocalSettings\ApplicationData \TemporaryProjects\ApplicationLog\bin\Debug \ApplicationLog\bin\Debug\ApplicationLog.exe. When I looked for the path it wasn't there. Well, everything up to and including Robert was there. Bad install Thanks Bob Hmm - the doubled ApplicationLog\bin\Debug\ApplicationLog\bin\Debug is strange. Did you build the application without errors -- SvenC ...Show All
Aneshka Needing Some Knowledge About Visual Basic
What are the limatations of Visual Basic - I am familiar with html, and dhtml, I'm learning CSS & C+ currently. -- Anyway, my hobby is making all kinds of websites. My cousin wanted me to make her a virtual pet site. Like Neopets R something interactive, where you can have items, stores, pets, and stuff like that. I don't know how to make this, and I've been trying to learn for what seems like forever. However I don't know what to search for to learn this. I found Visual Basic yesterday, and it is soo much easier than notepad. I haven't found out everything about it yet, and I was hoping someone can point me in the right direction, what to search for to learn how to make a virtual pet site.. I know it sounds childish but it's imp ...Show All
MandoBoon MDI parent form and child form
Hi, I m doing migration from VB6 to VB.net. The way to show form within MDI form as following: In VB6 Call form1.show() I can call child form within MDI form using the syntax above directly, whereas in VB.net it gives me AccessViolationException Does anyone know how to solve this problem HELP!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! Hi, you probably just need to create a new instance of Form1. Put the following code on your MDI parent form: Dim form As New Form1() form.MdiParent = Me form.Show() Andrej YOu can show a mdi child as fallows form1.MdiParent = <Mdi Parent Form> form1.Show() ...Show All
