Search Results

Search found 18731 results on 750 pages for 'vb common controls replac'.

Page 2/750 | < Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >

  • Troubleshooting VC++ DLL in VB.Net

    - by Jolyon
    I'm trying to make a solution in Visual Studio that consists of a VC++ DLL and a VB.Net application. To figure this out, I created a VC++ Class Library project, with the following code (I removed all the junk the wizard creates): mathfuncs.cpp: #include "MathFuncs.h" namespace MathFuncs { double MyMathFuncs::Add(double a, double b) { return a + b; } } mathfuncs.h: using namespace System; namespace MathFuncs { public ref class MyMathFuncs { public: static double Add(double a, double b); }; } This compiles quite happily. I can then add a VC++ console project to the solution, add a reference to the original project for this new project, and call it as follows: test.cpp: using namespace System; int main(array<System::String ^> ^args) { double a = 7.4; int b = 99; Console::WriteLine("a + b = {0}", MathFuncs::MyMathFuncs::Add(a, b)); return 0; } This works just fine, and will build to test.exe and mathsfuncs.dll. However, I want to use a VB.Net project to call the DLL. To do this, I add a VB.Net project to the solution, make it the startup project, and add a reference to the original project. Then, I attempt to use it as follows: MsgBox(MathFuncs.MyMathFuncs.Add(1, 2)) However, when I run this code, it gives me an error: "Could not load file or assembly 'MathFuncsAssembly, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies. An attempt was made to load a program with an incorrect format." Do I need to expose the method somehow? I'm using Visual Studio 2008 Professional.

    Read the article

  • I want to turn VB.Net Option Strict On

    - by asjohnson
    I recently found out about strong typing in VB.Net (naturally it was on here, thanks!) and am deciding I should take another step toward being a better programmer. I went from vba macros - VB.Net, because I needed a program that I could automate and I never read anything about strong typing, so I kind of fell into the VB.Net default trap. Now I am looking to turn it on and sort out this whole type thing. I was hoping someone could direct me towards some resources to make this transistion as painless as possible. I have read around some and ctype seems to come up a lot, but past that I am at a bit of a loss. What are the benefits of switching? Is there more to it than just using ctype to cast things? I feel like there is a good article that I have failed to come across and any direction would be great. Would a good approach to be to rewrite a program that is written with option strict off and note differences?

    Read the article

  • jQuery + Perl CGI to vb.net transition

    - by user1257458
    I've been developing oracle database-heavy "web applications" forever by building my html by hand, adding some jquery to handle ajax requests (html inserts for forms processing etc), and always did my server side stuff in perl cgi. I really love how easy it is to read some form input, execute some select statements through dbi (SO EASY), and generate HTML to be inserted by the jquery request. That's a web application to me. However, my new boss builds everything in visual studio 2010, vb.net, usually webforms. So, for work reasons, I now need to start developing in vb.net so it can be collectively maintained, and I'm just seeking advice on where to start learning/how to approach this. I know I could at least learn ASP.net and VB.net, and create a webform, have it read parameters, return HTML, etc. which would allow me to use my previously written HTML and client-side scripts (jQuery). Although- since we're moving heavily to mobile applications I really need to reduce client-side processing load. Is there any advantage to my boss' method? Thanks a ton.

    Read the article

  • Translating delegate usage from C# to VB

    - by Homeliss
    ContactManager.PostSolve += PostSolve; I am having a problem converting this piece of code from C# to VB.NET. ContactManager.PostSolve is a delegate. I tried the following but it doesn't work, it says PostSolve is not an event of ContactManager: AddHandler ContactManager.PostSolve, AddressOf PostSolve The following works, but this only allows me to have one handler for the delegate: ContactManager.PostSolve = new PostSolveDelegate(AddressOf PostSolve) Is there a way for me to do the same thing in VB that was done in the first piece of code? Thanks!

    Read the article

  • How do i create winxp style controls

    - by KoolKabin
    Hi guys, I am trying to make my controls look as cool as xp theme enabled controls like gradient fill background in container controls and colour thames support etc I am not finding a way to start. from where can i start doing it? I am trying to do it in vb.net Edited: EnableXpVisualStyles() I found it to enable visual styles but didn't give me visual thames to apply. So in order to apply thames or colour schemes what should i do? What other commands should i use with combination with it? as I have seen my application giving ugly look even applying that command and other program showing nice loook in my win2003 server

    Read the article

  • ASP.Net 2.0 VB WebSite Project "Type 'Exception' is not defined"

    - by AtlSteve
    All of a sudden our VB ASP.Net 2.0 WebSite Project started complaining that Exception was not defined. I have discovered that if I add "Imports System" to the header, or explicitly use System.Exception that it works, but this error permeates a lot of other System descendants like the Data namespace, and the DateTime object. We have hundreds and hundreds of pages, so adding Imports System to all of them not only would be time consuming, but it seems like a band-aid fix to the problem. I have checked the Project-Property Pages-References, and the web.config file, and the assembly is imported into the project, it is just not being "Auto Imported" into the Class Files like it USUALLY is. Note this does not JUST affect CodeBehind, but All className.vb files. I would like to fix this problem, but more importantly would like to understand what could cause the System namespace to all of a sudden stop being auto imported. There is obviously some file change that caused this, as my co-worker started seeing the problem this morning after he did a Full-Get on the project. MORE: The Web.Config file located in the Windows\Microsoft.Net...\Config\Web.Config file does have the , and System is added. Adding the tags, and adding System to the LOCAL web.config did nothing to mitigate the problem. Any help would be appreciated. First SO Question, so I hope I was descriptive enough.

    Read the article

  • Ternary operator in VB.NET

    - by Jalpesh P. Vadgama
    We all know about Ternary operator in C#.NET. I am a big fan of ternary operator and I like to use it instead of using IF..Else. Those who don’t know about ternary operator please go through below link. http://msdn.microsoft.com/en-us/library/ty67wk28(v=vs.80).aspx Here you can see ternary operator returns one of the two values based on the condition. See following example. bool value = false;string output=string.Empty;//using If conditionif (value==true) output ="True";else output="False";//using tenary operatoroutput = value == true ? "True" : "False"; In the above example you can see how we produce same output with the ternary operator without using If..Else statement. Recently in one of the project I was working with VB.NET language and I was eager to know if there is a ternary operator equivalent there or not. After searching on internet I have found two ways to do it. IF operator which works for VB.NET 2008 and higher version and IIF operator which is there since VB 6.0. So let’s check same above example with both of this operators. So let’s create a console application which has following code. Module Module1 Sub Main() Dim value As Boolean = False Dim output As String = String.Empty ''Output using if else statement If value = True Then output = "True" Else output = "False" Console.WriteLine("Output Using If Loop") Console.WriteLine(output) output = If(value = True, "True", "False") Console.WriteLine("Output using If operator") Console.WriteLine(output) output = IIf(value = True, "True", "False") Console.WriteLine("Output using IIF Operator") Console.WriteLine(output) Console.ReadKey() End If End SubEnd Module As you can see in the above code I have written all three-way to condition check using If.Else statement and If operator and IIf operator. You can see that both IIF and If operator has three parameter first parameter is the condition which you need to check and then another parameter is true part of you need to put thing which you need as output when condition is ‘true’. Same way third parameter is for the false part where you need to put things which you need as output when condition as ‘false’. Now let’s run that application and following is the output as expected. That’s it. You can see all three ways are producing same output. Hope you like it. Stay tuned for more..Till then Happy Programming.

    Read the article

  • Cannot Create a connection to Data Source VB 2010 [closed]

    - by CLO_471
    I seem to be having some issues with my Visual Basic 2010. I am trying to create a connection to a data source and it is just not working. Even my old connections in my other projects are not working. When I get into VB I try and create a connection by clicking Add New Data Source Database DataSet New Connection and when I click on New Connection the screen disappears and I am not able to select anything. Does anyone know of a glitch or something? I have checked my ODBC connections and all is good and I have been able to play around with my Access connections (which I am trying to connect) and Queries and everything seems to be working fine. I have rebooted several times, uninstalled and resinstalled VB and have also repaired the entire application. I am not sure what else to try or what else to do. Any help would be much appreciated. My computer specs are XP SP3, Core2 Duo at 2.80 and 3GB RAM

    Read the article

  • VB.Net Sub reports problem in SS Reporting Services

    - by user65697
    I am trying to transfer over some MS Access reports to VB.Net via sql reporting services. Currently using VB.Net in Visual Studio 2008. I have 5 sub reports that need to run. Depending on the user selection any number of them can show at one time in the report viewer. So I assume I need to use a main report which holds the sub reports. How do I populate the data for each sub report when the main container report loads? Do I need to set the datasource of each subreport dynamically? Do I also need to dynamically load the subreports into the report viewer? Any code appreciated. Thanks

    Read the article

  • foreach Control ctrl in SomePanel.Controls does not get all controls

    - by aron
    Hello, I have a panel with a bunch of labeles and textboxes inside of it. The code: foreach (Control ctrl in this.pnlSolutions.Controls) Seems to only be finding html table inside the panel and 2 liternals. But it does not get the textboxes that are in the html table. Is there a simple way to get all the controls inside of a panel regardless of the nesting? thanks!

    Read the article

  • How do i create nice looking controls?

    - by KoolKabin
    hi guys, I found a nice controls used by a software so wanted to use or build similar nice looking controls for my applications in vb.net First Sample control is nice rounded cornor group box [ i guess so ]: http://sachicomputer.com/kabin/samples/control1.jpg and second control is nice looking tab control: http://sachicomputer.com/kabin/samples/control1.jpg

    Read the article

  • ASP.Net validation controls

    - by nikolaosk
    In this post I would like to continue talking about validation in ASP.Net applications. I will look into the validation controls that ASP.Net provides. You can have a look at the first post in my blog regarding validation. You will show you that we can perform all our main validation tasks without almost writing any code. We will add validation to our form by adding one or more controls.We can also display messages to the user. The controls I am going to look into are: CompareValidator CustomValidator...(read more)

    Read the article

  • Convert C# format to VB

    - by Bill
    I am sure this is a simple questiion for you guys but I don't know what this developer is doing. name = String.Format(MyStringBuilder + ""); If I convert this to VB I get the message "operator + is not defined for types system.text.stringbuilder and string". Same thing if I use &. Thanks for any assistance. Bill

    Read the article

  • Visual Studio macro to read compilation errors and fix implicit conversions automatically in VB.NET

    - by eckesicle
    I am converting a large project in VB.NET that is using Option Strict Off into Option Strict On Naturally I am running into the same compilation error over and over. Strict On does not allow implicit conversion from Object to String/Integer/Double Is it possible to to access the compilation errors with a macro and automatically append .ToString() to the erroneous implicit conversion. Essentially my question is a duplicate off http://stackoverflow.com/questions/2532340/tools-to-convert-option-strict-off-code-into-option-strict-on but that question had no answers. Cheers.

    Read the article

  • Adding items to the List at creation time in VB.Net

    - by Shaddix
    In c# I can initialize a List at creation time like var list = new List<String>() {"string1", "string2"}; is there a similar thing in VB.Net? Currently I can do it like Dim list As New List(Of String) list.Add("string1") list.Add("string2") list.Add("string3") but I want to avoid boring .Add lines

    Read the article

  • vb.net system beep sound on XP

    - by Toby
    Is it possible to have a vb.net program sound the PC's internal speaker? you know the one that produces C's \a BELL I have tried beep(), but this only produces the error sound on the sound card. I have also tried <Runtime.InteropServices.DllImport("KERNEL32.DLL", EntryPoint:="Beep", SetLastError:=True, _ CharSet:=Runtime.InteropServices.CharSet.Unicode, ExactSpelling:=True, _ CallingConvention:=Runtime.InteropServices.CallingConvention.StdCall)> _ Public Shared Function _ aBeep(ByVal dwFreq As Integer, ByVal dwDuration As Integer) _ As Boolean End Function With no joy apparently its only good on vista and above Any suggestions? thanks

    Read the article

  • C# to VB conversion query

    - by Jim
    This C# code successfully gets the 2 relevant records into _currentUserRegisteredEventIds: ctx.FetchEventsForWhichCurrentUserIsRegistered((op) => { if (!op.HasError) { var items = op.Value; _currentUserRegisteredEventIds = new HashSet<int>(items); UpdateRegistrationButtons(); } }, null); but VB code trying to do the same thing has nothing in _currentUserRegisteredEventIds: ctx.FetchEventsForWhichCurrentUserIsRegistered(Function(op) If Not op.HasError Then Dim items = op.Value _currentUserRegisteredEventIds = New HashSet(Of Integer)(items) UpdateRegistrationButtons() End If Any help appreciated.

    Read the article

  • Tab Controls effecting other Controls.

    - by VBeginner
    Hopefully I've explained myself good enough this time. Can't seem to get a real answer. Trying to make it so when I select certain tabs, certain controls on the left will disappear or reappear. http://img43.imageshack.us/img43/7533/scrnshotg.jpg Also, when "Stats" is selected, I need it to auto-select "Frequency" Ex. On click/focus/select (whatever, nothing seems to work)... ComboBox.Visible = True Thank you.

    Read the article

  • C# to VB question

    - by Jim
    Hi, I can achieve in VB what the following C# snippet does but it seems very clunky since I perform a Linq query to obtain the events for the relevant user. Is there a neat way? ctx.FetchEventsForWhichCurrentUserIsRegistered((op) => { if (!op.HasError) { var items = op.Value; _currentUserRegisteredEventIds = new HashSet<int>(items); UpdateRegistrationButtons(); } }, null); } else { _currentUserRegisteredEventIds = null; UpdateRegistrationButtons(); }

    Read the article

  • Why doesn't this (translated) VB.NET code work?

    - by ropstah
    I had a piece of C# code converted, but the translated code isn't valid... Can somebody help out? C# <table> <% Html.Repeater<Hobby>("Hobbies", "row", "row-alt", (hobby, css) => { %> <tr class="<%= css %>"> <td><%= hobby.Title%></td> </tr> <% }); %> </table> VB <% Html.Repeater(of Jrc3.BLL.Product)(Model.ProductCollectionByPrcAutoKey, "row", "row-alt", Function(product, css) Do %> <tr class="<%= css %>"> <td><%= hobby.Title%></td> </tr> <% End Function)%>

    Read the article

  • How to explain pointers to a Java/VB programmer

    - by Skeith
    I am writing a game and my friend has offered to help me as it is a RPG and will take a long time to do the "scripting" bit of the game. The problem is IMO he's not that good a programmer :( (add flame war here). He has only programmed in Java and VB and keeps saying really stupid things to me like "Why don't you drag and drop an onClick event" to design my UI when I'm using DirectX. I tried explaining pointers to him but his response was, if it's just a variable that holds a memory address, why don't you just use an int? I create an instance of an attack class and give the creature a pointer to it so if several creatures use the same attack there is only one instance of it. He keeps saying why not put if statements in the creature class for every attack class and set true for the ones that are there. He has programmed mainly in VB and a little in Java just to learn OOP. How can I explain advanced C++ concepts like pointers and memory management to him? He just doesn't understand there are no super functions like form.show in C++.

    Read the article

  • Should a c# dev switch to VB.net when the team language base is mixed?

    - by jjr2527
    I recently joined a new development team where the language preferences are mixed on the .net platform. Dev 1: Knows VB.net, does not know c# Dev 2: Knows VB.net, does not know c# Dev 3: Knows c# and VB.net, prefers c# Dev 4: Knows c# and VB6(VB.net should be pretty easy to pick up), prefers c# It seems to me that the thought leaders in the .net space are c# devs almost universally. I also thought that some 3rd party tools didn't support VB.net but when I started looking into it I didn't find any good examples. I would prefer to get the whole team on c# but if there isn't any good reason to force the issue aside from preference then I don't think that is the right choice. Are there any reasons I should lead folks away from VB.net?

    Read the article

< Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >