Skip to content

Visual Basic

Visual Basic Questions

This category can be followed from the open social web via the handle visual-basic@forum.codeproject.com

34.4k Topics 120.1k Posts
  • Oppinions of serialization

    csharp debugging xml json tutorial
    1
    0 Votes
    1 Posts
    0 Views
    No one has replied
  • Timer Controll IN VB

    question help
    3
    0 Votes
    3 Posts
    0 Views
    D
    The Timer control doesn't have that kind of resolution. You can use 3rd party high resolution timers such as the CCRP High Performance Timer Objects. The package can be found here[^]. It was originally written for VB6, but can be used in VB.NET also. RageInTheMachine9532
  • NotifyIcon in .net service

    csharp javascript help question
    2
    0 Votes
    2 Posts
    0 Views
    R
    Make sure the service has the option turned on that allows it to 'interract with the desktop'. Paul Watson wrote: "At the end of the day it is what you produce that counts, not how many doctorates you have on the wall." George Carlin wrote: "Don't sweat the petty things, and don't pet the sweaty things." Jörgen Sigvardsson wrote: If the physicists find a universal theory describing the laws of universe, I'm sure the asshole constant will be an integral part of that theory.
  • error of define a instance

    xml help
    1
    0 Votes
    1 Posts
    0 Views
    No one has replied
  • security problems

    csharp help c++ security
    4
    0 Votes
    4 Posts
    0 Views
    S
    :cool: hi there well there is not a problem with .NET actually .NET is platform independent there a special level of security implemented in .NET Operating systems and runtime environments typically provide some form of isolation between applications running on the system. This isolation is necessary to ensure that code running in one application cannot adversely affect other unrelated applications. Typically, isolation means A) Faults in one application cannot affect other applications by bringing down the entire process. B) Applications can be independently stopped and debugged. C) Code running in one application cannot directly access code or resources from another application; doing so could introduce a security hole. D) The behavior of running code is scoped by the application it runs in. In modern operating systems, this isolation has historically been achieved using process boundaries. A process runs exactly one application and that process scopes the resources that are available for that process to use. For example, memory addresses in Win32 are process relative---a pointer in one process is meaningless in the context of another process. The Common Language Runtime relies on the fact that code is type safe and verifiable to provide fault isolation between domains. By relying on the type safe nature of the code, application domains provide fault isolation at a much lower cost than the process isolation used in Win32. Because isolation is based on static type verification, there is no need for hardware ring transitions or process switches. In many respects, application domains are the Common Language Runtime equivalent of a Win32 process. The runtime creates an application domain for each runtime application; each application domain can have an associated configuration file. Application domains isolate separate applications which run within a process. The combination of an application domain and configuration information create isolation for the application The way in which application domains are created affects the permissions which assemblies have when running in the domain. For basic web-application scenarios, where the web page does not provide a LINK tag to a configuration file, the runtime creates an application domain on a per-site basis. Domain-neutral assemblies are only shared between application domains and assemblies with identical permission sets. A domain-neutral assembly called by two application domains with dissimilar permission sets is
  • 0 Votes
    1 Posts
    0 Views
    No one has replied
  • Help Me pleas (i want to draw a sphere )

    csharp help question
    1
    0 Votes
    1 Posts
    0 Views
    No one has replied
  • Help with DataAdapter.UpdateRowSource

    csharp help question announcement
    1
    0 Votes
    1 Posts
    0 Views
    No one has replied
  • Connection

    question
    3
    0 Votes
    3 Posts
    0 Views
    M
    First, you're using some bad programming techniques that will lead to some overhead in the Code. Anytime you Declare a Variable with the "...As New" and it's an Object, then every time you set a Property or use a Method, the VB Compiler ALWAYS checks to see if the Object has been instantiated...this is some significant overhead if you use this routine a lot. Actually, it looks like the whole Connection String is wrong... The Provider "MSDASQL" is strictly used for DataSources that reside in the ODBC DataSources. If this is the Case, and you do not have a User / Password, then leave those Parameters out. Also, do not put a SemiColon at the end of the Connection String. Also, why did you make an "ADODB.Command" Object if you never used it?? NOTE: Also, you better learn the difference between Dynamic, ForwardOnly, Static, and Keyset cursors before you program any further, you are not making the most efficient use of resources... Dim adoCon As ADODB.Connection Dim rsData As ADODB.Recordset 'Open the Connection Set adoCon = New ADODB.Connection 'objcnn1.Open "Provider=MSDASQL.1;password =;User Id = ;Data Source=TEST;" (Wrong) adoCon.Open "Provider=MSDASQL.1;Data Source=TEST" 'Open the Recordset 'Open ForwardOnly / ReadOnly because we are only Enumerating the Records (maybe filling a ComboBox) Set rsData = New ADODB.Recordset rsData.CursorLocation = adUseClient rsData.Open "Select * From Test", adoCon, adOpenForwardOnly, adLockReadOnly, adCmdText While (Not rsData.EOF) MsgBox " " & rsData.Fields(0).Value 'sDownload (Huh?) 'MsgBox " " & rsData.Fields("FieldName").Value 'MsgBox " " & rsData!FieldName 'MsgBox " " & CStr(rsData!StringField) 'MsgBox " " & CInt(rsData!NumberField) rsData.MoveNext Wend
  • To display in a label

    question
    4
    0 Votes
    4 Posts
    0 Views
    M
    You can simplify the "Concatenation" like this... For i = 1 To n Label2.Caption &= "#" Next
  • To generate reusable code

    question database
    2
    0 Votes
    2 Posts
    0 Views
    M
    This all depends on how your Forms are related. Sometimes, if one Form is an Extension of another, simply use "Visual" Inheritance. Typically, I write individual Sub Routines for each ComboBox (as opposed to one Massive Routine that Refreshes all Data in every control...blech!). If this is your case, and it seems you are using this in more than one Form, place your Routine in a Module and Pass the ComboBox as a Parameter so it can fill the correct one. 'In Module... Public Sub RefreshCityList(ByRef CboList As ComboBox) 'Place Logic Here... End Sub
  • error message in vb

    help
    2
    0 Votes
    2 Posts
    0 Views
    S
    :cool: First up all tell me what Control you are using to select a date from the database? and also tell me what kind of technique u r using to get the date? :mad: You Must Specify Your Problem Clearlly VickyMD A Specialist in Message Digest Security
  • Date & Time of Server

    database sql-server sysadmin help question
    2
    0 Votes
    2 Posts
    0 Views
    S
    :cool: There are Two Options for it 1)Synchronize the client while logging 2)Create DCOM, Run it on server. Create Object on Client Write a method in DCOM Class to return Date and Time i m telling u the technique to get the date and time from the Server :cool: VickyMD A Specialist in Message Digest Security
  • window name

    question
    1
    0 Votes
    1 Posts
    0 Views
    No one has replied
  • How I prepare deployment package

    question sysadmin
    3
    0 Votes
    3 Posts
    0 Views
    J
    Hi Thank that's help me. :) Johnny Lizardo
  • VB and AutoCAD2002

    csharp com question
    2
    0 Votes
    2 Posts
    0 Views
    C
    The OCX you need can be found AT http://www.cadology.com Regards, Thunis
  • VB6 CallByName

    php database com help
    2
    0 Votes
    2 Posts
    0 Views
    D
    How are you generating your custom errors? It's been a long time since I did VB6 so I may be wrong on this. But to generate a custom error, I think(!), you had to something like this: Err.Raise vbObjectError+(your error number), (Source as String - optional), (Description as String - optional) RageInTheMachine9532
  • how generate a file ?

    question
    2
    0 Votes
    2 Posts
    0 Views
    D
    silveiro wrote: the user types a value in the textbox and when he/she cliks in OK the exe generate ( make ) a file with that information in a directory. cool isn't it ? i´ve already written the code but i need know about the lib necessary ! " DLL entry point generate " Ummm...This doesn't make any sense what-so-ever. What is the value for? What kind of file is to be generated? What directory, where? What is the 'lib' your looking for supposed to do? And what's with the comment "DLL entry point generate"? Are you looking to generate a .DLL file for another app? What's the app you generating for and what's this generated .DLL supposed to contain? And to top it all off, are you using VB6 or VB.NET to do this? RageInTheMachine9532
  • Error Loading DLL

    c++ help com question
    1
    0 Votes
    1 Posts
    0 Views
    No one has replied
  • Lan PCs detect

    help question
    1
    0 Votes
    1 Posts
    0 Views
    No one has replied