w3hello.com logo
Home PHP C# C++ Android Java Javascript Python IOS SQL HTML videos Categories
Secure java card access in windows phone 8
There is something in place through the Wallet and SecureElement APIs which allows you to access the UICC. This requires some privileges. This was developed in the context of NFC payment, and may require a specific SIM. Probably more APIs will emerge in the next release of Windows Phone 8.

Categories : Windows Phone 8

Access DB Query in Visual Basic Form
You haven't shown the sql statement from txtSQL.Text that you are attempting to use. A simple SELECT statement will retrieve all rows from a table, unless a WHERE clause is used to restrict the number of rows returned.

Categories : SQL

How to convert this MS Excel Visual Basic code to work with MS Access
Most of this code should run practically unaltered from Access, provided you have the correct References ticked in Tools/References. An Excel specific item is: ActiveWorkbook.Path the equivalent in Access is Application.CurrentProject.Path and this: vClient = Range(Selection.Row & ":" & Selection.Row) which equivalent values I assume you would read from either an Access table or textboxes on a Form.

Categories : Pdf

error when update data ms access using visual basic 2010
Try to use a parameterized query to execute your code. The error message is relative to the fact that you haven't initialized your connection with the information contained in the ConnectionString. Here an example on how to do that...... but...... Dim cmdText = "update data_ruangan set [Name] = ?,Location = ?,Capacity = ?, " & _ "Operational_Hours =?,Information = ?;" Using cn = new OleDbConnection( cnstring ) Using cmd = OleDb.OleDbCommand(cmdText, cn) cn.Open cmd.Parameters.AddWithValue("@p1", txtName.Text) cmd.Parameters.AddWithValue("@p2", txtLocation.Text) cmd.Parameters.AddWithValue("@p3", txtCapacity.Text) cmd.Parameters.AddWithValue("@p4", txtOperational.Text) cmd.Parameters.AddWithValue("@p5", txtInformation.Text) '''' WARNING ''''

Categories : Ms Access

Accessing Rows from Access Database in Visual Basic 2010 based on Combobox Selection
Basically like this .. Private Sub cmbHotels_SelectedIndexChanged(sender As System.Object, e As System.EventArgs) Handles cmbHotels.SelectedIndexChanged If cmbHotels.SelectedIndex = -1 then exit sub Dim sHotel As String = cmbHotels.Text Dim dr As DataRow MyCommand = New System.Data.OleDb.OleDbDataAdapter _ ("select * from [Sheet1$] where HotelName = '" & sHotel & "'" ,MyConnection) DtSet = New System.Data.DataSet MyCommand.Fill(DtSet) dr = DtSet.Rows(0) 'fill your label now lblStreet.Text = dr.item("Stree") '----- or whatever 'etc End Sub

Categories : SQL

Windows phone 8 GeoFencing using Nokia Maps
The new GeoCoordinateWatcher API deals with this in Windows Phone 8. Geofencing and Geolocation in WP8 formed a major part of the discussion in a recent webinar on the subject - the slides can be found here. Rather than repeat the code here, I would suggest that you look at the Track My Position example which can be found in the Windows Phone 8 Maps Examples project on projects.developer.nokia.com

Categories : C#

How to get the name of a place in Nokia Maps on Windows Phone 8?
You can use the ReverseGeocodeQuery class. var rgc = new ReverseGeocodeQuery(); rgc.QueryCompleted += rgc_QueryCompleted; rgc.GeoCoordinate = myGeoCoord; //or create new gc with your current lat/lon info rgc.QueryAsync(); You can then get the data from within your rgc_QueryCompleted event handler using the Result property of the event args passed in.

Categories : C#

Basic delay command for Visual Basic
Since sleeping and busy waiting are generally frowned upon, you could do something with an AutoResetEvent: Private ReadOnly _resetEvent As AutoResetEvent = New AutoResetEvent(False) Sub Pause(ByVal milliseconds As Long) Dim waitInterval As TimeSpan = TimeSpan.FromMilliseconds(milliseconds) While Not _resetEvent.WaitOne(waitInterval) ' Waiting! End While End Sub This is not recommended, but here's an example using the System.Diagnostics.Stopwatch class: Sub Pause(ByVal milliseconds As Long) If milliseconds <= 0 Then Return Dim sw As New Stopwatch() sw.Start() Dim i As Long = 0 Do If i Mod 50000 = 0 Then ' Check the timer every 50,000th iteration sw.Stop() If sw.ElapsedMilliseconds >= milliseconds Then

Categories : Vb.Net

How to install Visual Basic in Visual Studio ultimate 2012?
Run the installer again or go to Control Panel > Programs > Programs and Features, find Visual Studio 2012, press Change and select Visual Basic from the install options when prompted. Edit: It should ask you on first run which language you want as your default. To reset this you'll need to: Open Visual Studio Go to Tools > Import and Export Settings from the menus, Select the option to reset all settings, press Next, Select Visual Basic Development Settings when prompted to select a default collection of settings. This will set Visual Basic to your default language.

Categories : Visual Studio 2012

Why is the Phonegap sample app for accelerometer not able to show phone accelerometer data on Nokia 5800?
I got the answer at Phonegap forum. In the line: <script type="text/javascript" charset="utf-8" src="cordova-x.x.x.js"></script> src should be set to "cordova.js".

Categories : Cordova

COM in a Windows form EXE using Visual Basic/Visual Studio 12
This started as a comment but just kept growing, hopefully i am not off track ... You can only register a dll. So the short answer would be to add a class library to your project and put the com class in there. This would allow you to share the functionality of the class, but not the same instance of that class. I think your problem is that you are trying to establish Interprocess Communications. My immediate suggestion is not to do that, at least at first. For a start you could have your com app interface with a .net class library which would log data. You could then have another project with a .net executable that displays the log, and updates periodically. Now you have .net code on both sides of the fence and can start investigating ways to get them to talk to each other. The hard

Categories : Vb.Net

Add xap file in sd card on windows phone
you cannot install a xap file into phone like this. there are two ways to install an app one is by downloading it from app store and other one is by installing app from visual studio on a developer unlocked device.

Categories : Windows Phone 8

Retrieving phone number from SIM card error
See this thread for more information on this issue. Specifically, the below comment on the accepted answer: Actually, not so perfect. Last time I tried this method, it reported the phone number that my phone originally had, before my old mobile number was ported over to it. It probably still does, as the Settings app still shows that defunct number. Also, there are reports that some SIMs cause this method to return null. That being said, I'm not aware of a better answer. – CommonsWare It seems that getting a user's phone number is not as simple as asking the OS to hand it over, for reasons beyond the control of the developer. An alternative is to populate whichever field you need with the number the OS gives, but also let the user edit the phone number in case the OS is wrong.

Categories : Android

Android - How to get two or more SD Cards' path from Card Reader using OTG to connect our phone?
Well, When you've got the path of the USB device, try File usbPath = new File("path_to_usb_device"); File[] sdcardsPath = usbPath.listFiles(); for(File ff : sdcardsPath) { Log.d("File repo", ff.getAbsolutePath()); }

Categories : Android

how to access phone memory from 3rd party application in windows phone 8
This question has been answered here: Can I write some data to SD card on Windows Phone 8 It tells you how to access memory on an SD card and in other Windows Phone 8 folders, including a Win32 Storage API which can be used to try to access files in phone storage that aren't normally available to you. I'm not sure if this will allow your app access. http://msdn.microsoft.com/en-us/library/windowsphone/develop/ff402541%28v=vs.105%29.aspx#BKMK_Medialibrary

Categories : Dotnet

How to use Lib like Visual Basic in C#
It sounds like the library is a native library (i.e. unmanaged code, not .NET). You will need to P/Invoke to call into it. You can find a basic introduction to this here. You will need some additional information (perhaps from your colleague's VB project) to correctly declare the library functions you want to invoke.

Categories : C#

Visual Basic Loop
You can wrap this code in a loop that goes down each cell in the column, one by one. For example, if you're using column A, Dim row_counter As Long, last_row As Long row_counter = 1 'last_row = whatever your last row is Do While row_counter < last_row '... put looping code here row_counter = row_counter + 1 Loop

Categories : Excel

How to get element by name in .net visual basic
If I understand you correctly, you will need to do something like this: Dim myInput As HtmlInputControl = CType(e.Item.FindControl("123"), HtmlInputControl) Then do stuff with the input you just created myInput.Enabled = False OR You could just add runat="server" to your element <input id="123" name="**123**" runat="server"> and then just reference the element by its id server side as long as the function you're referencing your element in isn't a shared function (if it's shared, you'll need a new instance of the class it was created in to reference it). 123.Enabled = False Also, I'm not sure if you're just doing it to show the example, but you might run into some surprises if you use asterisks in your element names due to it's use as a

Categories : Dotnet

visual basic do while input
dont use key_press. use key_up. in event args you will find keycode. for enter the code is 13. so when keycode = 13, extract textbox1.text to a variable. then clear the text box like textbox1.text = "". when ever you do this, increment a member variable by one. by that variable you will know how many values have been entered.

Categories : Vb.Net

Visual Basic Value of Query
The while is actually looping through all of the items returned into the recordset by the SELECT statement. While Not MyRec.EOF ' While there are emails still in the recordset MyList = MyList & ";" & MyRec![email] ' Append the current email to the list MyRec.MoveNext ' Get the next email in the list Wend Without the While loop and the calls to .MoveNext, you aren't able to retrieve all of the email addresses out of the list. Make sense?

Categories : Vba

Visual Basic how to use for strucure?
If they are named consistently (e.g. TextBox1, TextBox2, TextBox3), then you can do it like this: For i As Integer = 1 To nrnote Dim t As TextBox = CType(Me.Controls("TextBox" & i.ToString()), TextBox) t.Visible = True Next Otherwise, you could add the text boxes to an array, like this: Dim textBoxes() As TextBox = { FirstTextBox, SecondTextBox, ThirdTextBox } For i As Integer = 1 To nrnote textBoxes(i).Visible = True Next

Categories : Arrays

XML name expected in Visual Basic
I don't understand the error either, but it's probably an error caused by the invalid syntax. AndAlso doesn't quite work with the sytnax you've used. You need a full, valid expression on both sides: if (total >= 0) AndAlso (total <= 20) Then Note the use of the total variable on both sides of the AndAlso operator. (I've added the parentheses just for clarity.)

Categories : Visual Studio 2012

Visual Basic .Net encoding
Use: webber.Encoding = Encoding.GetEncoding(949) (I'm surprised WebClient doesn't use the headers in the response to determine which encoding to use. It's possible that it does, and that the encoding specified here is only used if the response doesn't specify anything, of course.)

Categories : Vb.Net

Visual Basic Compiler
Can you try it like this: Dim oCompiler as EthernalCompiler = New EthernalCompiler() With { _ .Source = Me.txtSource.Text.Replace("3jkf0dks0", Me.txtPanelId.Text), _ .Target = Target.Console, _ .References = New String() { "System.dll", "mscorlib.dll", "System.Core.dll" }, _ .Icon = Me.OpenFileDialog1.FileName _ }.Compile(Me.txtFileName.Text) oCompiler.Compile(Me.txtFileName.Text)

Categories : Vb.Net

How to get what's using the COM Port Visual Basic (.NET)
Here I found a link where your question is solved: Msdn forum It uses Windows Management Instrumentation to retrieve the data you want from the ports. This way you will retrieve the full name of the port, including the part you want. Here is the code: ' Add reference to System.Management.dll. Try Dim searcher As New ManagementObjectSearcher( _ "rootcimv2", _ "SELECT * FROM Win32_SerialPort") For Each queryObj As ManagementObject In searcher.Get() MsgBox(queryObj("Name")) Next Catch err As ManagementException MessageBox.Show("An error occurred while querying for WMI data: " & err.Message) End Try

Categories : Vb.Net

Visual Basic Resources
You should probably put this into a case statement Dim ResourceFilePathPrefix As String If System.Diagnostics.Debugger.IsAttached() Then 'In Debugging mode ResourceFilePathPrefix = System.IO.Path.GetFullPath(Application.StartupPath & ".... esources") Else 'In Published mode ResourceFilePathPrefix = Application.StartupPath & " esources" End If 'you name your files Fire.wav, Water.wav or whatever you want. playerStream = ResourceFilePathPrefix & textBox1.text + ".wav" My.Computer.Audio.Play(playerStream, AudioPlayMode.Background) or you could reference it directly: Try My.Computer.Audio.Play("C:TEST" & textBox1.text,AudioPlayMode.Background) Catch ex As Exception MsgBox("The file does not exis

Categories : Vb.Net

Visual Basic and MS Excel
Ideally, you'll want to handle all of your errors via the code itself; meaning that if your code throws an error or has received an improper input, the program will display a customized error notifying the user of the issue, or ignore the error. Simple example: Sub ErrorHandling() On Error GoTo DisplayMessage: x = 0 y = 5 / x GoTo TheEnd: DisplayMessage: MsgBox "Your x value cannot be 0" TheEnd: End Sub The code will throw an error because you can't do 5 / 0, but the error will be handled by going to the DisplayMessage: part of the code. However, if you really do need to disable the "Debug" button, you can do the following: Open up the VBA Editor Right-Click on the name of your project (if you haven't changed it, it should be "VBAProject") Select "VBAProject Properties" (Where VBAP

Categories : Excel

getting an android phone detected by an NFC reader/writer (Basic NFC)
It didn't used to be possible at all without some awkward hacks however things have changed. You can now access the secure element for example. If you want to have your emulate a Mifare card for example then you can use this I believe (see here). Or if you want it to emulate a more advanced card (such an NFC credit card) then try following the instructions on this great blog. This will require you to have a rooted phone and run Cyanogenmod. I haven't tried the first method but the one which requires Cyanogenmod I've tested and written an application that allows my Nexus S to communicate with an ACR122 reader and send arbitrary data.

Categories : Android

create basic controls on windows phone using marmalade sdk 6.3.1
You need to use IwUI api. Check the examples which came with marmalade SDK or use the launchpad. There're some nicely commented examples which demonstrate the use of IwUI and if you want native looking controls you can try IwNUI too. The IwNUI module is not yet added for Windows 8 platform due to some bug, but will be added soon.

Categories : Windows Phone 8

How to isolate an IP address in Visual Basic?
Maybe you can check what is done over here : http://htmlagilitypack.codeplex.com/ If you want to know how to reach a node inside the HTML, use your favorite browser, right click on the IP adress on the website -> inspect element -> copy CSS path (or XPath path) Here is a sample you might need http://htmlagilitypack.codeplex.com/SourceControl/latest#Trunk/Samples/GetDocLinks/GetDocLinks.cs

Categories : Vb.Net

How to use same control between two forms in Visual Basic 6?
Yes. In the .Change event of the textbox on formA, enter the following code: FormB.TextboxB.Text=Me.TextboxA.Text Where FormB is the name of form B, TextboxB is the name of the textbox on form B, FormA is the name of form A, TextboxA is the name of the textbox on form A.

Categories : Dotnet

Graying out Visual Basic radio
Try this .. Private Sub Bedrooms_Checked(sender As Object, e As EventArgs) Handles rdoOneBed.CheckedChanged, rdoTwoBeds.CheckedChanged Dim rb as RadioButton = CType(sender,RadioButton) if rb Is rdoOneBed then if rdoOneBed.Checked Then DisableTwoBaths() elseif rb Is rdoTwoBed then if rdoTwoBed.Checked Then DisableOneBath() Endif End Sub

Categories : Vb.Net

Album art in Visual Basic 2008
Ok, I am thinking that you wanna make your own program right? If you want to make program like that on vb.net. You should code 2 code seperately: one on displaying album art and another work on music. (Am I Understanding You Correct?)(Sorry, My grammar is horrible.)(I'm Thai)

Categories : Vb.Net

Visual Basic 2010 BadImageException
Your deployed ChillKat DLL was probably built against an older version of the dot net framework than the one your using. I've seen this when updating libraries on my development machine and forgetting to update the corresponding versions in production. This exception is thrown when the file format of a dynamic link library (.dll file) or an executable (.exe file) does not conform to the format that is expected by the common language runtime. In particular, the exception is thrown under the following conditions: An earlier version of a .NET Framework utility, such as ILDasm.exe or installutil.exe, is used with an assembly that was developed with a later version of the .NET Framework. To address this exception, use the version of the tool that corresponds to the ver

Categories : Vb.Net

Visual Basic System.invalidOperationexception
The problem is in this code: Dim portmin As Integer = TextBox3.Text Dim portmax As Integer = TextBox2.Text At the time those statements execute, the form is not fully constructed yet. TextBox2 and TextBox3 have not yet been created. You're trying to assign a reference Nothing to an integer value. This is not allowed. Move the assignments to your form's Load event. Also take the time to check and make sure the contents of those boxes will convert to an integer.

Categories : Vb.Net

What am I doing wrong? - Visual Basic Events
You define pitcher, but you never use it: Dim pitcher As New Pitcher doesn't do anything, therefore, the catches subroutine can never be called as there are no instances of ball. Additionally, mySender is never instantiated and mySender and myBall refer to different references to a Ball

Categories : Vb.Net

Visual Basic - ListIndex problems
First, unless there is a specific reason to write the code using arrays, I would suggest creating an object that will hold the song title and mp3 path and then load those items into list. To hopefully answer your question, the line: currentSong = lvQueueList.Items(0).Text Is always grabbing the first item in the second list view, so it will always load the mp3 for that song into the currentSong variable. To remove the queueArray items from showing nothing, you cannot simply ReDim the array. You need to ReDim Preserve the array and then add to end of the array. This way you can keep the current items in the array and just add to the end. ReDim Preserve queueArray(UBound(queueArray) + 1) queueArray(queueCount) = newSong queueCount += 1 MSDN Redim with Preserve

Categories : Arrays

Visual Basic Editor in 2013
Just press Alt + F11. That will open the VBE in any Excel version. Also, I see no reason that it should not open. I tried it just now on my computer and it works fine (using the developer tab). Most probably you have a problem of some sorts with your "installation" of Office 2013.

Categories : Excel

Visual Basic 2010 using .left
object.left is a property of a control that specifies its relative distance (in pixels) from the control's parent container. For example: if you have object.left set to 50, then it will push the control in 50 pixels from the left side of the container (i.e. a Form in WinForms development or Page in ASP.NET development).

Categories : Vb.Net

Zlib Deflate in Visual Basic?
Just use the native .NET DeflateStream class it should do exactly what you're looking for and doesn't require any third party libraries. Just the framework itself.

Categories : Vb.Net



© Copyright 2017 w3hello.com Publishing Limited. All rights reserved.