Answer Questions
mengruts cut and paste a control
when i cut and paste a button in vb.net the name of the button changes and i need to write the code for it again from one pannel to another pannel i am cutting and pasting a button but what happent is the handeling event on click has disappeared how can this possible Yes - I've noticed this behaviour. Moving controls can cause event handlers to go walkies. I'm not sure if I'd describe it as a bug, though, but it is irritating. If you cut a control and paste onto another form and the control already exists it will rename the control. If the control name doesnt exist on the form then it should stay the same. Demonstration Example Create a form with 4 buttons called Button1 - 4 and a second form with Button2 ...Show All
learnerplates I can't change the data in my controls.text when run project
I can't change *** Me.button_Send_Bits.Text = "Enviar" *** When i run the program take another info. :( The code looks correct and you dont say if its generating an exception or not - I suspect that there is another event which is setting the property back to something else that is being called later in the process, perhaps form load event or perhaps another event. I would search the source code for the string that it is being set to and identify the event where this code is being set and settle on one place to set you control properties rather than scattering them around too much. I normally handle this in the form load event. But there are other places you can use. ...Show All
TrD Windows service
hi guys, i made a windows service that monitors the time spent on the internet. i can install it, run it, stop it with no problem.but the service doesn't run on windows startup. why even though i told it to start automatically. and in the "Services" window, it shows me that the startup type is automatic. in the event log, everytime i start the windows, i see two errors: -Timeout (30000 milliseconds) waiting for the Time Counter service to connect. - The Time Counter service failed to start due to the following error: The service did not respond to the start or control request in a timely fashion. plz help me. :( >> Private _netConnCol As New TimeCounter.Ne ...Show All
Harish Sethi Send Image from VB6.0 to .Net webservice
How to send a Image from vb6.0 to .net webservice. Hi Sarika, There's a couple ways you can do this: 1. Make a .NET ComClass that handles the Webservice interaction and call it from VB6 (see this article: http://msdn.microsoft.com/library/default.asp url=/library/en-us/dnvs05/html/CallWebSrvV6.asp ) 2. Use the Interop Forms Toolkit. All you have to do is make a regular .NET form that communicates with the Web Service, generate the wrapper classes (Tools->Generate InteropForm Wrapper Classes), and display the form from VB6. 3. Use the SOAP Toolkit 3.0 ( http://www.microsoft.com/downloads/details.aspx familyid=c943c0dd-ceec-4088-9753-86f052ec8450&displaylang=en ). I'd recommend using .NET instead though...the SOAP ...Show All
TimMisiak backgroundworker in a loop
I am trying to use a backgroundworker in a loop. After the first time thru the loop, the backgroundworker skips over the code in DoWork and goes directly to RunWorkerCompleted as if it needs to be reset for the next pass thru the loop. Is there a way around this for i = 1 to max BackgroundWorker1.RunWorkerAsync(TablesCount) 'while waiting for the BackgroundWorker to finish While Me .BackgroundWorker1.IsBusy 'keep form responsive during the asynchronous operation. Application.DoEvents() End While next i I would reccomend placing the loop inside the DoWork event of the background worker, rather than calling RunWorkerAsnc in a loop. You do not need to worry ab ...Show All
pmsc Reflection-Methodinfo
hello, I'm attempting to call a method from my main application from a custom assembly in which I can get the method via the methodinfo object. However I'm not sure how to pass the main application as the target object to invoke the method, the key being that I do not want to create a new instance of the main application. I may be way off here, but any information or direction would be greate appreciated. Here's what I have so far: public class MainAppForm public sub btnExecuteCode_Click(byval sender as system.object, byval e as system.EventArgs Handles btnExecuteCode_Click.click end sub end class public class CustomForm public sub new() 'I put the code in the constructor for testing Dim aMyAssembly as Ass ...Show All
Will Merydith MDI child forms problem: Minimize button acting as Restore button with second child.
Hi, Having a strange problem with an MDI application I'm developing. The child form is set to be maximized for the initial window state. When I create the first child, it is shown as maximized like I want. And when I click the Minimize button, it minimizes as I want. But here's the problem. If I create child one and then create child two with both with a WindowState of Maximized, and then click the Minimize button, the active child form changes to "almost maximized" as if I had clicked the Restore button instead. If I click the Minimize button again, it will minimize properly. If I instead click the Maximize button to maximize the form and then click the Minimize button, it will minimize properly. I hope I'm making sense ...Show All
AcrossThePond Sample CreateWindowEx API
Hi Everyone again, finally, i got how to replace the start button of xp. u need to call 2 api's: findwindowex and createwindowex. and i got a question on the 2nd one: visual basic code: i want to use the createwindowex but dont with that form it creates, but my own previously created form... am i clear now i want my form to be visible instead of the default start button of xp. so i mean i'd like to replace the start button. and i can do it with the previously mentioned api's but the only problem is that i'd like to use my own form/button instead of the runtime created one. Dear Bruno, Do You have any solution for this Goto Pinvoke Often you can find the structures involved with the API in C ...Show All
suncream ListBoxes selection issue
Hi guys, I've been working on a macro in Outlook for quite some time, to handle emails and attachments, and now i'm converting to an add-in using VSTO, and particularly VB.NET. Originally, I had a listbox that was populated with all the attachments in an email. Then the user selects the attachments they wish to handle, and click to proceed. Then, they select, with a drop down list, where to save the attachments - once decided, i want to refer back to the list box, to go through each one, and if it is selected, save it... In outlooks VBA it was easy, with a simple for i = 0 to ListBox.ListCount - 1 if ListBox.Selected(i) = True ...etc etc However in VB.NET there seems to be absolutely no similar easy method to do this ...Show All
michaelp getting infinite value...after 10000 value
i made this programme in console application this is my code and i want to the result of 100000 number.. but after crossing 10000 value i m getting infinativ values.... but in other language like java ...i run the same programme .....it is running perfactly can u guide me where i m doing mistake...rnd() is the random value.....here is the result which i want 0.9997669278359024 1.9879226451633236 0.9931218457149422 Module question1 Sub main() Dim c As Integer Dim RNDNO As Single Dim j, S, T, SX, R, I, SR, SI, X As Double c = 0 SX = 0 SR = 0 SI = 0 For j = 1 To 100000 S = 0 T = 100 - 500 * Math.Log(1 - Rnd()) RNDNO = Math.Log(Rnd()) 130: X = -Math.Log(rnd()) c = c + 1 SX = SX + X S = S + X If (S < T) Then GoTo ...Show All
NickUk VB 6.0 ActiveX Control in HTML
I have developed my ActiveX control using Visual Basic 6.0 and planned to load it through the HTML / Web Page. For that the Object (HTML tag) is used for IE versions and Embed (HTML tag) for Netscape versions. But how to get my OCX classID to refer my activeX control in the HTML object tag These forums are for vb.netr questions ask vb6 questions in the vb6 newsgroups . There will be changes with ie7 check out the ie7 readiness toolkit . ...Show All
sandmanager Editing project in Vb.net
Can i edit the project while Debuging the same. If Yes, How Edit and Continue not supported for 64 bit on .NET. Although if you target x86 it will compile to 32 bit and is possible to debug. And with Edit and Continue there are limitations as to what changes you can make. Its actually rather complex stuff to allow changes halfway through a running program. Some changes are considered rude and will only take effect on stopping application and restarting debugging or will cause this to happen. Also - only supported in VB.NET 2005 (earlier versions of .NET such as 2003 didnt have it.) But VB Classic (6 and below did have it). Yes you can edit your ...Show All
ctallos Specified array was not of the expected type. Calling VB6 DLL
I Get the following error when running my code. I'm calling a method declared like this in VB6 Public Function executeImageSaving(camArray() As Boolean, brightArray() As Integer, darkArray() As Integer) As String I've never called a DLL expecting Arrays yet in VB .Net. How should I declare the parameters to send, do I need to play with types I've tried 2 ways of declaring camBools, brightValues, darkValues. This way Dim camBools() As Boolean Dim brightValues() As Integer Dim darkValues() As Integer and also this way. Dim camBools As System.Array Dim brightValues As System.Array Dim darkValues As System.Array Dim objApp As LanexDll.LanexObj Dim resFo ...Show All
fripper How do I use a dynamically registered font?
In VB2005, I am registering an application-specific font when the app starts up, and de-registering it on exit. I'm using this code to register and de-register the font: ' Register the font Dim FntRC As Long = AddFontResource(fontFileName) SendMessage(HWND_BROADCAST, WM_FONTCHANGE, 0, 0) ' De-register the font RemoveFontResource(fontFileName) SendMessage(HWND_BROADCAST, WM_FONTCHANGE, 0, 0) This all works fine. After registering the font, if I start up Word, the font is available, and after de-registering the font, it's no longer available. The problem I have is that I don't know how to use the font once it's installed. I've tried this trivial example, but it doesn't work: Dim aFont As Font = New Fon ...Show All
Shyamal Patel Recent Projects List on Start Page is not being Populated
The Projects List on my Start Page is not being populated with the Projects I open. It's empty. Does anyone know what could be the problem I can see the entries being recorded in the Registry key: HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\8.0\ProjectMRUList But VS isn't reading them in for some reason. I'm running Visual Studio 2005 Professional. Thanks. Hey rufdog30, Do recent projects properly show up correctly in the File -> Recent Projects list Also, there's a known issue regarding projects that are opened from Source Control not showing up on the Recent Projects list. Could this be your issue Thanks, Michael I also ha ...Show All
