w3hello.com logo
Home PHP C# C++ Android Java Javascript Python IOS SQL HTML Categories
Adding a custom "page" to the Windows 7 control panel. No new application window
What you're seeing here is Windows itself, not some random app. It is there because Microsoft hardcoded a link to this page in a Microsoft product. To be more precise, you see here Explorer.Exe (which contains the control panel) showing settings for the desktop background (which is also Explorer.Exe).

Categories : C#

Cannot use non-localized resource in C# application
This exception tells you that the MyProject.Resources.Lists.resources file was not found. Maybe the path to the file or the filename itself is incorrect. I validated your example by creating a sample app and it works fine. You should replace the @"." with Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location to ensure you are using the right location for your resource file. In the case you are setting Directory.SetCurrentDirectory("D:\"); anywhere inside your application, the @"." would look there for your resources.

Categories : C#

adding Control to form but gap keeps doubling when added at Bottom of previous control
this is more of a hack but it works. sharpUserX.Size = sharpUserSize PnlSharpUsers.Controls.Add(sharpUserX) sharpUserX.Location = pnlAddBtn.Location if i set the size before i add the control, then set the location after it seems to apply the font scaling to the size, but not the location, which works perfectly for me.

Categories : C#

Black lines when adding custom control to a panel with Control's DockStyle set to Top
Finally I found the solution to my problem. I was setting the Comment control's AutoSize property to true. When I set it false, it worked. Thanks @Sayse, your comment gave me hint about it.

Categories : C#

how to restrict child control inside Parent control in Winform application?
if you add the label to the panel dynamically then you must do: this.panel1.Controls.Add(this.button1); if you don't, that the mistake. On top of that, when you move the label, make sure that the new values are inside the range of the panel, using panel1.Location.X panel1.Location.Y and share your code for more help if needed

Categories : C#

Can one Android application control another application via UI Automator?
It is possible to run UiAutomator from an application, you just need to have your Test jar on the device and give your application su permissions. From your application you can then just call: uiautomator runtest Test.jar -c com.package.name.ClassName -e key value And your device will perform whatever your UiAutomatorTestCase would perform. Quick example: Process rt = Runtime.getRuntime().exec("su"); DataOutputStream os = new DataOutputStream(rt.getOutputStream()); os.writeBytes("uiautomator runtest Testing.jar -c com.hey.rich.CalculatorDemo" + " "); os.flush(); os.writeBytes("exit ");

Categories : Android

Adding TabHost control into Linearlayout/Adding layout under the tabhost tabs
Are you not using an XML layout? It's much more efficient and tidy than what you have above... You haven't included any logcat so there isnt much to go on but it seems to me that the issue is your addTabItem tries to make something arbitrary and use it as the content when really you want to be using the frameLayout as the content so try passing that into the method and setting it as the content

Categories : Android

Losing styles when adding a User Control to a User Control
In general it is good practice to keep your styles separate from the markup. This makes maintenance easier and it also saves yourself from searching for the reason one of your elements appears a pixel away from where you are expecting (for example... Similar issues can be exasperating). Do you have the same issue if you set the CssClass attribute for your button(s) and set the styles in a css file for the class?

Categories : C#

Adding scrollbar to an activeX control in MFC
I replaced the CScrollBar and used HWND instead. So my code changed like this: //MainClass.h HWND m_wndHScrollBar; //MainClass.cpp m_wndHScrollBar = (CreateWindowEx( 0, // no extended styles SCROLLBAR, // scroll bar control class (PTSTR) NULL, // no window text WS_CHILD | WS_VISIBLE // window styles | SBS_HORZ, // horizontal scroll bar style left, // horizontal position bottom, // vertical position right, // width of the scroll bar height, // height of the scroll bar m_hWnd,

Categories : Visual Studio

Adding ActiveX control to powerpoint
After two days of searching an answer I found the trick: the problem is that you need a specific string that recognize the ActiveX control. what I did is: open Word and on the developers ribbon record a macro (this option not exists in powerpoint) of mouse clicks add your control (Controls->More Controls->"My control") stop recording macro. view the macro's VBA created (click edit macro) you can find a string like "myControlLib.myControlctrl.1" this is the string needed by the Shapes.AddOLEObject(...) as class name.

Categories : Misc

adding in error control to to .when.then and xdr request
There is no need to use $.when -> $.then as you can use .done() and .fail() callbacks provided by promise promise.done(function (result) { //success callback window[callbackFunction](result); }).fail(function(){ //error callback });

Categories : Javascript

Adding dynamic control with animation
The error appears because GrdLogo instance doesn't know you removed element named Bd from it's visual tree. You need to notify it by calling FrameworkElement.UnregisterName: if (called == true) { GrdLogo.Children.Remove((TextBlock)GrdLogo.FindName("Tb")); GrdLogo.UnregisterName("Tb"); } EDIT Since you cannot use that method in your W8 code (there is no namescope access in WinRT), you should avoid using named elements altogether. Remove your textblock name in xaml and use other means of removing control like: GrdLogo.Children.Remove(GrdLogo.Children.OfType<TextBlock>().Single());

Categories : C#

WPF datagrid: Finding a control when adding a row
The preferred way to work with WPF is called MVVM. This is my take on what you described: <Window x:Class="MiscSamples.MVVMDataGrid" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" Title="MVVMDataGrid" Height="300" Width="300"> <DataGrid ItemsSource="{Binding}" AutoGenerateColumns="False" CanUserAddRows="False"> <DataGrid.Columns> <DataGridTextColumn Binding="{Binding Name}"/> <DataGridTemplateColumn> <DataGridTemplateColumn.CellTemplate> <DataTemplate> <Grid> <Button Command="{Binding CancelCommand}" Conte

Categories : C#

WPF Adding a custom property in a control
You can use the attached properties: public class Extensions { public static readonly DependencyProperty OverWidthProperty = DependencyProperty.RegisterAttached("OverWidth", typeof(double), typeof(Extensions), new PropertyMetadata(default(double))); public static void SetOverWidth(UIElement element, double value) { element.SetValue(OverWidthProperty, value); } public static double GetOverWidth(UIElement element) { return (double)element.GetValue(OverWidthProperty); } } Xaml: xmlns:extensions="clr-namespace:NAMESPACE FOR Extensions class" <Trigger Property="IsMouseOver" Value="true"> <Setter Property="MinWidth" Value="{Binding Path=(extensions:Extensions.OverWidth), RelativeSource={RelativeSource Self}}"/> </Trigg

Categories : C#

Adding the svn:ignore property on files that already are under control
You should use the svn rm --keep-local instead. If you are on Unix, you can test this: find . -name .project -exec sh -c 'svn info "{}"' ; -a -execdir bash -c 'svn -q propset svn:ignore -F <((svn propget svn:ignore; echo .project) | sort -u) .' ; -a -execdir svn delete --keep-local {} ; search .project file and check if it's versioned. retrieve properties and add .project in the local directory. sort -u prevents from duplicates If you want to ask for confirmation, use --okdir instead Note: you could commit only at the end since it's the same operation (i.e. "cleaning properties"). FWIW don't lose hope, svn 1.8 contains inherited Properties (http://subversion.apache.org/docs/release-notes/1.8.html#iprops)

Categories : Java

Adding non-button control to TinyMCE editor 4.x
Inside your tinymce init method: setup : function(ed) { ed.addButton('check', { type:'checkbox', text: 'some descriptive label', }); },

Categories : Javascript

Adding Literals inside an ASP Hyperlink Control
You should be able to do it theBritishFlag .Controls.Add(theBritishFlagText) Update I have tested this and it works. Have you added your hyperlink to page's control ?? HyperLink abc = new HyperLink(); abc.NavigateUrl = "www.someurl.com"; Literal xy = new Literal(); xy.Text = "Click Here"; abc.Controls.Add(xy); //add literal to hyperlink control Image i = new Image(); i.ImageUrl = "http://www.google.co.in/intl/en_ALL/images/logos/images_logo_lg.gif"; abc.Controls.Add(i); //add image this.Controls.Add(abc); //add hyperlink to page control

Categories : Asp Net

Adding control dynamically on Form is different from FlowLayoutPanel
Change the FlowDirection() of your FlowLayoutPanel to TopDown. Edit: Also, get rid of the for loop...what is that supposed to be doing? Maybe something like? using (SqlConnection myDatabaseConnection = new SqlConnection(myConnectionString.ConnectionString)) { myDatabaseConnection.Open(); using (SqlCommand SqlCommand = new SqlCommand("Select LastName from Student", myDatabaseConnection)) using (SqlDataAdapter da = new SqlDataAdapter(SqlCommand)) { int i = 0; SqlDataReader DR1 = SqlCommand.ExecuteReader(); while (DR1.Read()) { i++; UserControl2 userconrol = new UserControl2(); userconrol.Tag = i; userconrol.LastName = (string)DR1["LastNa

Categories : C#

Adding User-Control when clicking a button
protected int countCalendars; protected void Page_Load(object sender, EventArgs e) { if (ViewState["countCalendars"] != null) countCalendars = (int) ViewState["countCalendars"]; // init if (!IsPostBack) countCalendars = 0; // register existing user-controls; won't occur before onclick button // so ViewState["countCalendar"] will be exist. for (int i = 0; i < countCalendars; i++) addCalendar(i); } // onclick button protected void addCalender_Click(object sender, EventArgs e) { addCalendar(countCalendars++); ViewState["countCalendars"] = countCalendars; } // Adding a new User-Control protected void addCalendar(int idNumber) { CalculatorUserControl Calendar = LoadControl("~/CalendarUserControl.ascx") as CalendarUserControl;

Categories : Asp Net

Adding a redirect to a Web Control / HTML Writer
If you use HTML button (I guess < input type='button'>), then you can only interact with them using javascript. You should use window.location = url And build url to contain your id : http://mysite/myPage?Id=12 Then you may pass Id using data attributes. For example : <input type='button' data-id="12"/> then, in JS, if using jquery : var btn = ...get-your-button-by-id-or-class-name-or-whatever var id = btn.data('id'); window.location='http://mysite/myPage?Id='+id;

Categories : C#

Exception when adding control to custom cell
If your code is exactly as above except with UITableViewCell replaced with MvxTableViewCell and you haven't done any binding externally to change this, then there's nothing in MvxTableViewCell that should cause this - from MvxTableViewCell.cs - it's just a simple layer on top of UITableViewCell In my opinion, your best bet is to collect a bit more basic information: is there an inner exception of that TargetInvocationException? If so, where is that inner exception thrown? where is the reflection itself happening here? If you can work that out, then you might have more chance in debugging and solving the problem

Categories : IOS

Adding new user control programmatically in windows forms
You need to add your user control to the display surface of the main form (or another container already present) MainScreen home = new MainScreen(); home.Show(); EntrySuggestion t_ES = new EntrySuggestion(); home.Controls.Add(t_ES);

Categories : C#

Adding a control to to the footer of gridview (asp.net) next to the paging stuff
Yes, you need to check in the Row_Created event for a row of type Pager, like this: private void grdClientServiceType_RowCreated(object sender, System.Web.UI.WebControls.GridViewRowEventArgs e) { if(e.Row.RowType == DataControlRowType.Pager) { // Create your control here, button is an example create whatever you want Button theButton = new Button(); theButton.Text = "Click Me"; // Add new control to the row with the pager via a table cell e.Row.Cells[0].ColumnSpan -= 1; TableCell td = new TableCell(); td.Controls.Add(theButton); e.Row.Cells.Add(td); } }

Categories : C#

Using jQuery to control click events by adding/removing classes
you need jQuery(document).on("click", ".class1", function() { jQuery(this).text('Validate').addClass('class2').removeClass("class1"); }); jQuery(document).on("click", ".class2", function() { jQuery(this).removeClass("class1"); //More stuff here }); Demo: Fiddle

Categories : Javascript

How do you put an ASP.Net MVC 4 application in source control?
This is a great article on using NuGet without adding the packages to source control. The article is for VS 2010, but I am doing the same thing in VS 2012 Using NuGet without adding packages to source control

Categories : Asp Net

How to control an outside executable application?
But I want to have full control of this outside .exe application as it has tabs, radio buttons, push buttons, etc. Is there a way to do so? Yes, multiple ways, depending on the application. Since you're already using COM (although I'm not sure why you're using it just to launch apps)… does the app have a COM automation (IDispatch) interface? If so, there will probably be documentation showing how to use it from VB# (or VBScript or C# or …), which you can easily adapt to Python and win32com. (For an example of such an application, see the Outlook automation docs.) If there's no COM automation interface, there may still be a lower-level COM interface, which is almost as easy to use via win32com, but it usually won't provide any access to the GUI controls; instead, you'll be t

Categories : Python

What is per-application based SMS control?
There are limits and restrictions on how many SMS's can an app send in a given period of time. It is implemented in SmsUsageMonitor (at least in Android 4.x). For example, take a look at SmsUsageMonitor.check(String appName, int smsWaiting): public boolean More ...check(String appName, int smsWaiting) { /* ... */ return isUnderLimit(sentList, smsWaiting); } As you can see, there is a list of SMS's send by an app. isUnderLimit() simply checks if this list is no longer than a limit.

Categories : Android

How to use DateTimePicker control for datetime field in Orchard editor (without adding datetimefieldpart)?
It is not necessary or even possible to add all datetime properties as parts: only one part of a given type can exist on a type. You could do it through fields however. What you need to do in order to reproduce the UI of the date field in your own part is to reproduce the template and script that they use, in your own part templates.

Categories : Asp Net Mvc

Access control lists in Symfony2 using FOSUserBundle - adding roles to a user
Well, since you haven't gotten anything else yet. I'll throw something out there but my experience is only moderate so far. In the controller for your cats owners page, you could query if the user has any associated cat entities. You need to add OneToMany/ManyToOne annotations to your user and cat class, and a variable for the associations. This you could review straight out of the doctrine section of the symfony2 book (If you are working with Symfony2 and haven't taken the time to read the book, that is the minimal level of knowledge to work with the full stack and I suggest you read it all). (Do you really need a entity class just for cat, you could have a pet entity with a "type" option.) check the security context to ensure logged in, then query db. $em = $this->getDoctrine(

Categories : Symfony2

use many application bars in a pivot control
http://msdn.microsoft.com/en-us/library/windowsphone/develop/hh394044%28v=vs.105%29.aspx Why don't you use just one ApplicationBar and add or remove ApplicationBarButtons based on the selected Pivot control? Should be pretty straightforward considering that many apps do it. PS: From personal experience, add your application bar via code in C#...I have faced issues while changing XAML app bars.

Categories : C#

How can I control Excel Add-Ins from a C# Winforms application?
If you want to permanently change settings of an add-in then you would need to Open this file, not attach it as an add-in to the currently running instance of Excel. (This isn't usually done programmatically though.) Perhaps you should clarify because, to me, an add-in is supposed to be "complete". If any settings need to be changed when the add-in is in use, then the add-in itself should make these settings available to the Excel-instance, via exposed properties (or some other technique). But, again, these settings wouldn't be permanently saved (in the add-in itself).

Categories : C#

windows c# application for web browser control
I would check out the MSDN documentation here for the Web Browser Control. It also provides a sample of the source code at the bottom of the page. It should have run on system background and there should be a system tray icon to on/off it functions on browser (or Short cut key). And when it turn on. What you require is a Windows Service, that can be found here.

Categories : C#

Determining the active control within an application
I tried this on a form with a GroupBox containing a couple of controls and it worked as expected (but for production code you should probably add some null-checks in case nothing is selected, or the app doesn't have focus at all): Form activeForm = Form.ActiveForm; Control activeControl = activeForm.ActiveControl; while (activeControl.HasChildren) { activeControl = activeControl .Controls .Cast<Control>() .FirstOrDefault(c => c.Focused); } On the other hand, if you are using a third party docking library (you mentioned a DockPanel, so I am thinking of Weifen Luo's DockPanel Suite, for example), then you will have to use their own properties (e.g. DockPanel.ActiveDocument or DockPanel.ActiveContent) to get the docked form, but the general idea stays t

Categories : C#

Updating any UI’s List Control’s ItemSource via adding to ObservableCollection using MVVM causing Performance Hit
What makes you think that your 'performance hit' as you call it, is caused by the code that you showed us? In my opinion, the majority of time that a WPF application takes to load data is actually taken up by the rendering engine. If you use a Stopwatch to measure the amount of time that it takes for your for loops to complete, I'm fairly sure that it won't be long at all... probably not even a quarter of a second for 50,000 objects or more: Stopwatch stopwatch = new Stopwatch(); stopwatch.Start(); foreach (var item in items) { this.Items.Add(item); } stopwatch.Stop(); TimeSpan elapsedTime = stopwatch.Elapsed; // I'm guessing this will not be a long time

Categories : Wpf

How to subscribe to .NET control events from an external .NET application?
As per the comment discussion, to meet the requirements of your question, your best bet would probably be the NativeWindow solution. However, I would still recommend that you speak with your colleagues to see if there's another alternative that might make things easier on your part. If you create solutions for your customers based on solutions provided by your colleagues, there is a strong potential that you will have to rewrite your customized solutions as often as your colleagues deploy their latest updates... http://msdn.microsoft.com/en-us/library/system.windows.forms.nativewindow.aspx using System; using System.Drawing; using System.Windows.Forms; using System.Runtime.InteropServices; namespace NativeWindowApplication { // Summary description for Form1. [System.Security.

Categories : C#

Deploy a WPF user control in a Silverlight application
No, it is not possible to show a WPF control in Silverlight. They use two different runtimes so are not directly substitutable with each other. You have a few options though: use XBAP to show WPF within the browser rewrite your control so that you can compile a version for Silverlight or WPF (this is (was) quite a common way to do it) Edit: in response to your comment you seem to have some misunderstandings, I think you haven't understood the links I gave you. You may also have misunderstood what Silverlight is - just in case you have let me mention that Silverlight runs as a plugin within the web page, it isn't directly part of the HTML structure. For the XBAP approach the WPF control/page is hosted inside a web page - just like a Silverlight control is. However you don't have

Categories : C#

Android control 3rd party application using voice
If you want to give keyboard inputs to apps that aren't your own, the only way is to build your own alternative keyboard. After this, the user will have to select your keyboard as his keyboard of choice so that it shows up whenever textboxes receive focus. You can even listen for voice inputs and parse them to do what you need. These links might help: Keyboard: How to make a Android custom keyboard? Create Custom Keyboard in Android creating custom android keyboard layout Voice input: http://android-developers.blogspot.in/2010/03/speech-input-api-for-android.html Is there a way to use the SpeechRecognizer API directly for speech input?

Categories : Android

How do I allow the Leap Motion to control my cursor in an OS X application?
If this is a Mac only game you should have access to the Quartz event api. This is the easiest way to generate mouse events in OS X... I would recommend simply tracking the palm (hand) position, and moving the cursor based on that. This is how I do my palm tracking: float handX = ([[hand palmPosition] x]); float handY = (-[[hand palmPosition] y] + 150); The "+ 150" is the number of millimetres above the Leap device, to use as the '0' location. From there you can move the cursor based on the hand offset from 0. The function I use to move the cursor (using Quartz): - (void)mouseEventWithType:(CGEventType)type loc:(CGPoint)loc deltaX:(float)dX deltaY:(float)dY { CGEventRef theEvent = CGEventCreateMouseEvent(NULL, type, loc, kCGMouseButtonLeft); CGEventSetIntegerValueField(theEvent,

Categories : Osx

Can I use the ASP.NET AJAX Control Toolkit in my MVC4 Application?
The documentation for the toolkit states specifically that it is for web forms, not mvc. http://ajaxcontroltoolkit.codeplex.com/ If there is a specific piece of functionality you required, then you might want to see if there is a plugin available for jquery to replicate it. http://api.jquery.com

Categories : Asp Net Mvc

Missing functionality of added Control in another application
Whilst it is technically possible to do what you want, it is excruciatingly difficult. Raymond Chen wrote about this at some length. The executive summary: Is it technically legal to have a parent/child or owner/owned relationship between windows from different processes? Yes, it is technically legal. It is also technically legal to juggle chainsaws. So, you are attempting something with difficulty akin to juggling chainsaws. Unless you have a deep understanding of Win32 you've got no chance of succeeding. So, if you want to modify the GUI of an existing process, and it's not tractable to do so with code in a different process, what can you do? Well, it follows that you need to execute code inside the target process. That's easy enough to do with DLL injection. Inject a DLL into

Categories : Delphi



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