Getting Code To Run When Returning From Dialogbox
Feb 27, 2009
i got two forms
form1 (frmUserDetails)
form2 (frmSearchForm)
when i click the search button in form1, form2 appears.
i get the information i want from form 2 and store it in a variable.
when i close form2 and form1 is active again i want this code to run automatically:
[Code]...
View 2 Replies
ADVERTISEMENT
Feb 27, 2009
i got two forms
form1 (frmUserDetails)
form2 (frmSearchForm)
when i click the search button in form1, form2 appears.i get the information i want from form 2 and store it in a variable.when i close form2 and form1 is active again i want this code to run automatically:
Me.userIDsearch = frmUserSearch.NuNameTB
Try
'TODO: This line of code loads data into the 'SoftwareLookupDataSet.tbl_software' table. You can move, or remove it, as needed.
Me.Tbl_softwareTableAdapter.Fill(Me.SoftwareLookupDataSet.tbl_software)
[code]....
how would i get the above code to run when the focus is back on form1?
View 8 Replies
Apr 20, 2012
The following code in C# gives result "228452386"
UInt32 a;
int k = 0;
a = 0x9E3779B9;
a += (UInt32)(url[k + 0] + (url[k + 1] << 8) + (url[k + 2] << 16) + (url[k + 3] << 24));
After above code is ran, "a" contains "228452386" But the following same code in VB.Net results in "Arithmetic operation resulted in an overflow". Basically the last statement is returning value "1868983913" so the runtime error is generated.
Dim a As UInt32
Dim k As Integer = 0
a = &H9E3779B9UI
a += CUInt(AscW(url(k + 0)) + (AscW(url(k + 1)) << 8) + (AscW(url(k + 2)) << 16) + (AscW(url(k + 3)) << 24))
note the variable "url" in above code could be any string and it is same for both codes.
EDIT:When I run the following statements in both C# and VB.Net than they both return same value
C#
(UInt32)(url[k + 0] + (url[k + 1] << 8) + (url[k + 2] << 16) + (url[k + 3] << 24))
VB.Net
CUInt(AscW(url(k + 0)) + (AscW(url(k + 1)) << 8) + (AscW(url(k + 2)) << 16) + (AscW(url(k + 3)) << 24))
Both statements return value "1868983913" for "url" "info:microsoft.com". But when I run complete statement with a += ..then VB.Net gives error while C# returns value "228452386".
View 3 Replies
Dec 2, 2010
VB.NET Code:
Module Module1
Sub Main()
Dim x, y As Single
x = 0 + (512 / 2 - 407) / 256 * 192 * -1
[code].....
returns 0: 0
View 2 Replies
Jul 10, 2009
I must admit it's been a few years since my RegEx class and since then, I have done little with them. So I turn to the brain power of SO. . . I have an Excel spreadsheet (2007) with some data. I want to search one of the columns for a pattern (here's the RegEx part). When I find a match I want to copy a portion of the found match to another column in the same row.
[Code]...
View 3 Replies
May 24, 2010
I been trying to create a database of files. I wanted to list the Titles and Authors of the files.
How can this be done?
View 4 Replies
Jun 14, 2011
I have a file that can be saved to a portable device. I would like to know how I could create a DialogBox to select a portable device to save my file to. This is very similar to a save, as DialogBox except the file already exists.Perhaps better said, I need to be able to download to a DialogBox.
View 2 Replies
Apr 27, 2011
I have a asp.net mvc route that is taking a url and doing a simple get and return the status code from the request.
<AcceptVerbs(HttpVerbs.Post)> _
Public Function ValidateUrlStatusCode(ByVal url As String) As ActionResult
Dim code As Integer = 0
[Code]....
Now if I use firefox (using Firebug) and go to the url http://www.facebook.com/blah.html, I get the expected 404 returned. However if I use my application to call the mvc route via an ajax call, I get 200. If I set the request object's AllowAutoRedirect to false, I get 302. I never get a 404. I am verifying this once again through Firebug.
View 1 Replies
Mar 19, 2010
I have a asp.net mvc route that is taking a url and doing a simple get and return the status code from the request.
<AcceptVerbs(HttpVerbs.Post)> _
Public Function ValidateUrlStatusCode(ByVal url As String) As ActionResult
Dim code As Integer = 0
[code].....
View 26 Replies
Jan 13, 2012
VB 2010, Trying add custom colors to a dialog box, save and reload on opening. The "add custom color button" just adds it to the boxes on the left and does not save it for future use. If the user select that color having added it the left you can then get the integer value and add it to the code
ColorDialog1.CustomColors =
New
Integer
() {CustCol1, 16646145, 16580610, 16645891, 16711426, 65536, 6699546}
And save for displaying next time. but it does not return the same color.
Why does it return a different color, it displays the correct color when used at the time of saving? Is there no way of saving all the custom colors, if a user puts several in the boxes on the left? You have to make sure you select Basic color first otherwise it changes existing custom color or if you select a blank box you cannot select anything.
When custom colors are added via code as above it goes along the top row first but when you click the "Add custom color button" it adds the first color to first position of the top row and the next to the first position of the bottom row. How to add custom colors to a dialog box, save and reload on opening.
View 5 Replies
Aug 15, 2011
is there any code for opening a file without using any dialogbox? directly
View 4 Replies
Dec 19, 2011
I am using the tutorial laid out here http://www.androidsnippets.com/vbnet-server-side-code-to-send-c2dm-messages to attempt to send a message to my device. I have requested a device ID and placed that string in the RegID String.I receive a (what looks like a) GUID for the googleAuthToken successfully, but when the rest of the code executes,the response I get is Error= MissingRegistration. What exactly am I missing to implement C2DM from a server via VB.NET?
View 1 Replies
Jun 11, 2012
They are numerous examples of using SaveFileDialog mainly on simple textboxes. However, I have in my resources an Excel SpreadSheet. I want to allow the use to select the destination where he can save this spreadsheet. He is not allowed to change the name of the file in the filename. Afterwards, I want to copy the file from my resources and save it to the user's selected destination. How can I do that?
View 1 Replies
Mar 12, 2009
I am trying to create a Messagebox/dialogbox that will allow me you Define the Prompt and the text for the two buttons. I started by looking around the internet and found [URL]. It got me started But i don't think i have the libraries to make the stackoverflow.com code work. i don't know enought about events to make the box always have the focus untill it is closed or one of the buttons is pressed. I would also like to return the button.text of the button that was clicked.here is the little code i have
Public Class DialogBoxForm
Private _ButtonName1 As String
Private _ButtonName2 As String
[Code].....
View 3 Replies
Feb 29, 2012
I made a windows form which contains a listbox (named VenueList). The listbox is pulling it's values from a list provided by a binding source VenuesBindingSource which is pulling in a ID for the value and a name for the text. There is a button which is causing a DialogBox to appear which is asking for values to store in the database for a NEW venue. Once the values are filled and insert the database, what's supposed to happen is that the dialog box closes and goes back to the original form which invoked it.
However, instead of updating the list. The list stays the same. But if you close the form and reopen it, you see that a new value was added.
TournamentSettings.VenuesTableAdapter.InsertVenueQuery(Trim(VenueNameTxt.Text), Trim(VenueAddress1Txt.Text), Trim(VenueAddress2Txt.Text), Trim(VenueCityTxt.Text), Trim(VenueProvinceTxt.Text), Trim(VenueZipTxt.Text), Trim(CountryBox.SelectedValue), Trim(VenuePhoneNo.Text), VenueType.SelectedText, VenueWebAddress)
TournamentSettings.VenuesTableAdapter.Fill(TournamentSettings.VenueNameList.Venues)
In the above code, InsertVenueQuery is the name of a query from the designer which is invoked to add the values onto the tableadapter VenuesTableAdapter which is used to fill the combo box on load. I also sent the Fill command to refill the table with the new value. So the question is, should I go about doing this another way, rather than feeding the Table adapter and sending a fill command on to the datatable? Or is there something that I'm not doing here which I should to force that value into the list. I'm tempted to redo everything outside of the designer but that's a lot of code since I have to essentially run two commands (one to insert the data, and another to get the @@IDENTITY value since this is run on an access database.)
View 1 Replies
Jan 28, 2010
I want to have a dialog box like SaveFileDialog that will enable the user to choose a folder name and the save it. How I can achieve this?
View 5 Replies
Mar 28, 2012
I am calling a function in an external dll to a device that runs some firmware. When I call device_open(), the device driver brings up a Warning dialog box that says there is a newer version of the firmware available. How do I suppress the warning dialog box? I am calling this function during an overnight test, so the dialog box prevents my tests from finishing.
View 1 Replies
Mar 15, 2012
I have an ASP.NET web application (VB.NET) using an Oracle database. On an insert, I need to get the identity of the inserted row back. I am trying to use RETURNING, but I keep getting a value of 1 returned.
Dim strInsert As String = "INSERT INTO L.TRANSACTIONS (LOCATION_KEY, TRANS_CREATOR, TRANS_EMAIL, TRANS_PHONE) VALUES (:location_key, :trans_creator, :trans_email, :trans_phone) RETURNING TRANS_ID INTO :ukey"
[Code].....
View 2 Replies
Dec 12, 2011
My brain may just be fried since it's the end of the semester, but my teacher kicked this back to fix and resubmit...she said that I am "returning the name of your function rather than your variable name".
Here is my code for all 3 forms.
code:
These are forms to calculate the cost of getting a cell phone package.
View 6 Replies
Nov 13, 2010
So I have a pretty simple UDF written in visual basic for use in excel. It calculates your approx. taxes. Lets say I use it as such: =Taxes(I23-I18,I24-I20,"Married")
If I type this in it works great. Now if I save the sheet and restart excel the cell now says #VALUE! If I select the formula and hit enter once again it recalculates it fine. What am I doing wrong? Application.Volatile shouldn't be needed but I was trying ideas. [Code]
View 1 Replies
Mar 15, 2012
This might seem like an insanely easy question, but I cant seem to find an answer anywhere to it. I'd like to think that I am decent at VB but while I was learning javascript the other day I found something that seemed awesome and now I cant figure out how to do it in VB.in javascript it looks like this
var someValue = getThatValue()Its both calling and setting the value from the getThatValue() sub. what is the VB equivalent?
[Code]...
View 2 Replies
Nov 2, 2010
I have a piece of code that checks a time and then adds hours based on the daylight savings time value.
Dim CommentDateTime as Date = "11/2/2010 8:21:42 PM"
If CommentDateTime.IsDaylightSavingTime Then
'do something
Else
'do something else
End If
The problem that I'm having is that IsDaylightSavingTime behaves differently on the production server than it does on the development.On the development server the case is TRUE, but on the production it is false.
Both servers are running the same OS and are both running .NET 3.5
[Code]...
View 2 Replies
Oct 10, 2011
I have two different GetConstructors(), one is returning what it should be returning the other however is returning nothing. ItemName is BSRPTReportPerformanceSubcontractorRating
The first one which is returning what it properly should is:
[Code]...
View 2 Replies
Mar 20, 2012
I have an XML file that sits on the hard drive of a Server running my Web Service. I need to access that file from another application.
This is my method on my Web Service
Public Function getXMLFile()
Dim xmlDocument As System.Xml.XmlDocument
xmlDocument = New System.Xml.XmlDocument()
[Code]....
This is caused when I try to return the xmlDocument object
From the information I gathered, it's like SOAP wants to wrap my XML in more XML and stops me from doing that.
How do I go about getting the XML File from my Web Service if I can't return XML?
View 1 Replies
Nov 23, 2010
i am new to VB programming, actually this is my first time with VB any ways here is my situation that is driving me mad
[Code]...
View 7 Replies
Jun 22, 2010
I am creating a message box in VB8 for an error. I created the message box and everything works. The message box returns a value of 0 which is the default one. Where does it return 0 to. Or do you have to tell it where to return it.
View 2 Replies
Apr 25, 2011
Thanks William, that was the ticket. Had to assign the name property on both ends [DataTable.TableName].
On a side note here: There appears to be some school of thought (no offense Marc) that the following statement is always true:
"Everything in the world can and should be made into an object."
It is, simply, not always true. There are cases where you cannot cram your 'object' into any cookie-cutter or class no matter how you try to customize it. For me to objectize this beast, I'd have to create roughly 4,000 objects. I don't have time to do that, and yet this project must run as a service. Frankly I think the developers at MickeySoft need to get out more into the real world, and see for themselves that although theory is great it does not represent true-life challenges. I am all for working with objects for the obvious benefits, but there is a reality that universals do not exist. In my trade, even 'most of the time' rarely happens.
Before they push out a new technology set, and cease support of an old one, they need to make sure that the new technology has the same capabilities the old one had.
For the record: The people who believe the above statement to be true are also the same people who would refuse to take the project I'm currently working on.
Just the same -- thank you both for your time, efforts and opinions!
I'm trying to create a WCF function that will return a table to my console testing app. I am a total noob. The data is 2-dimensional and looks like this:
23 Letter
42 Another Letter
43 Document
[Code].....
...Of course, it won't work. I just need to get the WCF to pass a basic table to my console application. The execute SQL seems to work just fine, I just can't get the data back to my application.
View 1 Replies
Dec 14, 2009
returning a function value? I have a simple function that returns an integer. This function works fine when executed in SQL Developer but, when called from my apps, it always returns 2 regardless of anything. I have checked it over and over again, I cant seems to find where I am going wrong.
[Code]...
View 6 Replies
Jun 15, 2010
I want to return a value (vbCancel or vbOK) from a form which is shown as a dialog from the calling form.So, I overloaded the showdialog method to return the value.Trouble is, a value of zero is returned as soon as the form is shown.Now, if I can make it behave more like the showDialog method where execution doesn't continue until the form is hidden everything would be fine.
View 3 Replies
May 8, 2012
I have a combo box that is "linked" to dataset.
I have a Label that I want to return the value from 'Description' Column from 'Base' Table.
This is determine when user has chose a value from the combo box which is linked to the 'Base' Table from 'Material' Column.
View 1 Replies