I made a tool strip menu item in one form and I want it to 'click' a button in another form automatically.
This is the code of the tool strip menu item in
Private Sub PasteTabToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles PasteTabToolStripMenuItem.Click
MDIParent1.Button1 'Don't know what to put here
End Sub
I am trying to use the Web Browser control in my vb .net user control. I am using VS 2008. Finally, I will be calling my assembly (.dll) from a web page. I wanted to display the usercontrol with the web browser control inside this web page. The problem is I cannot proceed since the Web browser control cannot be called from a partially trusted assembly. Using VS 2008 I have created a strong name for my class, also added the <Assembly: AllowPartiallyTrustedCallers()> to the AssemblyInfo. But still the web browser control cannot be seen in my web page. Do you how I can make my assembly fully trusted so that it can access web browser control? If you have used web browser control, can you confirm if this step is really required?!
I am wondering if anyone has any idea how to make the controls stack and fill up the available space left by a control if the control is hidden or removed from the UltraGridBagLayoutPanel.
If I hide [Textbox 3] as of now, it will disperse the space left equally and pad the remaining text boxes with the space. However, I would like it to do this...
[Textbox 1] [Textbox 2] [Textbox 4] [Textbox 5]
Where all the text boxes will move up and [Textbox 4] will completely consume the space left by [Textbox 3].
I'm trying to make a label control transparent over a Panel control.However by setting the background colour of the label to Transparent, it actually sees right through to the form itself, not the panel as intended.
As an example we use a panel with a background as white, we make the label transparent, however it gets the form�s colour as blue.However, we are using a custom panel control and need the label to be transparent over the panel and not see the forms background.
1) How can I make the text in RTB control to change without clicking on it (RTB control) again? I notice that the event handler is mousedown so its only occurs whenever the users clicks on the controls. But I really have no idea how to do that. Anyone can guide me how to do that???
2) How to make the RTB's Back Color to transparent??? Cause it is not supported. Or is it I use the wrong control???
I'm trying to make a label control transparent over a Panel control. However by setting the background colour of the label to Transparent, it actually sees right through to the form itself, not the panel as intended.
As an example we use a panel with a background as white, we make the label transparent, however it gets the forms colour as blue. However, we are using a custom panel control and need the label to be transparent over the panel and not see the forms background. Is this possible?
I'm trying to make a label control transparent over a Panel control. However by setting the background colour of the label to Transparent, it actually sees right through to the form itself, not the panel as intended.
As an example we use a panel with a background as white, we make the label transparent, however it gets the forms colour as blue. However, we are using a custom panel control and need the label to be transparent over the panel and not see the forms background.
ive two custom controls, which are used to draw and edit etc...(like paint but customized....) i want to save their images with a single click....So im using the Getimageofcontrol function to do it....its code is below:::
Public Function GetImageOfControl(ByVal c As Control) As Image Dim rc As New Rectangle(c.PointToScreen(c.Location), c.Size) Dim i As Image = New Bitmap(rc.Width, rc.Height)[code].....
and the code to call this function for saving the images is simply.. ...
Here's my situation: I have a control with motion graphics (for the sake of simplicity, a 'video player' control) in my project. Think of a PictureBox with constantly-changing images. In front of this will sit a second control (such as a second PictureBox of the same dimensions). The topmost PictureBox will be drawn to in its Paint event.
I need to draw very few elements, and the bottom control is updated much more frequently than I need for this drawing. So these elements are drawn to the topmost control. Think of a news broadcast, where they have live video in the background, with a news channel logo, news ticker, and sometimes gradient visible in front.
I'm trying to create that 'foreground' control, and the closest I believe I have gotten so far is the following:
The 'Opacity' property in the code above is a sort of "scaling factor." The image drawn to the top control may, in different parts of the image, have any alpha value from full transparent to a full 255. This 'Opacity' property is applied to the entire image being drawn, scaling the alpha values of each pixel.
I am trying to make a listview custom control based on the standard listview control that will allow me to drag a column header outside the standard listview control and drop it on a panel. I plan to use the drop event to determine which column I should group by view on.
I have created a couple of simple functions in VB.NET that simply return a control of a certain type that I already know, such as HtmlInputHidden, Label, etc. That means that each of the functions is created only for that special purpose. What I'd like to do is combine all those functions into one function using generics. The common things shared by each of the functions is a control Id and a control type.What I have got so far is:
Public Function GetControl(Of T)(ByVal ctrlId As String) As T Dim ctrl As Control = Me.FindControl(ctrlId) If (Not ctrl Is Nothing) Then
[code]....
But the line " GetControl = CType(ctrl, T)" is giving me a compile error:
Value of type 'System.Web.UI.Control' cannot be converted to 'T'
This is my first month for migrating from vb6 to vb.net.
i've simple code here :
this main form .:
Public Class Form1 Private Sub LinkLabel1_LinkClicked(ByVal sender As System.Object, ByVal e As System.Windows.Forms.LinkLabelLinkClickedEventArgs) Handles LinkLabel1.LinkClicked
For example we generally apply threading to make application faster and unnecessary timetaking not related to UI things can go in secondary threads.Now If I have a user control
This control contains a public function LoadControl() Function is called from the form which is using the user control In side function
i am designing an application in which contents of an excel file are displayed in the ListBox. i have created a class which contains methods for doing this. Statement used for function call is:
If you enter 11 for instance into the year component of the date then tab off the control the text returned to the validation function is the text before the year was entered rather than the new text.The problem can be overcome by making the control invisible then visible. This has been the case since Visual Studio 2003, it would seem to be a bug.
Function GetHtml(ByVal URLString As String, ByVal web As WebBrowser) As String Dim NewString As String web.Navigate(URLString) NewString = web.Document.Body.InnerHtml Return NewString End Function
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
how to use the timer to control the blinking? Cuz i tried to stop one timer, it did stop this timer but if i didnt stop the timer 1, both timer 1 and timer 2 will begin although the data is in different entity. By right if the alarm comes in from block 2, only block 2 button will blink, like wise if the alarm comes in from block 1, only block 1 button will blink
Possible Duplicate: User control javascript I defined a JavaScript function inside a user control.If I have multiple instances of the user control on my .aspx page, how do I prevent multiple function definitions in the resulting HTML code?
I am trying to pass a control's id to a javascript function that adds the value of it (the control which is a textbox) to a listbox but apparently I am not getting it right.
<input type="button" ID="btnAddtoLstBox" value="" title="Add this to the list" onclick="javascript:addToList(document.getElementById(btnAddtoLstBox));" class="ui-icon ui-icon-refresh ui-corner-all" style="width: 20px; height: 20px; background-position: -64px 80px" /> [Code] .....
I have successfully set up a timer in visual basic, see the code below. My timer uses case statements and at specific case/time it calls a function, 'ShuttleA'. 'ShuttleA' function, is a function that 'getskeystate', which inturn from the user interface tallies a response in a text box. My problem is that the program runs fine when calling the function at eg; at 10 seconds, case 10. But I want to be able to call the function e.g., at 8 seconds to 11 seconds. Or create a tolerance of e.g., 1 second either side of e.g., 10.
PrivateSub Timer1_Tick(ByVal sender As System.Object,ByVal eAs System.EventArgs)Handles Timer1.Tick Dim secondsAsInteger seconds += 1 Label1.Text = seconds SelectCase seconds [Code] .....
I'm trying to use a menustrip to control the 'bookmarks' function of my webbrowser.
The idea being, when the user opens form2 to add a new bookmark, he enters the url and name they want associated with the bookmark and then when they click the "save" button, it will add a new toolmenustripitem to the menustrip in form1, that, when clicked, will take the webbrowser in the currently selected tab to the url they specified in form2 the adding of the toolstripmenuitem was simple under the save_click event:
Code: Dim bookmrk As New ToolStripMenuItem bookmrk.Text = TextBox1.Text bookmrk.Name = "bkmrk"
I am developing an application that inserts text into another application. No problems at all finding handles and using SendMessage to insert text into their standard edit boxes/combo boxes/etc.My problem is that when I attempt to insert text into what appears to be a masked
text box
(e.g. a date into a box with the format __/__/____), it does so...but the application does not recognize it as valid data.How to I format my string/SendMessage to match the mask in the text box?
I have a relatively simple question regarding the best way to call the DataGridView.Rows.Add function when it is inherited into the current control. Which is the best way to make the call to the inherited control? Call it directly in the invoke or call it using recursive-like function? They both seem to produce the same result, a row gets added and the quantity is returned, but which is the most efficient?The delegate: Private Delegate Function ReturnDelegate() As Object
The two ways are:
A) Private Overloads Function AddRow() As Integer If InvokeRequired Then Return CInt(Invoke(New ReturnDelegate(AddressOf AddRow)))
Easter day is determined based on astronomical events. Is there a "date" function or something similar that can be used in Visual Basic programming to project such a day?
I'm writing a VB.NET app that will control a commercial backup product. One of the things I need to do is loop through all existing jobs and look at the source drive. I am able to do this in VBScript very simply like this:
[Code]...
However nothing I try in VB.NET works. I'm pretty sure it has to do with the fact that the com functions are returning variant data types and arrays (specifically GetVolumes). I have tried using string arrays, object arrays, and even wrapping the return value in a VariantWrapper and I always get errors such as "not implemented" or "the parameter is incorrect." If anyone is bored and wants to write some code I'll gladly give it a shot and report back.
Updating the TextBox from a Thread that calls a function within a Class does not work. I'm trying to get this to work in a DLL (but I tried without as well). The DLL is accepting an Object as an argument[code]....