Click here to Skip to main content
16,005,316 members
Home / Discussions / Visual Basic
   

Visual Basic

 
AnswerRe: How to Generate Barcode Directly from VB.Net Pin
Sipder8-Nov-08 20:41
Sipder8-Nov-08 20:41 
Questionproblem with printing barcode [modified] Pin
Sipder8-Nov-08 2:17
Sipder8-Nov-08 2:17 
AnswerRe: problem with printing barcode Pin
Dave Kreskowiak8-Nov-08 4:25
mveDave Kreskowiak8-Nov-08 4:25 
AnswerRe: problem with printing barcode Pin
sph3rex8-Nov-08 4:38
sph3rex8-Nov-08 4:38 
GeneralRe: problem with printing barcode [modified] Pin
Sipder8-Nov-08 22:26
Sipder8-Nov-08 22:26 
QuestionOLE_COLOR (Help) Pin
sarfarazaliqureshi7-Nov-08 22:49
sarfarazaliqureshi7-Nov-08 22:49 
AnswerRe: OLE_COLOR (Help) Pin
Dave Kreskowiak8-Nov-08 4:23
mveDave Kreskowiak8-Nov-08 4:23 
GeneralRe: OLE_COLOR (Help) Pin
sarfarazaliqureshi8-Nov-08 8:19
sarfarazaliqureshi8-Nov-08 8:19 
Actually this code is from a program Steganography.......


Private Sub EncodeByte(ByVal Value As Byte, ByVal used_positions As Collection, ByVal wid As Integer, ByVal hgt As Integer, ByVal show_pixels As Boolean)
Dim i As Integer
Dim byte_mask As Integer
Dim r As Integer
Dim c As Integer
Dim pixel As Integer
Dim clrr As Byte
Dim clrg As Byte
Dim clrb As Byte
Dim color_mask As Integer

byte_mask = 1
For i = 1 To 8
' Pick a random pixel and RGB component.
PickPosition used_positions, wid, hgt, r, c, pixel

' Get the pixel's color components.
UnRGB picImage.Point(r, c), clrr, clrg, clrb
If show_pixels Then
clrr = 255
clrg = clrg And &H1
clrb = clrb And &H1
End If

' Get the value we must store.
If Value And byte_mask Then
color_mask = 1
Else
color_mask = 0
End If

' Update the color.
Select Case pixel
Case 0
clrr = (clrr And &HFE) Or color_mask
Case 1
clrg = (clrg And &HFE) Or color_mask
Case 2
clrb = (clrb And &HFE) Or color_mask
End Select

' Set the pixel's color.
picImage.PSet (r, c), RGB(clrr, clrg, clrb)

byte_mask = byte_mask * 2
Next i
End Sub

Private Sub PickPosition(ByVal used_positions As Collection, ByVal wid As Integer, ByVal hgt As Integer, ByRef r As Integer, ByRef c As Integer, ByRef pixel As Integer)
Dim position_code As String

On Error Resume Next
Do
' Pick a position.
r = Int(Rnd * wid)
c = Int(Rnd * hgt)
pixel = Int(Rnd * 3)

' See if the position is unused.
position_code = "(" & r & "," & c & "," & pixel & ")"
used_positions.Add position_code, position_code
If Err.Number = 0 Then Exit Do
Err.Clear
Loop
End Sub

Private Sub UnRGB(ByVal color As OLE_COLOR, ByRef r As Byte, ByRef g As Byte, ByRef b As Byte)
r = color And &HFF&
g = (color And &HFF00&) \ &H100&
b = (color And &HFF0000) \ &H10000
End Sub
GeneralRe: OLE_COLOR (Help) Pin
Dave Kreskowiak8-Nov-08 10:16
mveDave Kreskowiak8-Nov-08 10:16 
GeneralRe: OLE_COLOR (Help) [modified] Pin
sph3rex8-Nov-08 10:57
sph3rex8-Nov-08 10:57 
GeneralRe: OLE_COLOR (Help) Pin
sarfarazaliqureshi9-Nov-08 8:47
sarfarazaliqureshi9-Nov-08 8:47 
AnswerRe: OLE_COLOR (Help) Pin
sarfarazaliqureshi8-Nov-08 8:26
sarfarazaliqureshi8-Nov-08 8:26 
QuestionChart Problem. Pin
Nanda_MR7-Nov-08 22:14
Nanda_MR7-Nov-08 22:14 
AnswerRe: Chart Problem. Pin
Dave Kreskowiak8-Nov-08 4:22
mveDave Kreskowiak8-Nov-08 4:22 
GeneralRe: Chart Problem. Pin
Nanda_MR9-Nov-08 17:41
Nanda_MR9-Nov-08 17:41 
Questionhow do i remove "database login" from my crystal report?? Pin
graced887-Nov-08 16:41
graced887-Nov-08 16:41 
AnswerRe: how do i remove "database login" from my crystal report?? Pin
Wendelius8-Nov-08 3:50
mentorWendelius8-Nov-08 3:50 
GeneralRe: how do i remove "database login" from my crystal report?? Pin
graced888-Nov-08 16:30
graced888-Nov-08 16:30 
GeneralRe: how do i remove "database login" from my crystal report?? Pin
Wendelius8-Nov-08 21:12
mentorWendelius8-Nov-08 21:12 
GeneralRe: how do i remove "database login" from my crystal report?? Pin
graced889-Nov-08 15:07
graced889-Nov-08 15:07 
GeneralRe: how do i remove "database login" from my crystal report?? Pin
Wendelius9-Nov-08 18:09
mentorWendelius9-Nov-08 18:09 
QuestionSave PrintDocument to image Pin
Richard Sauceda7-Nov-08 11:45
Richard Sauceda7-Nov-08 11:45 
AnswerRe: Save PrintDocument to image Pin
Dave Kreskowiak7-Nov-08 15:52
mveDave Kreskowiak7-Nov-08 15:52 
AnswerRe: Save PrintDocument to image Pin
Richard Sauceda12-Nov-08 4:35
Richard Sauceda12-Nov-08 4:35 
Question[VB.NET] - need advice on a data container Pin
Member 38675217-Nov-08 6:11
Member 38675217-Nov-08 6:11 

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.