Click here to Skip to main content
15,888,283 members
Home / Discussions / Visual Basic
   

Visual Basic

 
QuestionVista\Win7 - Is it possible to shell and specify an account to run the process under? Pin
Jon_Boy9-Aug-11 3:11
Jon_Boy9-Aug-11 3:11 
AnswerRe: Vista\Win7 - Is it possible to shell and specify an account to run the process under? Pin
Shameel9-Aug-11 4:44
professionalShameel9-Aug-11 4:44 
GeneralRe: Vista\Win7 - Is it possible to shell and specify an account to run the process under? Pin
Jon_Boy10-Aug-11 6:42
Jon_Boy10-Aug-11 6:42 
GeneralRe: Vista\Win7 - Is it possible to shell and specify an account to run the process under? Pin
MicroVirus10-Aug-11 7:58
MicroVirus10-Aug-11 7:58 
QuestionComboBox DisplayMember and ValueMember without database Pin
ivo755-Aug-11 7:13
ivo755-Aug-11 7:13 
AnswerRe: ComboBox DisplayMember and ValueMember without database Pin
ivo755-Aug-11 8:09
ivo755-Aug-11 8:09 
AnswerRe: ComboBox DisplayMember and ValueMember without database Pin
Luc Pattyn5-Aug-11 9:53
sitebuilderLuc Pattyn5-Aug-11 9:53 
GeneralRe: ComboBox DisplayMember and ValueMember without database Pin
ivo755-Aug-11 11:38
ivo755-Aug-11 11:38 
This work for me thanks

VB
Public Class WatermarColors
    Private mWatermarkColor As iTextSharp.text.BaseColor
    Private mWatermarkBGName As String

    Public Sub New(ByVal name As String, ByVal code As iTextSharp.text.BaseColor)

        mWatermarkBGName = name
        mWatermarkColor = code
    End Sub

    Public Property WatermarkBGNames() As String
        Get
            Return mWatermarkBGName
        End Get
        Set(ByVal value As String)
            mWatermarkBGName = value
        End Set
    End Property

    Public Property WatermarkColors() As iTextSharp.text.BaseColor
        Get
            Return mWatermarkColor
        End Get
        Set(ByVal value As iTextSharp.text.BaseColor)
            mWatermarkColor = value
        End Set
    End Property

    Public Overrides Function ToString() As String

        Return mWatermarkBGName
    End Function
End Class



color1 = New BaseColor() {iTextSharp.text.BaseColor.BLACK, iTextSharp.text.BaseColor.BLUE, iTextSharp.text.BaseColor.CYAN, iTextSharp.text.BaseColor.DARK_GRAY, iTextSharp.text.BaseColor.GRAY, iTextSharp.text.BaseColor.GREEN, iTextSharp.text.BaseColor.LIGHT_GRAY, iTextSharp.text.BaseColor.MAGENTA, iTextSharp.text.BaseColor.ORANGE, iTextSharp.text.BaseColor.PINK, iTextSharp.text.BaseColor.RED, iTextSharp.text.BaseColor.WHITE, iTextSharp.text.BaseColor.YELLOW}
        color2 = New String() {"Черен", "Син", "Циан", "Тъмно сиво", "Сиво", "Зелено", "Светло сиво", "Магента", "Оранжево", "Розово", "Червено", "Бяло", "Жълто"}
        For i = 0 To color1.Length - 1
            CboWatermarkColor.Items.Add(New WatermarColors(color2(i), color1(i)))
        Next

Private Sub Button9_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button9.Click
        If File.Exists(TextBox1.Text) Then
            File.Delete(TextBox1.Text)
            Dim bf As BaseFont = BaseFont.CreateFont(k & "\\arial.ttf", BaseFont.IDENTITY_H, BaseFont.EMBEDDED)
            Dim bc As BaseColor
            Dim WatermarkSelectColor As WatermarColors

            WatermarkSelectColor = CType(CboWatermarkColor.SelectedItem, WatermarColors)

            bc = WatermarkSelectColor.WatermarkColors
            
            AddWatermarkText(TextBox3.Text, TextBox1.Text, TextBox2.Text, bf, NumericUpDown1.Value, bc, 50.0F, NumericUpDown2.Value)
        Else
            Dim bf As BaseFont = BaseFont.CreateFont(k & "\\arial.ttf", BaseFont.IDENTITY_H, BaseFont.EMBEDDED)
            Dim bc As BaseColor
            bc = color1(CboWatermarkColor.SelectedIndex)
            
            AddWatermarkText(TextBox3.Text, TextBox1.Text, TextBox2.Text, bf, NumericUpDown1.Value, bc, 50.0F, NumericUpDown2.Value)

        End If

GeneralRe: ComboBox DisplayMember and ValueMember without database Pin
Andy_L_J5-Aug-11 17:37
Andy_L_J5-Aug-11 17:37 
QuestionReleasing a VB application for use in a Win PE Pin
Slingshot II5-Aug-11 4:00
Slingshot II5-Aug-11 4:00 
AnswerRe: Releasing a VB application for use in a Win PE Pin
Shameel5-Aug-11 4:19
professionalShameel5-Aug-11 4:19 
AnswerRe: Releasing a VB application for use in a Win PE Pin
Eddy Vluggen5-Aug-11 6:16
professionalEddy Vluggen5-Aug-11 6:16 
GeneralRe: Releasing a VB application for use in a Win PE Pin
Slingshot II10-Aug-11 4:10
Slingshot II10-Aug-11 4:10 
GeneralRe: Releasing a VB application for use in a Win PE Pin
Eddy Vluggen10-Aug-11 10:48
professionalEddy Vluggen10-Aug-11 10:48 
QuestionPlease look at this discussion Pin
User 76894774-Aug-11 20:22
User 76894774-Aug-11 20:22 
AnswerRe: Please look at this discussion Pin
Andy_L_J4-Aug-11 20:54
Andy_L_J4-Aug-11 20:54 
AnswerRe: Please look at this discussion Pin
Dalek Dave23-Aug-11 11:26
professionalDalek Dave23-Aug-11 11:26 
QuestionDouble Firing Event Pin
eddieangel4-Aug-11 13:10
eddieangel4-Aug-11 13:10 
AnswerRe: Double Firing Event Pin
Dave Kreskowiak4-Aug-11 13:56
mveDave Kreskowiak4-Aug-11 13:56 
GeneralRe: Double Firing Event Pin
eddieangel5-Aug-11 6:19
eddieangel5-Aug-11 6:19 
AnswerRe: Double Firing Event Pin
MicroVirus9-Aug-11 13:49
MicroVirus9-Aug-11 13:49 
QuestionImage Reconstruction Using Genetic algorithm for Minimize the Number of projection and Maximize the Image Quality in C/C++/Matlab Pin
Kartheeswaran.S3-Aug-11 0:10
Kartheeswaran.S3-Aug-11 0:10 
AnswerRe: Image Reconstruction Using Genetic algorithm for Minimize the Number of projection and Maximize the Image Quality in C/C++/Matlab Pin
Richard MacCutchan3-Aug-11 1:24
mveRichard MacCutchan3-Aug-11 1:24 
AnswerRe: Image Reconstruction Using Genetic algorithm for Minimize the Number of projection and Maximize the Image Quality in C/C++/Matlab Pin
Dave Kreskowiak3-Aug-11 2:06
mveDave Kreskowiak3-Aug-11 2:06 
Questionresizing form with a RTB inside Pin
hang_em2-Aug-11 23:58
hang_em2-Aug-11 23:58 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.