Answer Questions
陛下 Remove blank space from middle of string/Concatinating
I have a program (Visual Basic) where I click on a file name in a ListBox, i.e. "0001 42356.tif" which loads that selected string into a textbox. I click that ListBox again and another file name as string, i.e. "0001 43278.tif" is loaded into a second text box. These two strings will eventually be joined to create a "span" First issue is - I need any blank spaces gone from the strings leaving them as: "000142356.tif" and "000143278.tif". The Trim methods I've studied just trim space from the beginning or end so I've tried 500 other things but nothing is getting rid of the space yet. The second issue is, I need to concatinate those 2 file names (creating a span in a third textbox) &qu ...Show All
Thymen VB Generics: if list.Exists("Foo")
I love generics but I don't understand them very well and can't find an answer that makes any sense to me. Perhaps someone can help. I understand dim l as List(Of String) and l.Add("One") l.Add("Two") l.Add("Three") but I don't get if l.Exists("Foo") then l is a list of String, and apparently I need to define a delegate that returns true/false if the param exists in the list. Have to use AddressOf to tell Exists what to call when it's invoked. All that sorta makes sense. However, I'm very unclear on what the delegate should look like MSDN shows a hard coded "saurus", but that makes no sense to me - it seems like I ought to walk the list somehow, and I'm assumi ...Show All
Xcel problem in using Usercontrol after converting from VB 6 to VB 2005
Hi all, I converted a custom button control project from VB 6.0 to VB 2005. After many issues, i'm able to build it successfully with out any errors. But when i try to add this button control to a form in the test application, the whole test application IDE(VS 2005) closes with out any error message. Has anyone come across this problem. What could be the reason behind this problem. Thanks in advance, Sugan The problem is slightly different now. I'm now getting a error message from VS IDE and it restarts the IDE automatically. The error Message is "Microsoft Visual Studio has encountered a problem and needs to close". I'm not able to find anything out from this error message. It is strange that VS IDE closes ...Show All
Ruddles FontSyles?
How do you get a multiple fontstyle i.e Bold and Italic and Underlined all at the same time. I have 4 Checkboxes each with a different style, if I click ckbBold then I get a Bold font in my textbox but if I then click ckbItalic nothing happens until I uncheck ckbBold, so I only ever get one style. Any ideas or pointers As Ahmedilyas said, you need to OR the font styles, not simply set them: fStyle = fStyle or FontStyle.Bold C# this.theTextBox.Font = new Font(this.theTextBox.Font, FontStyle.Bold | FontStyle.Underline); Thanks for the reply Admedilyas, It works but not for the pupose that I need it for see below Private Sub FontChange() Dim font_style As FontStyle = FontStyle.Regu ...Show All
JTechOnlineGuy New project-needed help with many features
I just started using vb 2005 express for a school project, so I'm quite unfamiliar with it. I would like to do some advanced "add" features, which I need help with: 1. Not be able to proceed to the next form unless all fields are filled in. Get a warning message when pressing the "confirm" button. 2.Allow more then 1 radio-button to be pressed in the same form. 3. Generate random pictures (validation pictures) each time I open the add form. You have probably seen these things before on website registrations (write down the code you see in the picture). 4. Each picture should have a code, which must be written in the field below to be able to proceed to the next form. Once again, the same feature ...Show All
ron nash How to select a java aplication? In a website or a window?
First of all Hi everybody there! I was wondering if someone could help me with my project, SInce im quite new to VB and still need some experience. My question is how can i make the program select a java aplication from a website or a window And if its possible how can i get the name of the java aplication It would really help me... All help apreciated Thanks in advanced Saskot Sorry this post wasn't answered first time around. What do you mean by Java Application Are you trying to navigate to the applet tag in a website If not can you provide a more specific example as to what you are trying to do. Sorry for not being specific wat i meann is Image there is a java chat in a website Image that the window ...Show All
pc_bond importing vb .net in vb
hello everybody I want to import a vb.net dll in vb. I have made a project of class Library in VB.Net, then Project Properties->ConfigurationProperties->build, checked the Register for Com Interop checkbox and made a build, the output was a .tlb file and a dll file Added the .tlb refrence in my vb project I was able to create an instance of the class. but was not able to access any of the functions in the library Thanks in advance Hi, did you define your methods in interfaces which you implement in classes Class members which are not interface implementations will not be exposed I guess. -- SvenC thank you for the message I was working without an interface, ...Show All
Matt Ortiz Charts using database has datasource
Here's the situation: 1. my application connects to a website and retrieves a XML file 2. I create an access database in runtime and i add the new records extracted from the XML 3. I want to create some charts using data from a SELECT SQL command, how can i do it tks for your time There are alot of chart engines out there Crystal Reports, SQL Reporting Service, Dundas , Graphics Server , Developer Express , etc. There is also the open source ZedGraph . ...Show All
Esp_99 ADO Stream Write wont work
Hi All I can t get ADODB Stream.write to work. I get Runtime error 3001. 'Arguments are of wrong type, are out of acceptable range, or are in conflict with one another' I use Writeline all the time but this is my first time writing binary. Any clues here is my test code Private Sub subStreamTest() Dim cnnLocal As New ADODB.Connection Dim stmStream As ADODB.Stream Dim strMcomDir As String Dim bufBuffer(3) As Variant Dim bytTest As Byte strMcomDir = "R:\NewDB\" & funDateString & ".tpf" bufBuffer(0) = &H5 bufBuffer(1) = &H2 bufBuffer(2) = &HCA Set stmStream = New ADODB.Stream stmStream.Type = adTypeBinary stmStream.Open bytTest = bufBuffer(2) stmStream.Write bufBuffer(2) ...Show All
cbueno Disable "Move" for my form
I am writing Windows Application with VB.NET. I would like to have my form occupying the whole screen and disallow the user from resizing it and moving it. I successfully coded it such that the form didn't move when the user dragged the title bar. It was what I wanted but it was not so perfect. When I press ALT+SPACE, a context menu popped up and this menu contains a menu item called "Move". I wanted to disable this menu item "Move" such that it only showed as a gray text instead of a black text. Which function to call I would agree that there are API calls to do almost anything. The question is should you use them Moving into unmanaged code requires careful consideration. Many Windo ...Show All
WN3335 Running 'user selected' applications
Hi there, A fair while ago I started a project, to try and launch a specific set of applications. Not windows programs. Inititally through their own command buttons, then by checkboxes and a single command button, however I could never get the thing to work. Also the application locations woudl have to be the same as on my system which is never the same to any other system I have used. Now I've been asked by a friend to actually make it, I have tried code like this; Dim NameOfProcess As String = "app.exe" Dim p () As Process = Process . GetProcessesByName ( NameOfProcess ) If p . Length > 0 Then MessageBox . Show ( p . Length & " Process(s) Named " & NameOfProcess & " i ...Show All
Mister T7718 VB.NET Coding error
Hi, I was creating a webform and I got one error and I don't know what does it means can anyone help me with it The Error: Reference to a non-shared member requires an object reference. The underline and bold line. My login Page: Username: < asp : TextBox ID ="UserID" runat ="server">User1 </ asp : TextBox > Try If s.Connected Then s.Send(bytesSent, bytesSent.Length, 0) Do bytes = s.Receive(bytesReceived, bytesReceived.Length, 0) receiveText = Encoding.ASCII.GetString(bytesReceived, 0, bytes) receiveXMLText = receiveXMLText + receiveText If receiveText.IndexOf( "</packet>" ) Then quitRequest = True receiveXMLText = receiveXMLTex ...Show All
Jonas1980 Access Child Menu Entries
I am currently tearing my hair out trying to access menu items on a menustrip I have a very usual menu with File and a sub menu Exit. Clicking on File>Exit will quit the app. I can access the File by using MenuStrip1.Items(0).Text = "Foo" This changes the File to Foo But I can't find anything to enable me to change the Exit text to something else Please help BTW The reason I am doing this is to localise my application and so if I am running in another language I need to change all the test of the menu items If there is another way of doing this I am all ears... Thanks you would get the menu item index of where "Exit" is. so if Exit was the 2nd item in the File Menu: 1 - File ...Show All
sakarmo Wmi and vbscript
I need to be able to output the amount of memory a script is using at various stages throughout its execution. I have never used wmi in a script before so i have no clue how to start. Can anyone please point me in a direction Thanks Woody Are you planning to do this in .NET using the WMI classes If not, then the best place to ask would be here: http://www.microsoft.com/technet/community/newsgroups/topics/scripting.mspx in the VBScript technet newsgroup :-) I don't know that you've supplied enough context to answer your question Script Are you referring to vbscript What's running running it What do you want to monitor You are asking about script. These forums deal with possibly in the wron ...Show All
AndyMc data storage
As posted in another thread, I'm planning to build an accounting program. I'm wondering what would be the best way to store the data, using databases or perhaps XML There will be over 50 administrations and several users. Would one database per administration be most efficient considering one administration will usually be accessed by one user at a time Using XML probably means smaller file sizes and therefore less network traffic, but databases offer more functionality. Anyone has experience with this Any help would be welcome. Regards, Eric interesting. I mean you have to weigh it all up + SQL - central location/mangement + SQL - flexible/more functionality + SQL - bulk inserts + SQL - ...Show All
