Posts

Showing posts from May, 2017

DISPLAY DIFFERENT LAYOUTS USING FRAGMENT IN A ANDROID STUDIO APP

Image
Android Studio makes App development so easy with supported libraries and classes. Today we are discussing how to show different layout within the main fragment. ( A layout is GUI Windows in Android Studio, where we can place controls and widgets) How ? Basically, this can be done by placing a frame layout inside the main fragment layout and place the different layouts. Create the Drawer Activity App Android Studio Version:  1.3 Android Version: 22 Begin a New Android Project with  Navigation Drawer Activity . Go to Layout folder of the project and access   fragment_main.xml   and add a FrameLayout at the end of the Relative Layout tag, replace the TextView, if exist. < FrameLayout android :id= "@+id/FrameContainer" android :layout_width= "match_parent" android :layout_height= "match_parent" ></ FrameLayout > Note that we assigned an id for the FrameLayout, which can be accessible using the id. You can also customize

How to get Computer Name using VB6 Code

Accessing system property is pretty easy with VB6 code. This can be useful when programmers need to refer the system name in the code. Steps Declare the GetComputerNameA function which resides in the kernel32 library. Create a function to fetch the Computer Name. Use the function The Kernel functions Declare Function GetComputerNameA Lib "kernel32" (ByVal lpBuffer As String, nSize As Long) As Long Get the computer name Define a new function to do the rest of the task. So you can reuse the code. Public Function GetComputerName() As String Dim sResult As String * 255 GetComputerNameA sResult, 255 GetComputerName = Left$(sResult, InStr(sResult, Chr$(0)) - 1) End Function Calling the function Just invoke the function and place values to a TextBox Text1.Text = GetComputerName