Activity.getAssets().open("resource.bmp");
Also, take a note that assets are read-only.
Activity.getAssets().open("resource.bmp");
protected override void WndProc(ref Message m) { if (m.Msg == WM_NCACTIVATE) { // Use this to make it always look inactive: m.WParam = (IntPtr)0; // Alternately, use this to make it always look active: m.WParam = (IntPtr)1; } base.WndProc(ref m); }
////// We inherit from the VB.NET WindowsFormApplicationBase class, which has the /// single-instance functionality. /// class App : WindowsFormsApplicationBase { public App() { // Make this a single-instance application this.IsSingleInstance = true; this.EnableVisualStyles = true; // There are some other things available in the VB application model, for // instance the shutdown style: this.ShutdownStyle = Microsoft.VisualBasic.ApplicationServices.ShutdownMode.AfterMainFormCloses; // Add StartupNextInstance handler this.StartupNextInstance += new StartupNextInstanceEventHandler(this.SIApp_StartupNextInstance); } static void Main(string[] args) { App myApp = new App(); myApp.Run(args); }
protected override void OnCreateMainForm() { // Create an instance of the main form and set it in the application; // but don't try to run it. this.MainForm = new MainForm(); // We want to pass along the command-line arguments to this first instance // Allocate room in our string array ((MainForm)this.MainForm).Args = new string[this.CommandLineArgs.Count]; // And copy the arguments over to our form this.CommandLineArgs.CopyTo(((MainForm)this.MainForm).Args, 0); }
protected void SIApp_StartupNextInstance(object sender, StartupNextInstanceEventArgs eventArgs) { // Copy the arguments to a string array string[] args = new string[eventArgs.CommandLine.Count]; eventArgs.CommandLine.CopyTo(args, 0); // Create an argument array for the Invoke method object[] parameters = new object[2]; parameters[0] = this.MainForm; parameters[1] = args; // Need to use invoke to b/c this is being called from another thread. this.MainForm.Invoke(new MainForm.ProcessParametersDelegate( ((MainForm)this.MainForm).ProcessParameters), parameters ); }Of course, you need to have proper delegate type in your form declared, and implemented target function for processing parameters:
public delegate void ProcessParametersDelegate(object sender, string[] args); public void ProcessParameters(object sender, string[] args){ /* ... */ }
Best option here is to use proper parser to extract the text from HTML. In the past I've worked with Html Agility Pack, so you could give it a try! I will probably small snippet of code to show you how to use it in the morning!
System.Text.RegularExpressions.Regex regHtml = new System.Text.RegularExpressions.Regex("<[^>]*>");
string s = regHtml.Replace(InputString,"");
Private Class BackupHistory Public BottomText() As String Public LastInserted, CurrentlyVisible As Integer Public Shared Sub Serialize(ByVal history As BackupHistory) '... End Sub End Class