
Nazgulled
Avatar/Signature-
Posts
120 -
Joined
-
Last visited
Content Type
Profiles
Forums
Blogs
Events
Articles
Resources
Downloads
Gallery
Everything posted by Nazgulled
-
ok thanks... one problem resolved :)
-
ActiveForm won't wokr coz I tried to output it with debug.writeline and blakn line was written in the output window... Let me see if I can explain it better: I have an application with a tray icon. The form at the start is visible, I click on the icon and I hide the form, I click again on the icon and the form will be visible again, I click agian and this time I'll hide it and this on and on... This behaviour is fine if I don't havy anything open besides explorer. But suppose I'm surfing the web, the browser window is maximized and at this time the fomr state of my application is visible and if I click on the tray icon the form will hide and I don't want that, I want the form to remain visible and I want it on top of everything.
-
Hi, I have an application with a tray icon that when clicked it will display or hide the form like this: Private Sub notifyIcon_MouseUp(ByVal sender As System.Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles notifyIcon.MouseUp If (e.Button = MouseButtons.Left) Then If (Me.Visible = True) Then slideNotesForm(True) Else slideNotesForm(False) End If End If End Sub Private Sub slideNotesForm(ByVal slideout As Boolean) If (slideout = True) Then Me.Location = New Point(scrWidth, ((scrHeight / 2) - (Me.Height / 2))) Me.Hide() Else Me.Location = New Point((scrWidth - Me.Width), ((scrHeight / 2) - (Me.Height / 2))) Me.Show() Me.BringToFront() Me.Activate() End If End Sub Bu supposing the form is visible but I have one or several applications in the front of this application, if I click the notify icon, the form will be hiddne and not shown. How do I check the form focus so I can control this behaviour?
-
yep that's what I wanted... but if I do it like that, when I click Exit on the Menu, isn't the Me.Close() unnecessary? cuz it will not close, the application will only terminate with Application.Exit() right? is that enough?
-
I have 2 possible ways to close my application, the first one is the close controlbox button of the window form, the second is the Exit option in a menu associated to a systray icon. The code to close the application through the menu in the systray is like this: Me.Close() Application.Exit() Is this the best way to terminate an application? But my main question is how can I use the close controlbox button to hide the form and not terminate the application. then I would use the systray icon to show the form, but that's not really important. The Exit menu option is the only option possible I want to terminate the application, the close controlbox button I want it to perform some code, in this case, to hide the form.
-
right... lol, I guess that was a bit obvious cause in the menu it says win32 and .net :s I never really looked to the subfolders of project types... thanks.
-
Is it possible to create a VC++ application in Visual Studio .NET (2003) without using the .NET framework? I've read somewhere that every thing coded in .NET will need the .NET framework to run. But I also read some stuff wich I didn't understand correctly, so that's why I'm asking. I have Visual Studio .NET and I'll try a bit of demoscene but I wanted to use Visual Studio .NET IDE to code and not Visual C++ 6, however, I want it work on every system and I don't it to depend on the .NET framework. Is it possible? What I have to do?
-
oh that... I forgot about that completly... but nevermind, that was a problem when I was not able to make this -> Me.Text = Application.ProductName + " v" + Application.ProductVersion <- work, now it works fine and that error does not appear anymore... That's why I wasn't following you :P Thanks everyone for the help ;)
-
how do I know if it's throwing me a NullException? I'm not quite following you...
-
right..... lol, thanks a lot... I just can't see why I didn't remembered that before... @Arch4ngel What do u mean? I have barely no code at all... The files I have with code are frmMain.vb and AssemblyInfo.vb and here's the code on each file: frmMain.vb Public Class frmMain Inherits System.Windows.Forms.Form #Region " Windows Form Designer generated code " Public Sub New() MyBase.New() 'This call is required by the Windows Form Designer. InitializeComponent() 'Add any initialization after the InitializeComponent() call End Sub 'Form overrides dispose to clean up the component list. Protected Overloads Overrides Sub Dispose(ByVal disposing As Boolean) If disposing Then If Not (components Is Nothing) Then components.Dispose() End If End If MyBase.Dispose(disposing) End Sub 'Required by the Windows Form Designer Private components As System.ComponentModel.IContainer 'NOTE: The following procedure is required by the Windows Form Designer 'It can be modified using the Windows Form Designer. 'Do not modify it using the code editor. Friend WithEvents mnuMain As System.Windows.Forms.MainMenu Friend WithEvents mnuFile As System.Windows.Forms.MenuItem Friend WithEvents mnuFame As System.Windows.Forms.MenuItem Friend WithEvents mnuHelp As System.Windows.Forms.MenuItem Friend WithEvents mnuSingle As System.Windows.Forms.MenuItem Friend WithEvents mnuMulti As System.Windows.Forms.MenuItem Friend WithEvents mnuSettings As System.Windows.Forms.MenuItem Friend WithEvents mnuExit As System.Windows.Forms.MenuItem Friend WithEvents mnuContents As System.Windows.Forms.MenuItem Friend WithEvents mnuReadme As System.Windows.Forms.MenuItem Friend WithEvents mnuAbout As System.Windows.Forms.MenuItem Friend WithEvents mnuSpace1 As System.Windows.Forms.MenuItem Friend WithEvents mnuSpace2 As System.Windows.Forms.MenuItem Friend WithEvents mnuSpace3 As System.Windows.Forms.MenuItem <System.Diagnostics.DebuggerStepThrough()> Private Sub InitializeComponent() Dim resources As System.Resources.ResourceManager = New System.Resources.ResourceManager(GetType(frmMain)) Me.mnuMain = New System.Windows.Forms.MainMenu Me.mnuFile = New System.Windows.Forms.MenuItem Me.mnuSingle = New System.Windows.Forms.MenuItem Me.mnuMulti = New System.Windows.Forms.MenuItem Me.mnuSpace1 = New System.Windows.Forms.MenuItem Me.mnuSettings = New System.Windows.Forms.MenuItem Me.mnuSpace2 = New System.Windows.Forms.MenuItem Me.mnuExit = New System.Windows.Forms.MenuItem Me.mnuFame = New System.Windows.Forms.MenuItem Me.mnuHelp = New System.Windows.Forms.MenuItem Me.mnuContents = New System.Windows.Forms.MenuItem Me.mnuReadme = New System.Windows.Forms.MenuItem Me.mnuSpace3 = New System.Windows.Forms.MenuItem Me.mnuAbout = New System.Windows.Forms.MenuItem ' 'mnuMain ' Me.mnuMain.MenuItems.AddRange(New System.Windows.Forms.MenuItem() {Me.mnuFile, Me.mnuFame, Me.mnuHelp}) ' 'mnuFile ' Me.mnuFile.Index = 0 Me.mnuFile.MenuItems.AddRange(New System.Windows.Forms.MenuItem() {Me.mnuSingle, Me.mnuMulti, Me.mnuSpace1, Me.mnuSettings, Me.mnuSpace2, Me.mnuExit}) Me.mnuFile.Text = "&File" ' 'mnuSingle ' Me.mnuSingle.Index = 0 Me.mnuSingle.Text = "&Single Player" ' 'mnuMulti ' Me.mnuMulti.Index = 1 Me.mnuMulti.Text = "&Multi Player" ' 'mnuSpace1 ' Me.mnuSpace1.Index = 2 Me.mnuSpace1.Text = "-" ' 'mnuSettings ' Me.mnuSettings.Index = 3 Me.mnuSettings.Text = "&Settings" ' 'mnuSpace2 ' Me.mnuSpace2.Index = 4 Me.mnuSpace2.Text = "-" ' 'mnuExit ' Me.mnuExit.Index = 5 Me.mnuExit.Text = "&Exit" ' 'mnuFame ' Me.mnuFame.Index = 1 Me.mnuFame.Text = "H&all of Fame" ' 'mnuHelp ' Me.mnuHelp.Index = 2 Me.mnuHelp.MenuItems.AddRange(New System.Windows.Forms.MenuItem() {Me.mnuContents, Me.mnuReadme, Me.mnuSpace3, Me.mnuAbout}) Me.mnuHelp.Text = "&Help" ' 'mnuContents ' Me.mnuContents.Index = 0 Me.mnuContents.Text = "&Contents" ' 'mnuReadme ' Me.mnuReadme.Index = 1 Me.mnuReadme.Text = "&Readme" ' 'mnuSpace3 ' Me.mnuSpace3.Index = 2 Me.mnuSpace3.Text = "-" ' 'mnuAbout ' Me.mnuAbout.Index = 3 Me.mnuAbout.Text = "About" ' 'frmMain ' Me.AutoScaleBaseSize = New System.Drawing.Size(5, 13) Me.BackColor = System.Drawing.SystemColors.Control Me.ClientSize = New System.Drawing.Size(459, 264) Me.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle Me.Icon = CType(resources.GetObject("$this.Icon"), System.Drawing.Icon) Me.MaximizeBox = False Me.Menu = Me.mnuMain Me.MinimizeBox = False Me.Name = "frmMain" Me.TransparencyKey = System.Drawing.Color.Red End Sub #End Region Private Sub frmMain_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Me.Text = Application.ProductName + " v" + Application.ProductVersion.Substring(0, 3) End Sub End Class AssemblyInfo.vb Imports System Imports System.Reflection Imports System.Runtime.InteropServices ' General Information about an assembly is controlled through the following ' set of attributes. Change these attribute values to modify the information ' associated with an assembly. ' Review the values of the assembly attributes <Assembly: AssemblyTitle("Underworld Mines")> <Assembly: AssemblyDescription("Just a minesweeper game like the windows one but with a few differences.")> <Assembly: AssemblyCompany("Nazgulled")> <Assembly: AssemblyProduct("Underworld Mines")> <Assembly: AssemblyCopyright("Nazgulled")> <Assembly: AssemblyTrademark("")> <Assembly: CLSCompliant(True)> 'The following GUID is for the ID of the typelib if this project is exposed to COM <Assembly: Guid("087B99D8-2506-4081-AF9B-BF3C9BF3E39C")> ' Version information for an assembly consists of the following four values: ' ' Major Version ' Minor Version ' Build Number ' Revision ' ' You can specify all the values or you can default the Build and Revision Numbers ' by using the '*' as shown below: <Assembly: AssemblyVersion("0.6")> Where's that null object?
-
can you help on that or what?
-
I worked now... you see, I typed me.text adn then typed a space and a I got a popup saying: Text () as String and if I pressed Return I would ge automatically () so I thought I had to do something like this: Me.Text ("blablabla") but it wasn't working but now I figured it out I could make it like Me.Text = "blablabla" Another thing, the Application.ProductVersion outputs something like 0.6.0.0 and I ahve this information in the assemblyinfo file: <Assembly: AssemblyVersion("0.6")> How can I make it just to output 0.6?? Thanks for everything.
-
I still can't make it work... I only have one form in my solution wich is frmMain.vb and then, when the form loads I want it to put on the titlebar the name and version of the application and all the code I have is the following one (part of it, you have already seen): Public Class frmMain Inherits System.Windows.Forms.Form Windows Form Designer generated code Private Sub frmMain_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load frmMain.ActiveForm.Text = Application.ProductName + " v" + Application.ProductVersion End Sub End Class I have tried to use Me.Text but can't understand how this works...
-
Can't make it work... Private Sub frmMain_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load frmMain.ActiveForm.Text = Application.ProductName + " v" + Application.ProductVersion End Sub I have the above code i my form but I get this error when compiling: What's the problem and how should I fix it?
-
thanks very much
-
But the content of those variables (Application.ProductName and Aplication.ProductVersion) are set where? In the assembly information or should I set them elsewhere?
-
ok... thanks a lot ;)
-
Hi, Is it possibel for me to use the information in the Assembly file everywhere I want? For instance, I wanted to use specially the version number int eh caption on the form and on a label in the about screen and if I change the version number I jsut change in the assembly info and then the caption and lablel would change automatically or when I compile the program they will get the desired values. Is it possible? How can I achieve that?
-
I'm asking this ehre so I don't ahve to create another thread... Is the .NET framework required on every computer I want to run a .NET application even if the application is just a newly created app with an empty form and no changes made at all after clicking the New button. Is it needed anyway?