I use FrontPage 2003 for linking html files, through the command 'Insert' > Hyperlink.
And the window opens as follows:
I made a script with Autohotkey to resize the window, so I see more of the files in the 'current folder' (I think the class is SysTreeView32), but it doesn't apply to the child windows (I guess it is called mdichild), it shows as follows:
What I need is to make the script resizes the window and all the child windows.
The current scrip is:
#NoEnv
ResizeWin(Width = 0,Height = 0)
{
WinGetPos,X,Y,W,H,A
If %Width% = 0
Width := W
If %Height% = 0
Height := H
WinMove,A,,%X%,%Y%,%Width%,%Height%
}
#!u::ResizeWin(800,800)
From the screenshot, it looks like the resize is working.
Unfortunately, there are some windows that just don't resize properly. I assume that if you use your mouse, you can't resize it manually either. This is especially prevalent for older programs.
The only way of resizing individual controls, would be to use the ControlMove command.
However, in order to use this command, the control must be able to be detected. This would be either as ClassNN, control name, or HWND (window handle).
Related
I have the following (simplified) VBA code that demonstrates the problem while resizing a report and its controls from a module. To reproduce, create a new blank database, add a table and a report, then add this code into a new module:
Public Sub ResizeReport()
Dim rr as Report
Dim cc as Control
Set rr = Screen.ActiveReport
For Each cc in rr.Controls
cc.Width = 1 * 1440
Next
rr.Width = 5 * 1440
End Sub
If I open a report in Design View and run the macro, the changes stay when I change to other views (such as Report View, Layout View, or Print Preview). However, if I open the report in Layout View and run the macro, the report and its controls are resized, but as soon as I change the view mode, the report reverts to its state before the resize.
Please note that this issue does not occur if I manually resize the report/controls using drag handles or the Property Sheet while in Layout View.
Is there a command I need to issue after resizing the report/controls from VBA while in Layout View to get the changes to stick? Or should I be resizing the report/controls using different VBA commands?
I am using MS Access 2010.
Thank you for the short yet detailed question and functioning "MCVExample". I may need to refer other newbies to this question as an example of a perfect question. +1 for that even though the answer seems obvious. :)
You should save the report before changing it's view.
DoCmd.Save acReport, rr.Name
This will force the changes to "stick". The logic behind the report reverting to its previous state when changing view is to allow for dynamic, temporary changes at runtime, without permanently affecting the report.
More Information:
MSDN : DoCmd.Save Method (Access)
MSDN : Set Form, Report, and Control Properties in Code
I'm writing a custom script for Photoshop to handle batch processing of images. I have two input folders and an output folder that I need to specify. Right now I'm using something like this to select my folders:
var inputFolder = Folder.selectDialog("Select a folder of images to process");
Because I'm working on a server with a pretty deep folder hierarchy, it can be a real pain to select through the drop-down menu that Photoshop presents to me in this dialog.
It would be so much easier to have a folder selection dialog with an address bar and quick access panel like this:
All other PS scripts that I've been digging around in use the Folder.selectDialog method to set file paths to a variable. Is there a reason for this? If not, then how can I instruct Photoshop the second style of folder navigation dialog?
It doesn't appear that Adobe supports this dialog as a folder selecting option.
There was a similar thread to this posted on the Adobe forums where a workaround was suggested:
https://forums.adobe.com/thread/1094128
The solution that was suggested is to use a saveDialog function instead of selectFolder. This gives you the folder dialog that we want, but comes with the downside of having to type a dummy name into the filename path. It also says "Save As" on the top of the dialog box, which is confusing.
Here's what was offered:
by lilsmokie on Nov 8, 2012 2:19 PM
var dskTop = Folder.desktop;
var dskPth = String(dskTop);
var newSpot = new File(dskPth+"/poop");
var selectedFolder = newSpot.saveDlg('Select Destination Folder');
var illFilePath = selectedFolder.path;
alert(illFilePath);
This opens the dialog at the desktop. Then put "poop" or whatever you
like in the text field. There the user can navigate to where ever.
When they it save illFilePath will have the folder path. Not perfect
but its close enough for me right now.
I've also discovered that I can set the starting location of the selectDialog by using selectDlg instead:
var outputFolder = Folder(app.activeDocument.path).selectDlg("Select a folder to output images to:");
This gives some control over the starting location so that the user doesn't have to click through a million dropdowns.
At the bottom of your first screenshot you can see the unput text area Folder: This PC. It works just like an address bar. You can type (or paste) something like \\server\work\folder\subfolder into this area and you get this folder ('subfolder' in this case) immediately.
On MacOS this dialog doesn't show the Folder: ... input area. But you can press Cmd-Shift-G and get the native system 'address bar' anytime.
I've been looking for this problem, but cannot find a solution that works for me.
I've made option buttons through the UI of word 2013 , and gave them a specified name in their properties ( "knop11" )
ThisDocument.Shapes("knop11").Visible = False
The above line is what I try to use to hide my option button when pressing a command button.
After making a new option button ( with default name "OptionButton1 ) it still doesn't work if I apply it to that button.
It depends on the type of control you are inserting, if you are using a ActiveX option button, it is not included within the shapes, but it will be created as an independent object. In such case you just have to use its functions directly.
However there is no 'visibility' property within option buttons, you might use a harsh work around like changing the buttons size or its forecolor. Something like:
If knop11.Height > 1 Then
knop11.Height = 1
Else
knop11.Height = 20
End If
Just as a quick tip, when you make the UI, the controls that are included within the shapes of the document are the ContentControls, and normally you fill the TAG property to look for them later. You might as well use the check box content control, and programming the option behaviour within your macros.
Working with VB.NET in Visual Studio 2015. During debugging, is there any way to view the value of a variable inside a 'With' block by hovering with the mouse?
For example, in the code below, if I hover over lSection or lSection.MomentZ or lSection.MomentY or others, VS displays information about the object and/or the value of the variable (as expected).
However, if I hover over any object starting with a period (.SectionIndex or .SectionLocation or .Mx or .M_y or .Vx), VS will NOT show any tooltip at all.
NOTE: I am aware that I can add the the variable to a Watch window. I know there are other ways to get the value of the variable, but I want to be able to just hover with the mouse because it is literally (yes, literally) 900 million times faster.
I could only find one other question similar to this one, but the answer does not explain whether or not there is ANY possible way to enable this feature (VS setting, registry hack, 3rd party add-on, i don't care how)
How to view VB.NET object properties in the debugger within a "With object" block?
With mCSIDetails
.ClearCSIResults()
' Section Index and Location
.SectionIndex = lSection.ID
.SectionLocation = Round(lSection.FracLen * mMember.Length, 3)
' Section forces and moments
.P = lSection.AxialForce
If liAxis = MemberOrientation.Strong Then
.Mx = lSection.MomentZ
.M_y = lSection.MomentY
.Vx = lSection.ShearForce_CSI_12
.Vy = lSection.ShearForceZ_CSI_12
ElseIf liAxis = MemberOrientation.Weak Then
.Mx = lSection.MomentY
.M_y = lSection.MomentZ
.Vx = lSection.ShearForceZ_CSI_12
.Vy = lSection.ShearForce_CSI_12
End If
End With
I posted the same question on the Visual Studio forum and the moderator was able to replicate the issue.
Apparently this is just the new (terrible) way the debugger works. So if you want to be able to mouse-hover and get a tooltip with the object/variable value, then don't use WITH blocks...
I want to fire up a flash presentation inside Powerpoint 2007. I am calling the Win32 ShellExecute() routine. When I run this from a location whose path is a UNC path (\myserver\myfolder\sample.ppt) it does not work.
The ShellExecute routine expects 6 arguments, one of which is the path to run it from. I've tried to set this parameter to C:\ as well as using ActivePresentation.Path (which is a UNC path). Neither works.
I initially tried this approach, but found it caused problems:
When the presentation was used from a laptop not connected to the network.
If the user did not have access to the UNC.
If the flash file was renamed, moved or deleted.
I found a better approach was to embed the file into the Powerpoint file.
It can be done as follows using Office XP, Powerpoint
From the 'View' menu select 'Toolbars' and tick the 'Control Toolbox'
On the 'Control Toolbox' toolbar click on the 'More controls' icon
A list of controls will be displayed. Scroll down until you find the 'Shockwave Flash Object' and then click on it.
This should change your cursor to a crosshair. Move to the area on the slide where you want to inset the 'Shockwave Flash Object'.
Left click, hold and drag to create a box of the required size.
Next right click on the control you have just inserted and select 'Properties'.
Set the following properties
* Autoload = True
* EmbedMovie = True
* Enabled = True
* Loop = True
* Playing = True
* Visible = True
* Movie = c:\flash.swf (Change this to the location of your .swf file)
Close the 'Properties' control
Save the file.
Close the file.
Reopen the file.
The .swf file should start playing automatically when you reach the slide during the slide show.
I found it usefull to include controls (pause/play, time line) in the .swf file
UNC paths start with a double back-slash. Are you doing that, or was that just a typo in the question?
I've resorted to mapping a drive to the UNC path.
The command line looks something like
subst A: "\\ServerName\SomeDirectory"
well, now it seems to work just fine with the unc path.