Visual Fox Pro: Saving and Showing a Photo - visual-foxpro

I created this
A button on click will do:
lcFileName=GETPICT()
**then i append that to a table field
APPEND BLANK
replace picture.name WITH lcFileName
then this is for the init of the image holder
goto top **Just testing, so i only aligned the data to the very first one
thisform.image1.Picture = picture.name
The problem is this does not save or copy the image i selected into a new folder which i still do not know how to and the image inst showing in the image holder.
thanks

Use COPY FILE to make a copy of the picture file.

Related

Removing the image placeholder (picture) in Word using OpenXML

I have a Word file that I'm manipulating with OpenXML. I have nothing but a picture content control there and I have successfully added a picture ("content") into that picture content control.
Now everything is otherwise fine, but I don't have a slightest clue of how to remove the placeholder picture. That is, I have that "little icon with monitor, sun and mountain" there right in the middle of my inserted picture. You know, the icon that you see when you insert a picture content control. I can take the count of content controls thru VBA and it says there's exactly one, so there's not two controls on top of each other.
If I delete the target content control (with remove-method), the entire content control (including the correctly set picture) gets deleted.
Is there something like "placeholderimage.Hide"-method or something that I should use?
I set the content to the picture like this:
DocumentFormat.OpenXml.Drawing.Blip blip = targetpicturecontrol.Descendants<DocumentFormat.OpenXml.Drawing.Blip>().FirstOrDefault();
blip.Embed = mainPart.GetIdOfPart(imagePart);
This code hides (or removes, whatever) the place holder
private static void RemovePlaceHolder(SdtProperties targetproperties)
{
Appearance appearance = new Appearance();
appearance.Val = new EnumValue<SdtAppearance>();
SdtAppearance sdtAppearance = new SdtAppearance();
sdtAppearance = SdtAppearance.Hidden;
appearance.Val.Value = sdtAppearance;
targetproperties.AppendChild(appearance);
}

Qtruby ListWidgetItem has blank icon after adding data

I am working on a GUI using qtruby. I have a ListWidget that I am filling with ListWidgetItems. So far these have just contained the text that I wanted to display and everything worked fine. I wanted these items to also hold some hidden data to use when they are clicked on. I used ListWidgetItem.setData() to set the data and I can get the data from it when it is clicked just fine. However once I add the data the text being displayed is now shifted over to the right about 4 spaces. When I click on it a little dotted box appears around the text but not the space that was added. It looks like it is a space for an icon but I have not set any icon and I don't want one. How do I get rid of this extra space so that items containing data are lined up with everything?
The code is very straight forward:
item = Qt::ListWidgetItem.new( #grain_strings[index] )
item.setFont( #font )
# TODO this is causing the text to be indented, removing it removes the indent
item.setData( 1, Qt::Variant.from_value( grain.type ) )
#item_list.insertItem( #end_of_grains+1, item )
The first argument to setData is the role number and for some reason you chose to set it to 1. The documentation says: "The data to be rendered as a decoration in the form of an icon. (QColor, QIcon or QPixmap)". So you are telling Qt to display an icon but you are not giving it a valid icon object.
Try setting the role to Qt::UserRole, which is "The first role that can be used for application-specific purposes." I am not sure how to access that constant from Ruby. If it is not provided by the qtruby gem, you could use 0x100 I suppose.

how to add dynamic image in crystal report with out using databse?

Make sure you have a directory of images either on your shared or local drive (E.g. "C:\Images\")
2) Go to Insert > OLE Object > select Bitmap Image or Paintbrush Picture
3) Right-click the image and select Format Graphic > Picture tab > Click on the Formula button (X-2) beside 'Graphic Location' and put in a formula that reads image locations from the directory.
but in picture tab no option like formula button.
plz suggest me.
Please reference the image I attached below. Are you saying you do not see what I have highlighted in yellow?
This would be the appropriate area to set the location of your images based on how you are implementing the images. Click on the X-2 button and select the field which will have your URL.
Does this help?

How to create a background to keep button on it using resource editor

I am new to work on resource editor i have created two buttons next and previous to change the page in my own created window using CreateDialog function and resource editor.
Now i want to create a strip which i will put at the bottom of my window and I want to put the two buttons "NEXT" and "PREVIOUS" on that strip and that strip can be coloured (not be white). I want to do so because right now my buttons are on the display of image on my created window and which looks odd so i want my buttons to appear on the colourful strip(just like as you can see for .pdf files preview on preview pane) .
Any ideas how to accomplish it ?? I tried to use "COUSTOM CONTROL" option from the toolbox and wanted to colour it and wanted to put button on it but when i run the programme i found that before i had an image display at preview pane but now it is not working(i mean on putting the "COUSTOM CONTROL" on my IDD_MAINDIALOG the preview of the image don't work any more which was working before but when i put "MFC BUTTON" (just to check if it works or not ??)on my IDD_MAINDIALOG then it works(i mean there is no problem in dispaying the image on my window which had stopped working due to "COUSTOM CONTROL") )
So any ideas how to accomplish this strip creation ??
Maybe it would be easier to put the image inside a picture control rather than putting the buttons inside a strip.

Edit onClipEvent Actionscript

I am a beginner so please take it easy. First some history, I am trying to modify a flash movie (not created by me) that has 4 images in it.
I have to now add 2 more images (pic5.png and pic6.jpg) to the "slideshow" as shown in the attachment, I have added the 2 images to the library. The problem I am having (as I understand, I may be incorrect) is that _root.count = 4 causes the movie to jump back to the first image after it displays the 4th one which does not display the 5th & 6th image.
My question, how do I edit the value of _root.count to 6, so that it will show all the 6 images. Additionally how do I create a hyperlink on each image.
Please can someone guide me.
Many thanks.
Looking at your screen shot, Layer 2 (which contains the slideshow movieclip) is locked. If you unlock the layer by clicking on the padlock icon you should then be able to edit the script.
To edit the script double-click on the script in the Movie Explorer panel and the Actions panel should open. You can edit the script here.
The second part of your question - how to create a hyperlink - is very broad and there are many different ways to approach it. The most elegant approach would depend on how your project was structured.
The simplest way might be to define a variable to hold the path to the current image and add another onClipEvent handler.
So in the existing onLoad you would add…
this.path_to_image = http://your-domain.com/images/your-first-big-image.jpg;
Then add the new event handler
onClipEvent(mouseUp){
getURL (this.path_to_image);
}
You would then have to update the path_to_image variable whenever the image changed.
slideshow.path_to_image = http://your-domain.com/images/your-next-big-image.jpg;

Resources