Turn CODE Properties And Parrams On And Off?
Aug 16, 2011
I am not exactly sure what I am looking for here.. So I have this code to disable the close button on a form (Red X):
Protected Overrides ReadOnly Property CreateParams() As CreateParams
Get
Dim cp As CreateParams = MyBase.CreateParams
Const CS_NOCLOSE As Integer = &H200
cp.ClassStyle = cp.ClassStyle Or CS_NOCLOSE
[Code]...
View 10 Replies
ADVERTISEMENT
Dec 22, 2010
I wish to turn on the Single Instance Application choice in Visual Studio 2008 properties. To do so, I must choose "Enable Application Framework". When I do that, my ONLY choice is to choose a Startup Form, not a Startup object. This makes no sense to me. I have a tray application, and I check to see which form I should load, a logon form, or the main form. But since I am forced to choose a startup form, I MUST load the logon or main form to begin with. But I don't want to. I want startup code to determine which one to load first. So then I am playing with making the OTHER form invisible, even if the startup form, but that is a mess.
View 4 Replies
Apr 26, 2012
[code]I want to make the Properties Window to update the properties for X and Y at each MouseMove, so they become immediately visible for the user.
View 2 Replies
Jan 16, 2009
I'm working on a Hazardous Materials label printing program. One of the options is to do an "NFPA" label. Since there are 4 values required with 4 or 6 options, the ratings are entered via radio buttons in a group box. That's working okay. I display values in the NFPA diamond as they're entered: left quadrant blue, top quadrant red, left yellow, bottom red. I'm having trouble with the label in which the rating will be displayed on top of a jpg diamond for the white. In this quadrant the text can be up to 4 characters. I can accept the text going into an adjacent block a little, but the corners of the label overlap into another quadrant/color. I reduced the font size which solved the overlap problem but the font is then too small and looks terrible. I tried to make the background of the label transparent to let the color come through correctly but that's not a valid value for label.background. I'm figuring that the transparent background is the best solution. What can I use that will accept a transparent background so the color shows through?
I'm trying to set the transparent property via label properties properties, not via code. Here's the code if it makes any difference:
Public Class NFPA
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Close()
End Sub
[code]....
View 2 Replies
Jun 3, 2011
How do I turn off a monitor using VB.NET code? OK, actually I found the C# solution. But I need the VB.NET solution. I have tried an online C# to VB.NET converter, but the converter is complaining that there are errors in it.How can the following C# code be translated to VB.NET?
[Code]...
View 2 Replies
Jan 26, 2010
I found many solutions in C++ however they seems fail to satisfy my requirement. I need code to turn off monitor when i'm away and if i want it to turn on, i must type specified key instead of any key press or mouse movement as usual.
View 5 Replies
Feb 11, 2012
My current code: Server: Imports System.IO Imports System.Text Imports System.Threading
[Code]...
View 9 Replies
Mar 24, 2012
How do access a code to do something for only the last clicked text box and turn it into an If...ElseIf...End If statement?
View 3 Replies
Aug 27, 2010
I am using Visual Basic 2008. However, the Report a Bug function does not work, which in itself is a major bug.While I am typing in the code editor, these annoying popups keep popping up and completely blocking my view of the code. I have no idea what these popups are showing and do not need them. I have not been able to find any way of turning them off. I consider this another major bug.
View 7 Replies
Mar 6, 2012
I'm tutoring a student in VB 2010 at a local college.i'm trying to explain to the student that he needs to learn the technique or art of knowing how to start coding in VB to accommodate a simple forms program.Is there a name or term that is used to describe the thought process a programmer goes through to convert what the user is expecting into the code that needs to be implemented to accomplish the task?A simple example is a form with a textbox on it and an OK button.When the user clicks the OK button, the program should check the textbox to make sure it is a number and not alphanumeric.The student I am tutoring has a hard time knowing what the first line of code should be to make that kind of test.He has a problem translating what needs to be done into code.I was wondering if anybody knows what that is called and if there is anything written about it.
View 15 Replies
Feb 17, 2012
Right now I can add background music in my program by using this code
My.Computer.Audio.Play(My.Resources.Music_3, AudioPlayMode.Background)
I can also turn it off and change the music by using this code
My.Computer.Audio.Stop()
My.Computer.Audio.Play(My.Resources.Another_Music, AudioPlayMode.BackgroundLoop)
Is it possible to pause the music then if I resume the music it will just continue the flow? I mean if I pause the background music in 33 seconds and the music has 50 seconds and I resume it will just continue playing in 33,34,35 etc.. seconds?
View 2 Replies
Sep 1, 2009
I was wondering if their was a way to for me to turn off events and then turn them back on in my program or just queue them up until i am ready for them to be excuted. Kinda like how a OS turns on and off interupts. Is this one of those general programming no-nos?
View 1 Replies
Aug 3, 2009
It looks like this: Itis stripping out HTML characters.
Imports System.Text.RegularExpressions
Function GetTextFromHtml(ByVal htmlText As String) As String
[code].....
View 1 Replies
Mar 26, 2010
I am trying to get Profile properties in the code behind. But I am not getting any intellisence like Profile.Homephone or Profile.CellPhone. When I try:
Dim memberprofile As ProfileBase = HttpContext.Current.Profile
Dim homePhone As String = memberprofile.GetPropertyValue("HomePhone").ToString()
[code].....
View 2 Replies
Jun 14, 2010
How would I set the following property from code
chart1, series, series1, Data, XValueType, Datetime
View 1 Replies
Jan 7, 2010
i am starting my job from a VB.net application using VS-2008. In the job i need to accessinsert and modify summery properties. example : this can be worked by windows photo gallery.
View 7 Replies
Jan 17, 2011
I am using VB 2010 and have the following code written in C that is used to access some PDF properties. translate this to VB?
[Code]....
View 3 Replies
May 21, 2009
How can I set properties like the Padding and Location in code?
View 3 Replies
May 24, 2010
I been trying to create a database of files. I wanted to list the Titles and Authors of the files.
How can this be done?
View 4 Replies
May 15, 2011
On a .aspx page, what is the best way to link a server control's property to a property of the page class (its code-behind)? The only way that I have read about is to use databinding:
<asp:TextBox ID="txt" runat="server" Text='<%# Me.SomePropOfMine %>' />
and then call Me.txt.DataBind() or Me.Databind() from the codebehind. Is there any way of establishing this relationship on the .aspx page alone, or simplifying the process if you have many controls to bind (without binding the entire page)?
View 3 Replies
Nov 11, 2009
I'll put some C# code below that should explain what I'm trying to do. I just don't know how to do it in VB. Additionally, for future ref, if you could tell me what this process is called
// Here is a simple class
public class FullName
{
[Code]....
View 3 Replies
Nov 4, 2010
I would like to use a loop to manipulate a set of objects on the form. This is like using a control array but not,... Here is some code to consider:
[Code]....
View 4 Replies
May 14, 2011
I have a custom control defined in code-behind:
Public Class MyControl
Inherits Button
Private _A As String
[Code]......
What code I have to write to bind to those properies?
View 1 Replies
May 13, 2009
I've created a Custom Control, and I will be placing a large number of instances of that Custom Control on my xaml page. In working with that Custom Control in the VB Code Behind, how do I do the following?
How do I reference the name of the Custom Control (in my VB code) which was clicked with the MouseLeftButtonDown event? For example, if I have 10 instances of my Custom Control in xaml, each with a different x:name (say 1-10), when a particular instance is clicked, how can I see which one was clicked? I've tried a number of things including e.OriginalSource.Name (which returns the component within the control which was clicked and not the name of the instance of the control). My Custom Control consists of numerous parts and pieces (Rectangles, Lines, Text, etc). Each of these items is a part of my layer. In VB code, once I can reference a particular Control, how can I hide or change certain parts of that control (such as hiding a Line, and changing the text). Also, I need to modify more than just the control which was clicked, so I need to be able to access properties of all of the controls, not just what was clicked. For example, if I click Control instance Test1, I also need to modify Test2, Test3, and Test5 in some way.
Here is some test code I through together as part of a Silverlight project using MS Blend 2. My control is much larger, and I need 200 - 250 instances/copies of that custom control, so I really need to know which control instance/copy was clicked.
My UserControl:
<UserControl
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
[Code].....
View 1 Replies
Apr 27, 2011
I'm making a control and I am trying to finalize my design time properties grid. I have several List(of Class) items as public properties and when I click on the design time menu (while testing the control) there is the word "Collection" and a button with an ellipsis (...) that brings up a neat pop up with the buttons Add/remove and all of the public properties of the collection's class on the right hand side. Basically for a non-collection instance of a class (with public properties) I'd like a similar button to show up. I know I could put all of the properties in the main control class and group them, but I like the pop up box feature. Anyway to duplicate this? (think font grid item etc.)
View 3 Replies
Mar 5, 2012
In the form design I set up a TableLayoutPanel, 20x20 cells and in cell (1,1) a PictureBox (called Target) containing the image of a small target. The properties box for Target shows some very promising properties, Column and Row - and if you overwrite the values in the properties box, the PictureBox obligingly shifts to the corresponding cell position in th design. However in VB it is not possible to refer to Me.Target.Row or .Column - neither appears during coding in the menu of properties, and deliberately coding either of them produces an error like
Error 1 'row' is not a member of 'System.Windows.Forms.PictureBox'.
1. Why does the properties box show properties that cannot be altered programmatically?
2. How can my program move Target around in the TableLayoutPanel?
View 10 Replies
Jun 5, 2009
how to open a "data link properties" dialog using manged code
View 1 Replies
Nov 3, 2010
I am upgrading from Access 2003 to Access 2007. I found this page on the MSDN library http:[url]....Some of my code uses some of these properties that according to this page are "hidden" in 2007. So exactly what does "hidden" mean? Does this mean I can still set these properties in code or does this mean that Microsoft has not fully removed them but their functionality is dormant in Access 2007?
View 13 Replies
Aug 19, 2009
Is there a way to expose a UserControl's properties to the Properties Window in the Designer?
View 3 Replies
May 9, 2009
this.label39.Font = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.label39.Location = new System.Drawing.Point(37, 303);
this.label39.ForeColor = System.Drawing.Color.Black;
[code].....
View 12 Replies