Changing Size Of Imagelist?
Dec 27, 2009How do i change the size of Imagelist images at runtime?
ImageList1.ImageSize = New Size(18, 18)
But it isnt working..
How do i change the size of Imagelist images at runtime?
ImageList1.ImageSize = New Size(18, 18)
But it isnt working..
I can not seem to figure out how to change the size of a photo being put into a picture box.I need the photos that are placed in the picture box to come in their original size....I have 4 different pictures in an ImageList and depending on what a Text box from a different form says, one of the photos will be displayed in a picturebox when the form is loaded. Right now all the images show up very blurry and in the predetermined size in the imagelist. Here is my code:[code...]
As you can see I figured out how to autosize the PictureBox (candypic) to the size of the image coming in....just cant get the image to come in as the right size.....
When I created the imagelist all the photos have a default size of 16, 16 when entered into the list.....I see in the imagelist properties how to adjust the image size but it groups them together as one.
I'm searching for a way to change the font size of selected text in a RichTextBox (rtf) having different font families (e.g. Arial and MS SansSerif) and font styles (underline, bold...) using the FontDialog, but without changing the families and styles. The following code resets all the font attributes, which is not what I want:
[Code]...
I'm new to VB in Visual Studio 2008 and am just trying out some simple test.I just want to change the Font & Boldness of some text but get the following errorProperty 'Size' is Read onlyI have been browsing the forums and it seems that changing the font size etc isn't as simple as
TextBox.Font.Size = 12
TextBox.Font.Bold = True
Is this true, and if so what do I need to do
I am after a property that makes a control (textbox, datagrid or other) move according to the forms size. Because some of the controls I got does that, and I really don't want it. I've been looking at them but could not find it
View 4 RepliesI use some code to successfully resize and save images - but I want to save the image to 800x800 px size on a canvas of 900x900px so it has a white border type thing around it.
View 8 Repliesokay well I want to be able to change the size of my Groupbox when I check my check box. I have tried this code and it did not work
If Checkbox7.checked = true then Groupbox1.size = (309, 446)
I don't get why this wont work, I tried others to but I cant get it to work.
I have a rich textbox and when you click on it i want the size to increase from 329, 20 too 329, 285. How would i accomplish this.My current code is:
richtextbox1.size = "329, 285"
but i can an error and im not sure what i should do.
I have a problem with my program. I have a form with 2 buttons UP and DOWN. I use this buttons to change the size of the form. The first step works fine. If I press the down button I get MsgBox ("Go Down", vbYesNo,) if I press Yes the form resize from 300 to 600 and if I press no it stay 300. The problem is, if the form is already at 600 everytime I press the down button I get the MsgBox ("Go Down", vbYesNo,) if I press Yes it recycles it self the form goes to 300 and then back to 600 and if I press No it stays 600. What I want is if the form is already 600 and I press the down button it skips the MsgBox ("Go Down", vbYesNo,) and the form stay at 600.
Public Class Form1
Private Sub ButtonUp_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ButtonUp.Click
Dim answer As String
If Val(TextBox1.Text) < 0 Then
answer = MsgBox("Go Up", vbYesNo, )
If answer = vbYes Then
For x = 300 To 600
[Code] .....
Ok, I have this command, which I think should change the text size in the webbrowser:
CType(AxTabControl2.SelectedTab.AttachedControl.Controls.Item(0), browse).document.ExecCommand("EditMode", False, System.DBNull.Value)
CType(AxTabControl2.SelectedTab.AttachedControl.Controls.Item(0),
[code]......
My Form1 is set to 1920, 1080 but it keeps changing itself to something slightly smaller. it just changed to 1916, 1054. Last time it changed to 1920, 1062. I'm not changing anything, it just does it automatically.
View 3 Repliesis it possible to change the size of the MonthCalendar to say double its standard size and still only display a single month?
When I resize using clientsize, width and height the multiple months are displayed?
I am creating a program with a web browser component, and a tab control. Default, the web browser is anchored to the toolbar. In my program there is an option to make a toolbar at the top of the form visible.false. Is there a way to make the web browser anchor to the top of the tab control when the toolbar is not visible, and anchor to the toolbar when the toolbar is visible?? I have experimented with docking (fill) but then parts of the web browser become covered by the toolbar and status bar. I am still relatively new to visual basic 2008 so if you could please explain or provide code.
View 14 RepliesI have a vb.net application that uses 2 crystal reports to print out reports. The first report is A4 and the second is A5.
How can my code access the printer default settings and change the default paper size to A4 and A5 each time without having to do it manually.
I have this code which run at form load event:
' Fuente
Dim tamano As Integer = Val(INI_Read(Application.StartupPath + "FSTM.ini", "Options", "Font size"))
[code].....
I am using the PowerPack and trying to change multiple ovalshape size, I have used the following code for changing multiple labels,
For Count As Integer = 1 To 100
Me.Controls("Label" & Count).Text= "Hello World"
Next Count
If I do the same for OvalShape, assume I have OvalShape1, OvalShape2.... OvalShape100
For Count As Integer = 1 To 100
Me.Controls("OvalShape" & Count).Size = New System.Drawing.Size(20, 20)
Next Count
The above throws error when executed.
How to conditional changing font size and color?
For example, if Amount>100 then
font color of [amount] = red
and
font size of [acount] = 10
My program has two lists, one a listbox and the other a listview viewed in details mode.
Both of them change heights (get taller) for no obvious reason. I am having to add a call to a method that resizes them to the end of every method, which is kind of absurd, I think. Also, when the window size is changed, these components change size, which means I have to keep track of that.
Edit: I had also thought of adding a timer to handle this.
how do i set the font for a pdfptable?
View 3 RepliesI am working on a application which is basically a screen designer. I have implemented the form designing capabilities using IDesignerHost and other interfaces. In my application user can pick a component from toolbox and drop it on the designer screen and can configure the properties from property window. I have my own set of properties which gets populated from database. Screen designer is working fine but the problem occurs when user changes some properties from property window. Say user changes property 'Width' then I change the width of the selected control in designer but the problem is SelectionOverlay shows the old size. When I select another control and select old control again, SelectionOverlay(resize handlers which appears around the control) shows properly. How can I tell the SelectionOverlay that the size of the control is changed.
View 2 RepliesI added an ICON (called pencil) file in my resources in vb.net, I tried several codes to change the cursor... like this
Public Class Form1
Dim ms As New System.IO.MemoryStream(My.Resources.pencil)
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
[Code].....
I need to figure out how to change the font of one line and then change it to another on a second line. I tried something like this:
VB.NET
rtbSettings.Font = New Font("Microsoft Sans Serif", 18.0F, FontStyle.Regular) rtbSettings.Text = "Test Header" & Environment.NewLine & Environment.NewLine
[code].....
I need to set the paper size on a printer to A4. I have tried several different ways to do this but keep getting errors. Currently trying some code I found on the net but I am getting errorsType 'PaperSize' is not defined&PaperKind' is not declaredI am using the following
Private Sub PrintDocument1_PrintPage(ByVal sender As Object, ByVal e As System.Drawing.Printing.PrintPageEventArgs) Handles PrintDocument1.PrintPage
Dim ps As PaperSize
[code].....
I have a button (btnAdd) that adds the content of a textbox (txtName) to a textblock (lblName). I want to add a date to the textblock when btnAdd is pressed but I want it to be a different font size and colour. So far my code looks like
lblName.Text = txtName.Text " " + DateTime.Now
I only want DateTime.Now to be a different size and colour. Is this possible? Instead of a label I need to display it in a listBox. My new code:
listBox1.Items.Add(txtName.Text " " + DateTime.Now)
How I could reduce the font size of xml rendered in a webbrowser control? According to MSDN the font property of the WebBrowser class isn't used.
View 2 RepliesI have come across a problem with visual studio 2010 & vb.net. i have a few custom controls on the form and few standard controls. When i build the application, the custom controls automatically change size and location. Anchoring and Dock properties are fine. Anchored to Top Left without dockstyle. Even if i fix the location and size in design mode, after i run the application the controls again change back to weird position.
View 2 RepliesMost applications will expand all components if the user change the size of the forms
View 2 RepliesI want to programatically delete some pixels that are unused in order to reduce the image size.Can anyone tell me how to reduce the size of an image file without changing the pixels values..
View 1 RepliesNow this program will only be used on systems that I produce, and send out. I need to make sure that for any monitor that these people use it will always be at the standard resolution of 1440 x 900..
I have tried setting up profiles with catalyst control panel, but if you plug in a different monitor to the one that was plugged in when you made the profile it wont recognise the screen and the system wont run properly.
So I wanna see if I can change the resolutions of the screen that will be plugged in the monitor slot and also if possible make sure the other extended screen should there resolution of 1024 x 768..how much control can you get over the monitors that are plugged in?
I have inherited from a Windows.Forms.Listbox so I could override the OnPaint and OnDrawItem methods in an effort to highlight specific items and alternate backcolors. I am also skipping some DrawItem events to prevent flickering.Everything is working fine, however when I select items in the listbox, it looks like the font is shrinking or becoming more compressed.Then when I mouse leave, the font goes back to its normal size and appearance but the same items are still selected (which is correct). During debugging the font never changes nor do any of its properties, but it does end up looking different when the item is selected and the mousedown event just happened.
Public Sub New(ByVal relativityHighlightColor As System.Drawing.Color)
_relativityHighlightColor = relativityHighlightColor
Me.SetStyle( _
System.Windows.Forms.ControlStyles.OptimizedDoubleBuffer Or System.Windows.Forms.ControlStyles.ResizeRedraw Or
[code]....