|
The grid is populated from the data table.
|
|
|
|
|
Hi all ... plz, i need a help in the tab control ...
How i can switch between the tabes without clicking on the tab header .. ??
The truth that i want to create a button, let us name it BtnNext, when click this button it switches me to the next tab ...
Thnx alot ..
|
|
|
|
|
Try this:
If sstbMyTabs.Tab < allTabsCountUp Then
sstbMyTabs.Tab = sstbMyTabs.Tab + 1
Else
sstbMyTabs.Tab = 0
End If
Cheers,
Pablo.ar
|
|
|
|
|
Hi,
I am trying to create a form with a gradient backcolor with labels on it. I get the gradient back color of the form by overiding the onpaint event of the form. However when I put a label with color.transparant on the form I just get the backcolor of the form, system grey. I found a coulpe of aricles about gradien labels, however then you get the problem that the gradient of the label doesn't match the gradient of the form. Is there a way to get some labels on a form that at least look transparent?
Thanks in Advance
DJ
Think, try, think, think, try, think, think, think, try, ASK, think, try, advance on step and start over...
|
|
|
|
|
You new to create your own custom label which inherits from the .Net Label and allows Transparent Back Colours. Here is the simplest version of such a control.
Public Class CustomLabel : Inherits Label
Public Sub New()
MyBase.New()
Me.SetStyle(ControlStyles.SupportsTransparentBackColor, True)
Me.BackColor = Color.Transparent
End Sub
End Class
Myself, I have a much more complex label I have created that supports TextElipsis, AutoHeight and so on.
If you have knowledge, let others light their candles at it.
Margaret Fuller (1810 - 1850)
|
|
|
|
|
Hi,
Unfortunately this doesn't quite do the trick. With the backcolor being transparent, you get the backcolor of the form. However I am overriding the onpaint event of the form to create a gradient background (see code) Any other suggestions?
Protected Overrides Sub OnPaint(ByVal e As PaintEventArgs)
Dim g As Graphics = Me.CreateGraphics
Dim myBrush As New LinearGradientBrush(ClientRectangle, Color.WhiteSmoke, _
Color.LimeGreen, LinearGradientMode.Horizontal)
g.FillRectangle(myBrush, ClientRectangle)
MyBase.OnPaint(e)
End Sub
thanks
DJ
Think, try, think, think, try, think, think, think, try, ASK, think, try, advance on step and start over...
|
|
|
|
|
Odd...
I have included the entire code of my test form here. When I run it I get the gradient applied uniformly even behind the label.
Imports System.Reflection
Public Class Form1
Inherits System.Windows.Forms.Form
#Region " Windows Form Designer generated code "
Public Sub New()
MyBase.New()
'This call is required by the Windows Form Designer.
InitializeComponent()
'Add any initialization after the InitializeComponent() call
End Sub
'Form overrides dispose to clean up the component list.
Protected Overloads Overrides Sub Dispose(ByVal disposing As Boolean)
If disposing Then
If Not (components Is Nothing) Then
components.Dispose()
End If
End If
MyBase.Dispose(disposing)
End Sub
'Required by the Windows Form Designer
Private components As System.ComponentModel.IContainer
'NOTE: The following procedure is required by the Windows Form Designer
'It can be modified using the Windows Form Designer.
'Do not modify it using the code editor.
Friend WithEvents Label1 As CustomLabel
<System.Diagnostics.DebuggerStepThrough()> Private Sub InitializeComponent()
Me.Label1 = New CustomLabel
Me.SuspendLayout()
'
'Label1
'
Me.Label1.Location = New System.Drawing.Point(136, 128)
Me.Label1.Name = "Label1"
Me.Label1.TabIndex = 0
Me.Label1.Text = "Label1"
'
'Form1
'
Me.AutoScaleBaseSize = New System.Drawing.Size(5, 13)
Me.ClientSize = New System.Drawing.Size(292, 266)
Me.Controls.Add(Me.Label1)
Me.Name = "Form1"
Me.Text = "Form1"
Me.ResumeLayout(False)
End Sub
#End Region
Public Shared Sub main()
Application.EnableVisualStyles()
Application.DoEvents()
Application.Run(New Form1)
End Sub
Protected Overrides Sub OnPaint(ByVal e As System.Windows.Forms.PaintEventArgs)
MyBase.OnPaint(e)
Dim brush As New Drawing2D.LinearGradientBrush(Me.ClientRectangle, Color.Azure, Color.DarkGreen, Drawing2D.LinearGradientMode.BackwardDiagonal)
e.Graphics.FillRectangle(brush, Me.ClientRectangle)
brush.Dispose()
End Sub
End Class
Public Class CustomLabel : Inherits Label
Public Sub New()
MyBase.New()
Me.SetStyle(ControlStyles.SupportsTransparentBackColor, True)
Me.BackColor = Color.Transparent
End Sub
End Class
If you have knowledge, let others light their candles at it.
Margaret Fuller (1810 - 1850)
|
|
|
|
|
Hi,
Now it works. Made a mistake in the onpaint event...
Thanks for the help !!
Cheers DJ
Think, try, think, think, try, think, think, think, try, ASK, think, try, advance on step and start over...
|
|
|
|
|
hi
i need to know how can convert from number to words
thank you
|
|
|
|
|
Hey,
I have a dialog appear while a thread is running.
But on this dialog i want to place a cancel button that cancels the thread when it is clicked.
Is there anyway that VB.Net knows which threads are running in the app so it can kill them?
Thanks for your help, this is really important
Chris
|
|
|
|
|
I need to create one application("New.exe"):
with this event on Form1_Load:
hIr = FindWindow("Ir", vbNullString)
If IsWindow(hIr) = 0 Then
Call Shell("Ir.exe", 1)
Do Until IsWindow(hIr)
hIr = FindWindow("Ir", vbNullString)
DoEvents
Loop
It opens another application("IR.exe"), but I need to press one button of IR.exe, it reads three textboxes and it prints the values in my new application. But in hide mode!! It's possible ??
|
|
|
|
|
If it's hidden, no. This is because in order to receive input, like clicking on buttons, the app, and the target control, has to have the focus. In order to have the focus, the form must be visible.
If the app has shortcut keys (ALT-something) assigned to the buttons, then you can just use SendKeys to send the appropriate keystrokes that do the same thing as clicking the button. If not, it's MUCH more difficult, because now you have to know the coordinates of the button within the form and use the Win32 API function SendInput to send formatted mouse button messages to the target window.
Reading the text boxes will also not be easy. You must get the window handle of the textbox, send it the appropriate window message, I think it's WM_GETTEXT, and a pointer to a data structure that the textbox can write it's information to.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
How can i place Progress bar in status-bar panel and how can i set the text property of status-bar panel in MDI Form from child form and is there any way i can change the form's title bar color.
|
|
|
|
|
nitin_ten wrote:
How can i place Progress bar in status-bar panel
Public Class Form1
Dim progressBar As New ProgressBar
Dim progressPanel As New StatusBarPanel
Dim textPanel As New StatusBarPanel
Public Sub New()
MyBase.New()
InitializeComponent()
Dim statusBar As New StatusBar
statusBar.Parent = Me
statusBar.ShowPanels = True
textPanel.AutoSize = StatusBarPanelAutoSize.Spring
textPanel.Text = "Panel 1 Text"
statusBar.Panels.Add(textPanel)
progressPanel.Width = 120
statusBar.Panels.Add(progressPanel)
progressBar.Value = 50
progressBar.Height = statusBar.Height - 2
progressBar.Width = progressPanel.Width - 6
progressBar.Parent = statusBar
progressBar.Width = progressPanel.Width
progressBar.Location = New Point(textPanel.Width + 2, 2)
End Sub
Protected Overrides Sub OnResize(ByVal e As EventArgs)
MyBase.OnResize(e)
progressBar.Location = New Point(textPanel.Width + 2, 2)
End Sub
End Class
Hope this helps
Tom
|
|
|
|
|
Hi All,
Can U Tell me the Difference between DHTML and Web controls in VB6. I m waiting for your kind consideration. Thanx
|
|
|
|
|
What is DHTML?[^]
Web Controls are custom controls, written in VB6, that generate HTML.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Hi, I have a form in vb.net that use to search value in the database (msaccess) based on the user input. The result is display on the list view. The form that I connect to database is done by code, not by wizard. And I also design a report in crystal report. The result that search by the user will display in the report. My question is: how could I get value in the list view to display in (crystal) report? Or how could I display the value in the list in the simple HTML file?
A thousand mile of journey, begin with the first step.
APO-CEDC
Save Children Norway-Cambodia Office
|
|
|
|
|
I'd like to learn how to build some simple applications. I'm just starting out, I shouold be doing this in classes next year but i'd love a head start. I hear this is all about math, and i'm not the best math student. Please, i have the program on my machine at home already, just help me, please. Thanks in advance.
|
|
|
|
|
Welcome to the coding community, simiyah.
First of all, you need to think about what you want your computer program to do... what task is hard for you to do yourself, and you want your computer to do it for you. For example, would it be fine to have a program that would autmatically solve algebraic phrases, so when you are doing your math homework, you don't have to? (I know you could use software that you already may have for this, but the point is doing it yourself!). Do you want a 'more' customizable notepad? Do you want a tetris where pieces could be moved in all directions (even 'up')? Think! the sky's the limit!
Pablo.ar
PS:It's not 'all' about maths...
|
|
|
|
|
Ok, this is how coding works (for me, at least). Think of coding as making a house... I can't give you an already made house, without the appliances, so you just put in a few appliances and that's it! YOU try to make a house, and when you have a problem fixing a window, or turning on and off a light, or setting up a stair case, I'll help you... but I definitly can't make the whole house for you! I suggest you read a few tutorials from the web, a search on google on that subject wouldn't be bad, but I can offer you the tutorial I made myself, to explain the basic concepts of VB programming, you can find it here[^]
Ok, hope you are moving forward with all this thing.
Pablo.ar
|
|
|
|
|
My boss just got a program. An executable file. He wants me to find a way of securing the executable i.e making sure that the program can not be duplicated and used on another system seamlessly. I suggested using activation keys but the problem I have is that someone can still copy the executable file and use it on another system. He doesn't want that. I know that activation keys can be implemented but I think its from within the program not outside. How do I protect an executable file from outside Need help, ASAP. Urgency is an understatement.
re
|
|
|
|
|
Well, search the web for "developer copy protection". You'll come up with all kinds of products that can do this. But 8) Copy protection is a pipe dream.
NONE of these products and schemes are foolproof. ANY copy protection scheme can be broken. Even the ones that require a little dongle attached to a parallel port. The reason for this is because no matter what, every copy protection scheme comes down to a single if statement that can be found and changed to allow the program to run, even if the protection key no longer exists.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Hi,
I am trying to run Visual C++ stand alone executables in Visual Basic. The Visual C++ executables read in text files and load pictures from the folder in which they are located. When I try the shell command within VB it runs the executable but does not load the text files or the pictures. I also tried using an html link and had the same problem with the files not loading. Help!?
Thanks in advance!
Chris
|
|
|
|
|
AS for your html link
are you using Vb 6?
if so, you can do this
ShellExecute Me.hWnd, "Open", "PAth to File\Doc.html", "", "", 1
put this into a Click event
Help is great only if you ask correctly
|
|
|
|
|
Ho wif i wan to make C# and VB6 send strings of text to each other on a network is this possible...how?
i'm lost plss guide me thanks
|
|
|
|
|