[2005] Form Gradient From Module
Feb 14, 2009
I am trying to setup a public sub that allows me to customize the look of all forms when they load up. Only thing is, I am now trying to gradient a form and I am getting an error message as follows:
Quote: bounds is not a member of system.windows.form.painteventargs
The next post is my module code and this is how I am calling it
vb
Private Sub frmChangePassword_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
'add some text to the title bar
[Code]......
View 1 Replies
ADVERTISEMENT
Jul 4, 2009
How to add Module to Form in VB 2005?
View 2 Replies
Apr 25, 2009
I'm at a complete loss here, its probably me being stupid and missing something simple but i don't appear to be able to update a testbox (CreditInfo) on Form1 from a module (SerialData). It doesn't give any errors, it just doesn't work. If i put a Button on Form1 to update the testbox(CreditInfo) it works... however i need it to be automatic.. Dave
[Code]...
View 12 Replies
Jun 18, 2009
I have this code for a gradient form(EXAMPLE 1). It works fine on its own.I tried putting it into an existing project of mine and I cannot get it to work. The project is quite large so I am no sure what the issue is. Is it due to the fact that I have an InitializeComponent() line in the my Sub New in Example 2? Note I have alot of code
EXAMPLE 1:
Public Class Form1
Private Sub Form1_Paint(ByVal sender As Object, ByVal e As System.Windows.Forms.PaintEventArgs) Handles Me.Paint
'Creating a new Rectangle as similar width and height of the base form
[code]....
View 8 Replies
Oct 29, 2009
I have this code for a gradient form(EXAMPLE 1). It works fine on its own. I tried putting it into an existing project of mine and I cannot get it to work. The project is quite large so I am no sure what the issue is. Is it due to the fact that I have anInitializeComponent() line in the my Sub New in Example 2? Note I have alot of code
View 1 Replies
Jan 1, 2009
I am using Visual Basic.NET 2008. I was earlier a VB 6 developer. I found a (VB 6) code online which generates gradient colours on a form. It has a small sub (routine) which does the trick. If we pass red, green and blue values then form's backcolour changes and it appears like a gradient.Now that code is not working in VB.NET.i mean is there an easier way to generate gradient colours in VB.NET (2008)convert the code I have into .net specific so form's backcolour becomes gradient.I have attached a zip file which contains the code.
View 11 Replies
Jan 5, 2009
How can I change a form's backcolor to gradient one. The code (VB.Net) -
e.Graphics.FillRectangle(New Drawing.Drawing2D.LinearGradientBrush(New PointF(Me.Width, 0),
New PointF(Me.Width, Me.Height), Color.FromArgb(0, 58, 140),
Color.FromArgb(0, 215, 255)), New RectangleF(0, 0, Me.Width, Me.Height))
'fade from left to right
This code changes the form's background to a gradient one. It works fine. Now I want this to take place in an MDI form which will be a container for other forms. If I turn option IsContainer = False then it works but otherwise it does now. How can I change backcolor of MDI Form to a gradient one ?
View 4 Replies
Aug 11, 2009
I have a form which I am adding a gradient to. However on this form I have aTableLayoutPanel (with controls) with the dock set to Fill. When it fills it covers up the form and the gradient on the form. Is it possible to make the TableLayout Panel and its controls colour clear or can you pass the same gradient color from the form to all the controls in the TableLAyout Panel (including the TableLAyoutPanel).
View 8 Replies
Feb 5, 2009
I am using a MDI form and child forms. Now I don't like the standard back colour of mdi form so I got code on the net which paints a gradient colour to the mdi. So far it is working okay.Now the problem is when I load a child form or close it or do a similar activity then it causes flicker in the mdi background. This gets pretty annoying at times and you see the background flicker.
View 2 Replies
Aug 11, 2009
I have gradient on a form set as follows in Example 1 below. I also have a custom panel which has its colour set as in Example 2. I want to get the same colour from Example 2 into Example 1. However I am not sure how to do this within example 1.
[Code]...
View 7 Replies
Jun 24, 2010
I have recently moved from developing in vb.NET 2008 to vb.NET 2010. There is a form in the application that uses an old Ascend Gradient Caption control to visually separate sections of the form. These controls are located on a tab control. The problem isthat the gradient captions seem to be unstable. They appear in odd locations on the tab pages at runtime, and I can't seem to select them in the designer. I can choose them from the combo box on the property page and edit the properties, but they stillbehave erratically. I understand that these are older controls and was wondering if anyone has had this problem and/or could recommend an alternative control
View 1 Replies
Jun 21, 2010
I'm constructing a Management system. Now, I have a problem with the interface design.
I wish to use ForumsAccount's tab control and JuggaloBrotha's gradient form in my application (both can be found in CodeBank).
But the problem is, I'm confused in the design ! Which one shall I use for the main form ? an MDI form or a normal form ?
Details about the Mgmt. System app: it will be used to manipulate everything for a small firm, like adding customers, employees, payments, etc.. Everything is managed using the app and saved to the db.
View 11 Replies
Aug 16, 2009
I am trying to figure out how to print from a module. I am trying to print some data from a database. I just want to pass the record id to a sub in the module, and have it print.
View 3 Replies
Apr 10, 2009
I have just one form which is my project however there is a lot of different code behind it, can I add a class or module to it as another resource and call a script from there like I would in say
Private Sub button1_Click ... Handles Button1.Click
Call MyScriptToWorkThingsOutAndGetRemoteXMLWebPage
End Sub
View 1 Replies
Jun 27, 2010
with vb.net05 + access03 .mde file is it possible to create a module ( function ) in side a password protected access .mde file from ado.net?
View 2 Replies
Dec 8, 2009
I have a number of usercontrols that have the same combo boxes on which need to be built each time the form is opened. Instead of putting the code on each form, I have written a generic module which builds the combo box. At the moment, when the uc is loaded, a global variabl is set to the uc's name and the code for combo box in the module looks like this (it's not the complete module, just a snippet of the problem area):
[Code]...
View 5 Replies
Jun 4, 2010
How can you save a user input string to a resource? I want the user name that the user enters to be saved to a resource so that another form can use it. Or if using a module would work better, how would I do that?
View 3 Replies
Apr 4, 2009
How can i change the color or put a gradient color of their top of Form?
I'll try to change it a Formstyle to None and put a image on it....
But i want to know what the other ways to change the color of Top Form....?
View 6 Replies
Oct 5, 2010
I'm trying to figure out the best way to reference a control on a form from within a module. Unfortunately the form is just an instance, so it's not as easy as calling form.control...
Dim ChildForm As New frmSearch
' Make it a child of this MDI form before showing it. '
ChildForm.MdiParent = Me
ChildForm.Show()
That form has an option for printing, which calls another form where certain options are chosen. The print form in turn calls a function in a module, which tries to reference back to the origional form.
childform as new frmSearch -> frmPrintForm -> sub okToPrint (in module Print)
okToPrint tries to reference a listview on frmSearch, but can't find it.
For Each itmX In frmSearch.lstResults.Items
So the solutions I can think of off the top of my head are:
1. Somehow divine which form is the caller of frmPrintForm
2. Pass ChildForm to the frmPrintForm as a variable to be passed on to module Print..
3. Use frmSearch directly instead of using an instance of it.
Number 1 would be my preference, as I don't want to have to pass forms around like that.
View 4 Replies
Aug 7, 2009
This is my vb6 programme for creating recordset in a module. and call it in class
and form
[Code]...
View 4 Replies
Jun 30, 2009
if it is possible to place the openfileDialog in public class or module? i tried to place it with this code, but it did not work.
Public Sub DisplayDataOnGrid(ByVal gridTable As DataGridView)
Dim filepath As String
Dim OpenExcelFile As New OpenFileDialog()
[Code]....
View 2 Replies
Jun 18, 2012
I have a connection module in which I have written the open and close database connection.... if database connection is an error it will return false else if success it will return true the function of the modules will be called from the form code....
what I need is if the connection is an error the module should also get the form name which returned the error...is it possible???
check my below code....
DBConnection.module
Imports System.Data.SqlClient
Module DBConnection
[Code].....
now what I need is if the functions Open_DB_Connection() or Close_DB_Connection() returns error it should prompt the form name....
View 4 Replies
Jun 20, 2012
I recently have convert my project from VB6 to VB.NET2008,after the convert here is a sub that control form from a module that i create,the error was something like
"cmdAdd is not a member of System.Windows.Forms.Form"
Public Sub ButtonSet(ByRef frmObj As System.Windows.Forms.Form)
frmObj.cmdAdd.Visible = True
frmObj.cmdCopy.Visible = True
frmObj.cmdEdit.Visible = True
[Code]...
View 1 Replies
Jul 14, 2009
How can I edit my a form through a module? I am using this code in the module.
Here is where I get an error: Private Sub ExtendedWebBrowser_NewWindowExtended(ByVal sender As Object, ByVal e As WebBrowserNewWindowExtendedEventArgs) Handles Me.NewWindowExtended Button1.Text = "New window event just triggered!"End Sub
The code editor will not recognize when I type Form1, and I obtain the following error when I manually type it:form1' is not declared.I sense there is something I can do here which is very easy to fix this, but I have not worked much with Classes before.
View 2 Replies
Jul 22, 2011
he form has a listview control. The form call a function stored in a module VB file. In the function, I will do something. I want to add a monitor in the function. When finish somethings, the function will add some message to the
View 1 Replies
Nov 21, 2010
I am writing a program in VB2010 Express that handles serial port communication. All subs and functions that handle writing to, and reading from the serial port are in a module. These subs and functions are typically called from a form, e.g. by pressing a button. The command is then sent to a device attached to the serial port, and this device replies with a number of bytes as a result. A 'ReceivedDataHandler' is used to handle the serialport.datareceived event. [code]....
View 6 Replies
Dec 14, 2011
I have a form. The form has a listview control. The form call a function stored in a module VB file. In the function, I will do something. I want to add a monitor in the function. When finish somethings, the function will add some message to the listview. I add the form.refresh event at the after listview add item coding. But, it doesn't work.
View 6 Replies
Sep 17, 2009
Just want to ask something, how can i show form in my Module?
View 2 Replies
Apr 23, 2011
How do I do something like this.[code]...
This is inside the Module separate from Form1 class as you can see right off the bat it's not a class and there is no reference to Form1.. how do I access Form1 without passing reference to make factory modules work like this.
View 1 Replies
Jun 20, 2011
i've created a Sub in a Form.
I've created another Sub in a module.
I call the Sub in the module from the form, passing the form into the Sub defined in the module.
Then i add an Handler to an istance of a control (for example mousemove) and i want to give to this handler the execution of the Sub defined in the form.
Example.
Class form1
Sub Form1Sub()
ModuleSub(me)
[Code]....
The problem is that i don't know hot to call the Sub defined in the form, in the Sub handler using the istance of the form passed in the Sub paramenter in the module...
View 7 Replies