Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
  HOME    TRACKER    Visual Basic

How To Print A Check Mark On A Form Or Gridcontrol

I want to put a check mark ( like the one in check box) on a form or a cell in a gridcontrol. Is that possible? Thanks for your helpAlex

View Complete Forum Thread with Replies

See Related Forum Messages: Follow the Links Below to View Complete Thread
Check Mark In Menu?
I want to toggle functionality in a program I'm writing like in IE when you see check marks next to the option when its selected.

Is this a special control you use in order to get it? or can you use the menu editor to accomplish this?

Displaying A Check Mark
I would like to display a check mark in a grid cell.
does anyone know the ASCII code for it, and how
can I display it in a red color?

Thank you for your time

Add Check Mark To Richtextbox
The vb charcter set does not have anything for a check mark and when i add a check mark as an image it aligns a little above the line of text. How can i add a check mark?

Check Mark Deselection
In this program i am writing i have multiple check marks that are basiclly the same excpet they do slightly differen't functions, and for user friendlyness i made a section were you select on check mark and all the other checks are also selected, but when i deselect that check mark all the other checks stay selected
How can i make it so the check marks follow wht that check mark does?

also i can't remember how to get that line in the mnueditor, ya know like the one between the grups in the menu's
Like in IE you hav two lines between all your printing Items

Checkboxs: Check Mark Instead Of 1 ??
Hi all..

How can I place Check mark instead of 1 in my report?

printer.print check1.value

would yeild 1 OR o Only!

Thanx in advance for any help.

Check Mark In Menu List
I have created a way to have a check mark created in the menu list when I click on the item, but how do I get it to go away if I click on it again?

Here's what I have:

Private Sub mnuSavePageDblClk_Click()
mnuSavePageDblClk.Checked = True
End Sub

How To Mark Check On Items In List Box
i have a prob. suppose i have a checked list box with items in it. these items came from table LOCATION. list box have items for e.g Loc 1, Loc 2, Loc 3... these all items r from different locations. now i want to mark check on those items only which belong to a particular location. how can i do this? i know a bit of code which i think is ok but i dunno the whole picture

Dim i As Integer
For i = 0 To lstMachines.ListCount - 1 ' lstMachines is the name of list box
If (....) Then
End If

Placing Check Mark In A Menu??
Hi folks,

How do you place a check mark along side an item in the menu? As in the attached example, I can change the caption of a menu (run/stop, on/off etc) but I would like to place a check mark beside the caption also. Can it be done withtou placing image there? Thank folks.


Replace Check Mark In Menu Items!
Is it possible to replace the check mark in menu items (that's associated with the 'Checked' property of menu items) with an image? If yes, how do I do it?



Replace Check Mark In Menu Items!
Is it possible to replace the check mark in menu items (that's associated with the 'Checked' property of menu items) with an image? If yes, how do I do it?



Strange Question Mark In Top Left Of Form And Code Not Executing In Private Form
Vb6.0 issues

I have a question mark in the top right hand corner of my
my form - not idea - what it is or how to remove it ?? I don't want to start the form from scratch again.Any ideas.


Also the next linked form that directly follows the one with question mark is not executing any code within its private sub.
I mean linked by say
frmb.visble = true

None of the buttons have enabled = false.

I am really pussled Why is it doing nothing when I press the private siub from buttons.


Mark The First Item In My Listbox When I Load The Form?
I always wanna mark the first item in my listbox when I start the form. How do I do that?

Question Mark In Upper Right Corner Of Form?

I have seen on many applications they have a question mark button where the min/max/close buttons appear in the upper right hand corner of a form..

When you click on that button and click on a control on the form, the help context pops up.. I would like to implement that in my programs.. I searched all over but couldn't find where to do this in VB6..

Any help would be appreciated..


Check "Mark" In A FLEX GRID
I've got a MS FLEX GRID where we want the user to type a "/" character, but we want a real "check mark" to appear in the grid.

We are using a TIMES NEW ROMAN font, and I don't see that character available in a CHR$(1) to CHR$(255) loop I just did in a text box.

Is there a way to get a different font in just one cell? A way to put a picture into a cell - really in the cell, so that when the grid moves, it moves with it?

[edit] - they can type other values in this column as well - letters and such

How Can I Add CheckBox In To Some GridControl?
I want to show the data that has some field as Yes/No type. I want to show it as CheckBox that may be easy to update. However I want to show the data in table format as GridControl.

How can I add CheckBox in to some GridControl?

GridControl Problems
  i have a problem. on a form i have 2 gridcontrols (gvFixCols, gvMoveCols) both with equal number of rows, but vertical scroll bar is visible only for gvMoveCols. how can i do to show rows in gvFixCols while i'm draging scroll bar?

  any other ideas are welcome.

Best regards,

Printing Data From Gridcontrol
Data from database is being displayed to the user using Grid Control. I want the said data to be printed.

Should I use Sub PrintAnywhere (Src as Object, Dest as Object) or Printer.Print? Or is there a better way to do this?

One more thing, I'm using VB's common dialog box for my Printer dialog box. My question is do I have to set the settings [such as margins] in my code for my program to use or does my program automatically uses whatever default settings the printer has?


Making Gridcontrol Resizable
hi! Can anyone tell me if there is a way to make the gridControl on the form resizeable when the vb application is running?

thank you, heather

User Rearranging Rows In GridControl
I want the user to be able to rearrange rows in a GridControl using right-click, drag and drop. Anyone have code available to do this? I've seen something like this for the listbox control, but cannot find anything similar for the GridControl.

How Do I Check "Print To File" Checkbox On The Print Common Dailog
And also to set the filename in the inputbox that follows. Essentially I am trying to print to a file without the need for user intervention.

If anyone know then it would be a great help !!!

Print Enitre Form..? / Print Form Sizeable?
First off.. I would like to give some credit to all of those that come here and help the people out, read threw code, mod code, you deserve much credit.

Im printing the contents of a VB form with Me.PrintForm.. the form is larger than the screen (it uses scroll bars) it only prints out what the client is viewing and not the whole form. I need the whole form printed. Is there a simple way to do this? Or a way to control the print size?

Im in a bind.. any help would work, I appreciate it.

the first time i click the print button on my vb6 form the report appears on the screen but on subsequent clicks it does not

the code i have written is follows

private sub commandprint_click



     frmmain.crviewer91.reportsource = REPORT


end sub

is there anyting missing ? Kindly help at the earliest

Print Picture Box (print A Form That Is Too Large For The Screen Or Page)
I got a picture box (Picture1), which contain several picture box'es, labels and
Flex Grid tables, -which I would like to print. Picture1 is quite high (higher than the screen). I found some code that i modified, but the printing only get the labels proper. The Flex Grids and picture box'es only show the border, and not the contents.

Code:Private Const WM_PAINT = &HF
Private Const WM_PRINT = &H317
Private Const PRF_CLIENT = &H4& ' Draw the window's client area.
Private Const PRF_CHILDREN = &H10& ' Draw all visible child windows.
Private Const PRF_OWNED = &H20& ' Draw all owned windows.

Private Declare Function SendMessage Lib "user32" Alias _
   "SendMessageA" (ByVal hwnd As Long, ByVal wMsg As Long, _
   ByVal wParam As Long, ByVal lParam As Long) As Long

Private Sub Print_Click()
Dim rv As Long
   Me.ScaleMode = vbTwips ' default
   With Picture2
      .Top = Picture1.Top
      .Left = Picture1.Left
      .Width = Picture1.Width
      .Height = Picture1.Height
   End With
   Me.Visible = True
   Picture2.AutoRedraw = True
   rv = SendMessage(Picture1.hwnd, WM_PAINT, Picture2.hDC, 0)
   rv = SendMessage(Picture1.hwnd, WM_PRINT, Picture2.hDC, _
   Picture2.Picture = Picture2.Image
   Picture2.AutoRedraw = False

   Printer.Print ""
   Printer.PaintPicture Picture2.Picture, 0, 0
End Sub

Edited by - Zigar on 11/27/2003 3:31:21 AM

Guidelines For Form.Print And Printer.Print?

Can somebody please provide some guidelines on when and where I can use the Form.Print and Printer.Print codes. I've just spent hours trying to understand what works and what doesn't I've tried to find information in the standard MS manuals and I have searched this site without much success.

Simply, I want to print out the value of some variables at various stages of program execution for debugging purposes. Actually there are many hundreds of values so I don't want to copy them from the screen onto paper manually.

Let's take a simple case

    Printer.Print "Hello"

Seems straightforward and code like this is listed in many sources. It just would not work for me! The code would apparently execute but no printout appeared

This code was included in a Standard (.BAS) Module, but it just would not work.

I tried the same code in a Form subroutine and called it from the Form.Load event, but it still didn't work.

Finally, I called the same routine in the form from a Command Button - it worked - Hooray!

I put the subroutine back into the BAS module and called it from the same Command Button in the form but it no longer worked.

No error messages appeared anywhere

I found the same type of behavior with the Form.Print and associated codes.

Perhaps I'm being very dense here, but is this behaviour expected? If so, how can I print variable values from within .BAS modules?

Thank you to anybody who can shed light on this idiosyncratic behaviour.

Andy T.


CPU Athlon XP 2800+
Windows XP Home
Brother HL5040 laser printer (default)

Check Print Job Complete

I have searched extensively and have been unable to find an answer.

I currently have a macro in Word that changes some text in an text file, sends the current document to the printer, and sets the text file back to the original state(I am changing an .ini file). The problem is that I do not wish to set the INI file back to the original text until the print job is complete.

Anyone have any ideas how I would do this? I was thinking just making a loop that checks to see if print job is complete. If print job is complete then set INI file otherwise check print status.

Keep in mind I do not want to check printer status, for I am printing to PDF. I am interested only in print job being complete.

Thanks for the help!

Print Validation Check Vba Excel
Hello VB people
I'm new to this vb code so I'll try and explain clearly.Apologies if I've placed this in the wrong forum.

I have an excel workbook that contains several sheets. In the first sheet which is called MILLCH I have placed some code to check to see if two cells match. If they do not match the sheet MILLCH should not print as the criteria has not been met. Here it is

Private Sub Workbook_BeforePrint(Cancel As Boolean)
Cancel = True
If Cells(154, 6).Value = Cells(154, 7).Value Then
Else: MsgBox "Nickel weight needs recalculating,Check the analysis in cells F154,F155", vbInformation, "YOU CANNOT PRINTOUT THIS RECIPE"
End If
End Sub

The trouble is if the criteria is not met then the user is not allowed to print the sheet MILLCH and any other sheets in my workbook. The MILLCH sheet is the only sheet that a check should be performed on. I hope its something simple I've got wrong but I'm stuck.

Currency To English... To Print On A Check
Hi all, I hope this is a dumb question, so it's easily solved, but I can't find it.

I need to print a check from the program that I'm creating, and I cannot find a way to format a currency variable into an english translation.. i.e. $36,256.25 => Thirty six thousand two hundred and fifty six dollars and twenty five cents

Is there a way to do this?


Edited by - SkippyJD on 2/24/2004 11:33:43 AM

Print Check Automatically Overnight
Hi All,
I am developing application using VB6 and Access 97.
i have developed a format to print check.
I want to print checks overnight by retriving data from table.
i have no idea about that.
Can some help me with this problem???!!!
is there anyother way to do this???


Edited by - sreddy on 8/3/2005 1:23:04 PM

Help::I Have A Big Proplem In Print Check On The Receipt Printer
i have a problem in
printing checks uesing a POS recepit printer

my code is

Printer.FontName = "Courier New"
Printer.FontSize = 10
'*** Report Header ***
Call PageHeader
'*** Detail Section ***
Do Until mrl.EOF
Font.Size = 20
Printer.Print mrl!Quntitative & " | " & sText & " | " & mrl!unit_Price
'*** Report Footer ***
Printer.Print String(75, "-")
Printer.Print "*** End of Report ***"
Call PageFooter
'*** End Of Report ***

But in the Result
you can see the table

Code Description unit_Price
1001 | ABC TRADERS |11
1002 | XYZ BROTHERS | 12
1003 | FALCON CEMENT |10
*** End of Report ***

and the question is how can i mack it lick that check

*** End of Report ***

Checkbox..... Check Check Check Check Check...oops Stack Error
I have three check boxes one on each of my SSTab tabs. If one is checked the other two needs to be unchecked.... and so on. I use this to determine which is the default website. is the code I used....

Select Case Index
Case 0
chkDefaultWebsite(1).Value = vbUnchecked
chkDefaultWebsite(2).Value = vbUnchecked
' Case 1
chkDefaultWebsite(0).Value = vbUnchecked
chkDefaultWebsite(2).Value = vbUnchecked
Case 2
chkDefaultWebsite(0).Value = vbUnchecked
chkDefaultWebsite(1).Value = vbUnchecked
End Select

Simple enough right? Well the first time I click on the check box, my box isn't checked but my others are when I click again it checks it..... so I did this....

Select Case Index
Case 0
chkDefaultWebsite(0).Value = vbChecked
chkDefaultWebsite(1).Value = vbUnchecked
chkDefaultWebsite(2).Value = vbUnchecked
Case 1
chkDefaultWebsite(0).Value = vbUnchecked
chkDefaultWebsite(1).Value = vbChecked
chkDefaultWebsite(2).Value = vbUnchecked
Case 2
chkDefaultWebsite(0).Value = vbUnchecked
chkDefaultWebsite(1).Value = vbUnchecked
chkDefaultWebsite(2).Value = vbChecked
End Select

And of course I get a stack error of endless days err...I mean looping on the check box.....

How can I get that to check the first time I click on it and also uncheck the others ???

Thanks again !

Program In Memory To Check Keys For Print Screen
Hi there!

Does anybody have any idea in how to make a small program that checks the keyboard function (F12 for example) and starts a routine to send the exactly screen content to printer?

This program need to be executing at the task bar! Im using VB6 under WinXP.

Thanks so much for any idea!
Best regards,

Aldo Nakamura

Form.PrintForm Form Doesnt Print Whole Form
Hi all,

Im building a program that has a form that varies in length, and the form can be printed.

The problem I am having is that if the form is over a certain length (I'm unsure of this length), the bottom of the form doesnt get printed.

What I need to happen is that if a form exceeds 1 A4 page in length, the rest needs to be printed on a 2nd page, at the moment the program only prints approx. 3/4 of a page.

Thanks for your time and consideration, and if you can help please do, it will be very much appreciated.


Transfering Data From Form To Form Using Check Boxes And Labels
all right all right all right. I am atempting to transfer data from certain label.captions in forms 1-7 to the coresponding captions in forms 8-14.
I want to only transfer data in the labels that are selected by a checkbox beside them. (should i just use the checkbox.caption?) how it is now is:

[checkbox] [label for time(not to be transfered)] [label for data to be transfered]

I tried :

I figue there is a 75% chance I am wrong.

or what about

VB Code:
Dim ctl As Control    Dim frm As Form             For Each ctl In frm.Controls            If TypeOf ctl Is CheckBox Then                MySunday.ctl.Caption = Sunday.ctl.Caption            End If        Next

How To Check That Form Is Loded Or Not? And Also How To Stop Flikering Of Child Form?
Hii Friedns,

How to know that desire form is loded or not during run time?

and in my project i am using MDI form. During run time i am changing size of child form. But it does not look very good when it opens child form. How to give snappy look to that? It also takes to much time to load form.

Thanksin advance.


How Do I Print A Form Directly With Form.height Is 17000 Pixels
Hi All,

Please help me in printing a form directly on a printer with form.height is 17000 pixels ( the default size of a form is 9000 pixels only ). My application consists of an MDI form, but this form, which i need to print, is not a child form to that MDI.
When I tried to print I am able to get the output nearly to 9000 pixels on an A4 size paper, kept the remaining paper blank. Almost half of my content is not printing.
Please let me know a solution for this.

Thanks & Rgds,


How To Close A Program Using Vb6... And How To Print A Vb6 FORM [form Only]
1. How do you close a separate vb6 program with vb6? Will that use ShellExecute as well (just like when opening it)?

2. Thanks to Hack, btw, for the printing code... but, since it prints the whole application, I had to place the application out of the MDI application. But, my prof said that -- if I were to place the form in another application, it would mean that I'm going 'out of bounds' of the system.

So, I was wondering, anyone have a code that will print only a form in vb6?

How Do I Check If Another Form Is Visible From Within A Form?
I'm trying to see if it's possible to check if a form is visible from within another form..

If Form!frm_CopyRight.Visible = False Then LogonSucceeded Else MsgBox "You are already logged in!", vbOKOnly + vbCritical

But this way it's not working

How Do I Check If MDI Form Has An Active Form?
I have an MDI form and a toolbar control on it.The code for the click event of the toolbar control is as follows

Private Sub Toolbar1_ButtonClick(ByVal Button As omctlLib.Button)
If Button.Index = 10 Then
Unload Me.ActiveForm
End If
End Sub

Now if there is no ActiveForm on the MDI form,this code gives an error saying Object variable not set.How do I check whether there is an ActiveForm on the MDI form or not?

Any help would be greatly appreciated.

Print Form.list Or The Whole Form
1. Who knows how to print the data which i loaded into a list?

2. Can i print the layout of a form (5 labels with a listbox under it) without all the other buttons etc. or must i make a function for it?

Print Form && Save Form

All are known to How to print the form.
me.printform it is print the form.

I need the softcopy of printform.

I need how to save the form in RUN time.

any printer setting or any command is there.

Please replay me.

Thanks and regards

Can't Print All The Components In A Form Which Within A Mdi Form
I have a problem by using printform function. I created a program which related all the components within a mdi form because I would like to make its size larger than 1024 x 765. But while I try to print out there got only 1 page or 1 paper can print out. So, I would like to know how do I print all if my form is longer than 1 page. (I am using dynamic components). Thanks

Form Print - Form Height
Trying to do a print on a form, but the only way I can make it match up to a true 8x11 piece of paper (print without having the last three inches or so nothing but white space) is if I'm running on a rather high resolution.

Reason for this is because the height property of the form is limited to 12000 at 1024 x 768. Is there any way to force the form height or make it print the information below the form height without giving me such difficulties?


Printdialog Control-print To File Check Box Wont Write File
Commondialog1 control - Printerdialog-Showprinter
I need help with the printerdialog control, my problem is I cannot get the "Print To Write"
function in the "Showprinter" part of the control, to write the prn file when the box is
checked. I tried using the "ShowSave" part (even in a call to a subroutine) but this did
not work either. I'm new to this area of this control. I need a better direction and would
greatly appreciate a code example. Thanks


Mark 007
cheers mark that is what i wanted to do
just got to make it write 3 cols
and refine the clear sheet as i have merge cells on it
can i call clear cells
rather than sheet

Ado - Thanks Mark
How can I check if an ado field is an identity field?

How To Get Form To Check For Changes?!
hi Guys,

Im sure this has been answered but i searched the forum..

If mfgcomponents.Rows > 2 Then fraCdetails.Enabled = True
If mfgcomponents.Rows = 2 Then fraCdetails.Enabled = False

i want my form to check this code every time the form changes..

its really everytime a command button is pressed,is there a place in the form i can place this code without doing a private sub with the code lines then using call..?


How To Check The Printer On The Network Before Printer.print Method?
I am trying to write code to be able to give user option to choose a
printer on the network before they can printer the job.

With printer.print method, VB will not prompt the printer on the
It will only print to the default printer.

Is there a way to be able to choose the printer?


Remove ? Mark
Project > Add Form > Tip of the Day.
There is a question ? button on the Border Style, how to remove it ?

Trade Mark
Is there a way to put the trademark symbol (T in a circle) in the caption of a form or at all in VB. Or should I just use the (TM).


Copyright 2005-08, All rights reserved