VS 2010 Calling Text When Using Daytime
Feb 3, 2011
So the reason i'm creating this tread is this, i'm programming a app that display the cafeteria opening time and closing time at my school. This program is running as a system tray app which on mouse-on display the opening/cosing time at the tray, also other features but thats not important at this point.
I'm getting the wrong output, a random value from my "regnestykke", at my tray.
My code is this:
vb.net
Public Sub New()
'Opbygning af menuen
[Code]....
View 6 Replies
ADVERTISEMENT
Feb 5, 2011
I have an application written in 2005 using VB Express. It uses a DLL from a supplier who is now defunct, so I have no idea what language it was written in.I have moved to a new machine running Windows 7 (64-bit) and installed the DLL on it OK (it installed into the x86 folder, so I assume it's 32-bit). The sample program supplied with it runs OK, so I know that it works. However, the application's .exe file which I copied over fails with an error message saying "cannot create ActiveX component".The offending line of the program is:
objCDDeviceManager = CreateObject("CDTextReader.CDDeviceManager")
CDTextReader is the name of the DLL.I've downloaded VB Express 2010, but when I build the program using it the same thing happens.how I can get it to work? I've tried compiling it for 32-bit but get the same result.
View 1 Replies
Mar 12, 2011
If I have two classes, one and two:
Public Class One
End Class
Public Class Two
[Code].....
Is there any way that a sub in class one can call the sub in class two?
In other words, I have a main class that instantiates objects from other classes, but I want one of those other classes to be able to 'talk back' to the main class without being polled.
View 5 Replies
Oct 6, 2010
Can someone please show me how to call this API function?
View 1 Replies
Jun 5, 2012
I have a MDIParent Form named "frm_discipulus.vb" which opens a MDIChild Form named "frm_gestionare_cursanti.vb"
Private Sub tsm_cursanti_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles tsm_cursanti.Click
Me.Cursor = Cursors.WaitCursor
Dim frm_mdi_gestionare_cursanti As New frm_gestionare_cursanti
frm_mdi_gestionare_cursanti.MdiParent = Me
[code].....
I have tried to call the "Public Sub frm_gestionare_cursanti()" by using the code
frm_gestionare_cursanti.afisare_note_obtinute()
And nothing hapends.Why ?What should i do to refresh the DGV on MDIChild?
View 2 Replies
Jul 18, 2012
essentially I need to create a class that houses the methods and then call the methods in the form but I can't seem to find out what the right code is to call it. I think there may be an issue with the conversion from a double to a string.
This is what I have for the Class
Public Class Aircraft
Dim Names() As String = {"A-747", "A-737", "C-150", "D-240"}
Dim TakeOffVelocity() As Double = {250, 264, 270, 240}
Dim Acceleration() As Double = {33.5, 44.2, 37.1, 51.9}
[code]...
View 3 Replies
Sep 11, 2010
I have create a small routine to Generate Tabpages on a tabcontrol, and on each tabpage I have Created a label and a combobox, my problem is that since Im generating them in the code and the name of the two controls change based on an index.. ie. Combobox.name = "cmb" + Index I need to be able to retrieve the selected item from this combobox in order to move on to my next routine.. but I do not know how to reference these comboboxs since there is no pre or defined named for them.
View 4 Replies
Aug 26, 2011
I'm having trouble on calling a public sub on another form. Here is the sub:
Public Sub BOTAO_NUMERICO(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles N0.Click, N1.Click, N2.Click, N3.Click, N4.Click, N5.Click, N6.Click, N7.Click, N8.Click, N9.Click
Dim Res_ant As String
Dim Res_atu As Double
If (Res <> 0) Then
[Code] .....
On form Normal, BOTAO_NUMERICO works fine, but on Cientifica it don't.
OBS: All objects on both forms are the same, with same name.
View 2 Replies
Jun 9, 2011
I'm currently having issues calling a .ps1 file in my vb.net project. The program is supposed to provide a simple way for end users to unlock Active Directory accounts. The vb.net project is simply a text box with a button. Users will type the username of the locked account. When the button is pressed, the program writes whatever is in the text box into a CSV file. The CSV file has a samAccountName column in it. After the file is written to, the program then calls a Powershell script that reads the CSV file and unlocks the account based upon what is in the file.The program does everything it is supposed to except for calling the Powershell script to actually unlock the account. I've tried a Process.Start(filePath) which would open the file, but opened in notepad and didn't execute anything. Right now the program is calling a batch file which is supposed to run the script in Powershell but that attempt also failed.
View 3 Replies
Aug 25, 2010
I am pretty well a novice to Visual Basic 2010 and am trying out the VB2010 express edition. I not the the coding syntax for VB2010 is different from VB6. I'd like well documented code for opening Excel, creating/opening a Workbook, reading and writing data and closing Excel Workbook when I exit the VB2010 form.
I am developing a VB2010 application form which I'd like to work dynamically with an existing MS 2003 Excel spreadsheet that will be provided with the application . The VB2010 form provides some data input for cells in a worksheet (named "Fuels") in an existing Excel Workbook called "carbonfootprinter.xls". Based on the input data, calculations are performed and the corresponding results are output to other cells in the same "Fuels" worksheet. The results are then also graphed in the Excel Workbook. When the application form loads, I'd like VB2010 code that checks if the "carbonfootprinter.xls" exists and is open, if not then it should be opened to receive data input from the VB2010 form and to perform calculations,and finally the VB 2010 application should close the Excel spreadsheet
View 1 Replies
Jan 15, 2011
In a program of mine, I have a resource (which is a textfile). This contains also vb.net code, It is resource which is binded to an .exe, with the mainprogram that I have. So the main program calls the resource, and the resource bind to an exe file.
I have this line:
Declare Function GetProcAddress Lib "kernel32" (ByVal handle As IntPtr, ByVal name As String) As IntPtr
In the source.txt and I want to replace this whole line by a string(or word) which calls this line from somewhere else. For example in another source.txt. A textbox is not possible because this is not a vb form, but a .txt-file. Maybe I can create another resource, which IS a vb.net form, call it or something? In this case. I can create a textbox with this line that I gave above, And I can use it by: textbox1.text.
View 2 Replies
Jul 6, 2010
In the exam paper, student have to check the checkboxes [usercontrol does not work] whether the question is correct or wrong.Now as I have hundreds of questions, I cannot write the same code again and again with the IF conditions, is there anyway to make it a function or something then call it whenever is needed.As well as I wanted the marks to be added when a student submits the paper.
View 5 Replies
Feb 20, 2012
A thread listens for incoming information from a server will add the received string to a custom control (containing a textbox and a listbox, I've called it console). This requires an invoke so I used the following
Dim InvWriteCons As Console = Gary.ChatCons
Dim INvWriteText As String = "DEFAULT"
Public Sub InvWrite(ByVal cons As Console, ByVal message As String)
[code].....
View 2 Replies
Aug 30, 2010
I've got a dll, written in C++ (which I have the source code for and have compiled it under VS2010)It has a function I want to call in VB
SHARED_FUNCTION int yasdiMasterInitialize(const char * iniFile,DWORD * pDriverNum );
I've declared it as follows:
<DllImport("yasdimaster.dll")> Public Function yasdiMasterInitialize(ByRef IniFile As String, ByRef DriverNum As UInt32) As Integer
End Function
as when I try and use it as follows I get a pInvoke error:
Console.WriteLine("Initialise:" & yasdiMasterInitialize("yasd.ini", Drivers))
From reading around this is something to do with the declaration but I don't know what to change as this is the first time I've tried calling a DLL.
View 2 Replies
Dec 5, 2011
I have two forms Form1 and Form 2. I am passing a function with three values from Form1 and want the load event of form2 to trigger this function.. Basically I want to "paint" the values of qseq, midline and hseq on form2
Public Class Form1
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
[Code].....
When I run this, nothing gets printed on form2 as when load event is triggered thee drawstring method is not called. how can I call drawstring from load method as drawstring takes in arguments and is called from Form1 class.
View 1 Replies
Mar 30, 2012
I created a STRING SEARCH function in C/C++ - and I'm trying to use it in a multi-threaded situation in VB. I started this problem in a thread in the C/C++ section of the forum - here [URL] my last post shows me getting this error trying to call the function. Ran the code - got to that point - and in the immediate window I did
[Code]...
View 4 Replies
Oct 8, 2010
I am wondering if it is possible to call an application, say "notepad.exe" (among other application's that are already open) and setting focus on the same, so the user can readily start working on it.
View 6 Replies
Feb 24, 2012
I have this code that was working in a proof of concept app I had - but now will not work.
For Each ddfile As String In ddfiles Dim MyThread As Thread ' simple new thread Dim newFS As FSObject = New FSObject() 'new FSObject which is a file object I made up' used because i needed to keep the name and index matched so the callback function had something to work with
[Code]...
View 1 Replies
Oct 21, 2011
I want to resize picturebox with mouse to maximum and minimum size as Skype when video calling...I`m using vb 2010...
View 3 Replies
Jan 20, 2011
I'm Making a Simple syntax highlighter and I'm Doing the highlighting in the text Changed event of a RTB and for obvious reasons I can't re highlight the whole document each time someone presses a key so i highlight one line each time the text changes. But this creates a Problem. If someone pastes code into the RichTextBox It only highlights the last Line. So is there a way to get if the user typed the text in with his keyboard or pasted it from the clipboard in the text Changed event?
View 6 Replies
Oct 15, 2010
Is there any way to determine whether a form was closed by clicking the "X" button or by calling Me.close? They both fire the FormClosing event, but I need to determine how the form is being closed so I can do different things.
View 7 Replies
Mar 30, 2012
I am having a problem with the BackOrdered Function of my program. I can`t get it to say anything but 0 when I run the program. Another problem I am having is the input box pops up like 6 times and it`s only suppose to once. [Code]
View 9 Replies
Oct 24, 2009
Here is some example code of what I mean:
vb
Public Class Form1
Private Sub Button1_Click(ByVal sender as Object, e as systemEventArgs) Handles Button1.Click
[Code]....
View 5 Replies
Jun 27, 2011
Just a quick question my textbox1.text seems to get focus when I run the APP.how do I cancel any focus to any textbox?I just don't want to select it or anything when I work with it only when the user select or uses it.
View 1 Replies
Sep 6, 2010
I'm trying to create a small program, which I think will be helpful to others(in here). My aim is to convert the English text shown in screen to Malayalam. English-to-Malayalam conversion is not a problem. But the problem is, how to extract the text from the screen. In most of the converter/translator, the text needs to be copied or written down in the translator tool. But my program will cut off that part. That is, simply move the program window (having a rectangle hollow portion) to the English word that needs to be converted. And upon pressing a button (or autodetect), the English word is converted to Malayalam.
So, my question is how to extract the English text(or words) from the screen (which is seen through the hollow portion of the window.
Here's a screenshot of what I'm trying to do.
View 22 Replies
Jan 18, 2012
I need to make a listview, for each item to be like this:
- An image on the lef.t
- A header text on th etop.
- A minor text on the bottom.
View 15 Replies
Apr 25, 2012
im trying to make a program in which if the textbox text and the listbox text are the same order, which they are in the picture, a bluie fonted text saying well done appears. However only the red text appears which is only meant to come when the order of the text in both listbox and textbox isnt the same.
Here is the code that i used for this:
listarrays = name of listbox
textbox1 = name of textbox
l is the name of the label for correct answer(blue font)label3 is name of label with red font which should only appear for wrong answer
Dim text As String = Me.TextBox1.Text
For Each item As Object In listarrays.Items
If item.ToString = Me.TextBox1.Text Then
[code].....
use another textbox instead of the listbox but thats just making itmuch harder for me as I already made the full code working with the listbox. My lecturer told me i need to convert both in string so both textbox and listbox are compatible and i did so (see code above) but the correct label doesn't show?
View 17 Replies
Dec 16, 2011
I need to search through richtextbox1.text for emails out of a random jumple of text and source code and put the emails in richtextbox2.text.
View 1 Replies
Jan 29, 2012
I am trying to implement a webservice but I am receiving this error :Client found response content type of 'text/html', but expected 'text/xml'.The request failed with the error message:Quote:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
[code].....
View 3 Replies
Apr 14, 2012
I am trying to auto tab to the next text box after my limit of characters has been reached in a text box. Visual Basic 2010 Can this be set in the properties? I have 7 boxes, each allowed to hold only one character.
View 5 Replies