Pass Variable To DLL?
Sep 17, 2009
VS 2008, .NET 2, Win XP I need help with passing a String variable from App to DLL?Why: I have App that on UnhandledException needs to call ErrorReport dll, send to that dll some strings like: App name, stack, error... Dll will send through internet this gathered data to me.
I can open Dll, close it, code it, but I can not figure it how to send data to it like VB App name, VB App version, VB App error.message For example I can in my form make a global variable like Public TestGlobal As String and that I can call from anywhere in my app, but how to do it with dll?
[Code]...
View 3 Replies
ADVERTISEMENT
Sep 5, 2010
Using Visual Basic 2008 Express. I need to pass a variable to another form. Or else make the variable visible to both forms.
View 4 Replies
Jul 8, 2009
ok to start i know very little about VB6 but i am very good in true basic lol (stupid school teaching the wrong language -_-) anyway im just asking you to make the answer as clear as possible because i don't know very much. heres the problem . ok in the above example i have a button that (for my example) can be used to build a house (lol) i then have a variable in the button sub called money which will have 150 subtracted from it when the button is clicked my problem is it say variable not defined when using this button ... i have declared the variable in a module and in form load along with my other 50 or so variables. my question is how do i pass the variable into this sub and then send the new value back into form load so it can be sent into another sub for more calculations.
View 14 Replies
Jan 14, 2010
I currently have the following funcion:
Public Sub GetUserAmount(ByVal ConnectionString As String)
Dim command1Text As String = "SELECT Wager FROM Donations1 WHERE DonationId = (SELECTCOUNT (BidCountHistory) FROM BidCountHistory)"
[Code]......
View 4 Replies
Aug 6, 2011
I need to pass a variable by name like this
Dim html_news = "...the news ..."
Dim var = "news"
Dim a = "html_" & var
' content of that variable
How can I do that in VB.NET ?
View 1 Replies
Sep 7, 2011
I am currently trying to teach myself how to program VB.Net in Visual Basic 2010 Express.I've been working on a little project for a while and have hit a wall. Normally I can find what I need online but I am now at a complete loss. Essentially I am trying to pass a pair of variables from Visual Basic (file names actually) to VBA so that I can copy/paste data from them using VBA. What I need is to find out how I can pass variables (in string form) back and forth between VB and VBA
View 13 Replies
Oct 1, 2011
I have a Public Sub where I declared
Dim Elev As Double
later under that Sub I have the program go to anothrer SubRoutine that uses the same Elev variable. Within that subroutine I get a Variable not declared error. My book talks about using "Static" but in the context i guess I am using it, it hasn't worked.
What is the best method of tranfering the information from one sub to another.
View 1 Replies
Oct 12, 2009
I am using VS 2008.I have an application that has a variable defined as an Application Setting. I use this variable to define the connection string so I can change the location of the database withour having to recompile the application.My application references a class library. The Class Library is the one that manages the database. The DLL is referenced by my application.How can I make the class library use the Connection String defined as an Application Setting of the consuming application? If I say in the class library:sdRadhaAllied.Schema.Connections(0).ConnectionString[code]...
View 4 Replies
Aug 9, 2009
I'd like to know, if I have a variable,for example, a string, how to pass its value to my new app domain:
static string _str;
static void Main(string[] args) {
_str = "abc";
[Code].....
View 2 Replies
Sep 11, 2009
i have a dialogbox (dialog1) i will assign the input from textbox a variable to the from1 but i cant do that.the variable in form1 is Dim get_from_dbox As Long i try to assign to it from dialog1 like below it fails form1.get_from_dbox = Textbox1.Text but i can assign to textbox??like that which works well
form1.RichTextBox1.Text=Textbox1.Text I am new programing i know i am wrong .don't know where?
View 1 Replies
Sep 20, 2010
How can i pass a global variable from dll project to a exe file, after this i want to run the exe also from the dll.
View 9 Replies
Oct 4, 2010
I would like to create this url blah.com/preview?h=yes
so i can do this
<% if request.querystring("h") = "yes" then %>
jquery stuff
<% else %>
don't do jquery stuff
<% end if %>
View 3 Replies
Sep 8, 2011
I have a grid of NumericUPDown fields. When a value is changed, I want the page to update a label at the bottom of a column - its a total line. Everything works, when the page is updated(a button click), but I want it to update real time. as they are changing the updown value... My question, and I have searched and couldn't find it, how do I pass a variable to an eventclick subroutine? Or make the variable a global variable, so it will work in the eventclick subroutine...
View 2 Replies
Nov 17, 2010
I have 2 public variables that I declared in form1 of an application. I am trying to call that variable in form2 and then pass that variable in a sql query. [code]...
View 2 Replies
Dec 26, 2011
Is it posible to get a value from a javascript variable and use it into visual basic code without incrusting value on any control.
View 1 Replies
Sep 25, 2010
I can't find a way to pass a simple variable from my code behind file to the .aspx page.
In code behind I have:
Dim test As String = "test"
and in my aspx page I try: <%=test %>
that gives me the following error: Error 2 'test' is not declared. It may be inaccessible due to its protection level
View 4 Replies
Jun 8, 2011
I have one form, which the user enters upto 5 websites then clicks go - I have on the second form, the one with the webbrowser. A timer which checks if the web browser is busy then either a green light or black image will be shown along side the assocaited input box on the first form.I am finding it impossible to feed variables into the clock through ByVal, like I would a subroutine or function.
Private Sub ActiveMe_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ActiveMe.Tick
If ((WebBrowser1.IsBusy)) Then
Hey.BackColor = Color.Black[code]....
'Error message says Hey is not declared, as i can't pass it through to timer
The variable Hey is determined by the first form - Which picturebox.I have an if statement which simply says if inputbox one has url enter then Hey = Picturebox1, If input box2 has url entered then Hey= Picturebox2 etc.What I want is the timer to check the page has completed loading or is still loading or refresing and the appropriate green or black to be shown aside url input box on first form.I considered using a sub or procedure to act as a clock (a large for loop with another for loop within it, acting as a delay). But found this slowed down theapp to the point of crashing it.
View 1 Replies
Jul 17, 2010
I want to pass variables from one form to an other. The variables i I need in the second form( called" Hulsview") are :" hulsbreedte" and" hulslengte". To check if the varibles are passed I added a textbox in the second form,called" hulsview" to check the variable" hulsbreedte". The value selected in the combobox on on form1" hulsbreedte = HulsBreedte1.SelectedValue" returns always 0 in the textbox on de second form.
Here is the code form1:
Imports System.Drawing.Drawing2D
Public Class Form1
Inherits System.Windows.Forms.Form
Public hlb As Point 'not used
[Code] .....
I am using vb express 2010.
View 1 Replies
Jun 25, 2011
i have a class called car and within that class i have a few vairables
Public Class car
Public Property Name As String
Public Property ID As Byte
[Code].....
View 5 Replies
Mar 3, 2012
Im having a very difficult time trying to pass an vba array ive built from ms- access vba to a .net function.I don't have a com problem I can reference the library just fine from vba but and i can call a simple function from vba. however my problem exist when i attempt to try to pass an array to the vb.net function. vb.net code
View 3 Replies
Aug 6, 2009
Below is the code that i use to call up a new form. I wish to pass the variable 'connstr' into frmRace.
Public Function ShowRaceForm(ByVal userName As String, ByVal connStr As String) As Form
Dim frmRace As New RaceForm
Return frmRace
End Function
View 5 Replies
Jul 8, 2009
I have a variable that I am trying to get to iterate up by one, i.e. X starts at 0 x+1 on first pass thererfore its at 1 then x+1 on second function call therefore x=2 and so on. I've tried the different loop and for commands but I cant get one to stay until the next function call, does it need to be a global variable? I'm sorry if this is in poor form or improperly formatted, definently trial by fire going into the object oriented world.
View 9 Replies
Nov 4, 2010
I have a public variable that I declared in form1 of an application. I am trying to call that variable in form2 and then pass that variable in a sql query.
If I declare
Public Class Form1
Public payPeriodStartDate, payPeriodEndDate As Date
How then to I declare that variable in form2 and how to I pass it to my sql query
SELECT [Exceptions].Employeenumber,[Exceptions].exceptiondate, [Exceptions].starttime, [exceptions].endtime, [Exceptions].code, datediff(minute, starttime, endtime) as duration INTO ScratchPad2[code].....
View 13 Replies
Apr 19, 2012
I need to pass a string variable into a wql query:
Dim booking As String = System.Configuration.ConfigurationManager.AppSettings("PlayersFile")
Dim query1 As New WqlEventQuery( _
[Code]......
However, I'm uncertain how to make the variable booking parsable by the query.
View 2 Replies
Dec 15, 2011
I have two forms with a variable (x) that is set by a trackbar on the second form.
View 3 Replies
May 8, 2010
I know I gotta get a book or something because things are just way too hard for me. But before that happens I have what I think should be an easy question.
I want to create a variable in xaml, the angle that a control is currently at, and then use this variable in my VB code (event handler).
Or even better can I, while in VB code, check the current angle a specific control is at so that I can add to the number when setting the new angle?
View 8 Replies
May 22, 2012
I am trying to pass a variable to a SelectCommand in SqlDataSource. I have this MyIdVal that need to be passed.
Here is the code :
<form id="form1" runat="server">
<div>
<%=MyIdVal%>
</div>
[Code]....
View 1 Replies
Mar 4, 2010
How do I pass a variable to a threaded procedure? The clickedItem.Tag contains a username as a string which I want to pass to Public Sub GetLockoutInfo(ByVal UserID As String) but the AddressOf GetLockoutInfo line doesn't allow for a parameter to be passed to the procedure.
Private Sub CallGetLockoutStatus(ByVal sender As Object, ByVal e As System.EventArgs)
Dim SearchUserDetails As New NiRDs_Functions_OC
[Code].....
View 2 Replies
Jul 6, 2009
I want to know if it's possible to retrieve the variables name from when it was passed into a certain function. For example, if I call parseId(myId) to a function with the signature parseId(id), i can obviously retrieve the value of 'id'. However, is there any way I can retrieve 'myId' as a string (without passing it as another value)? Specifically in vb.net, but I'm interested in how it would work in any given language.
View 3 Replies
Dec 18, 2009
I don't think I fully understand passing values from a sub to a module. Here is what I'm trying to do (problem is at the '****):
[Code]...
I think I've seen something like this before - where the actual function returns a value. Is this possible? Or would I have to pass an integer variable from the sub to the function, and then return it back to the sub?
View 3 Replies