Answer Questions
Carl Bruneau Hot Key function for whole program
Hi all Are there any good examples for a hot key class. I would like to implement hot key functionallity for the whole application I am creating standard text when user presses ALT or CTRL + F-key. Any links / urls you know of Lars E Thanks. That was great! But how do i get the keystate for onther keys accept Control, Shift and F. Where can i find the keystate for every funtion-key Thanks again. Lars E. The easiest way is to specify the same key-handler to every textbox you want it to work for. The alternative is to have a "windows wide" hotkey set, then apply it as it works, searching for the active control to put your text into, which I don't think you would like to do. ...Show All
claydevin Control.OnMouseHover event
I am writing a custom control that inherits directly from Control. While doing this I was overriding the default behavior of the OnMouseHover method in order to raise an event that I wanted to happen each time the mouse stopped moving. I ended up scrapping this after a while though because the behavior of the MouseHover event was not what I expected. What I expected was, each time the mouse is moved there would be a timer that is restarted and waits a set amount of time before it raises an event. I figured the amount of time it would wait would probably be the value stored in System.Windows.Forms.SystemInformation.MouseHoverTime. But when I would test my mouse hover events that were based on the default behavior I would only get i ...Show All
johnny_no1_boy DataGridView Serial Number Generation With Combo Box Column
hi, i have a datagridview, and during the design time i have added three columns SrNo EmployeeName Location Out of this i could figure out employeename and location which is a drop and i have added the drop down collections during design time itself, and i could fetch them in datasets, but now i want to make that srno column as auto increment, helps needed Regards, Prasenna. K Afternoon Prasenna :) as I know, datagridview 's end row is a new row, so we can't put anything into its cell, whenever we put something, it become a old row and another blank new row generated. so as guess your req, may be you can set the SrNo column can't be edited ,then add so ...Show All
Sandrina Print Preview problem(Bug)
Hey, I have this code in the PrintDocument control under the PrintPage event: private void printDocument_PrintPage( object sender, PrintPageEventArgs e) { RtextboxUC thisrichtextbox = GetCurrentTextBox(); //Start printing text and store last letter... checkPrint = thisrichtextbox.Print(checkPrint, thisrichtextbox.TextBox.TextLength, e); //Check if there should be more pages if (checkPrint < thisrichtextbox.TextBox.TextLength) { e.HasMorePages = true ; } else { e.HasMorePages = false ; } } There are no errors, but when I test it on my program and click print preview...when it opens the PrintPreview dialog It shows the dialog that is telling you how many pages it is det ...Show All
Vasile Strange behavior with Navigation in BindingSource
Hi, I got a problem. I have a BindingSource, connecting at my database to show me the data in my program, so I added 4 buttons to navigate, and I navigate using MoveFirst(), MoveNext(), MovePrevious and MoveLast, but what I noticed is that sometimes the method don't work as expected, this happens more when I edit some field. I don’t know what is happening but let's say that I have 6 items, so I edit item number 5, everything works fine and my database gets updated, but when I click the button to call the MoveNext() for example the field that is shown is not the right one, it goes to the item number 3 for example, so I need to click at MoveLast, and then everything comes back to normal. If I don't click at MoveLast it simple doesn't work ...Show All
J A Y Conditionally adding a button to a form
I am new to VB and I can't seem to find an answer to this questions. I want to check the OS Version when the form launches and conditionally add a button depending on what OS is found. I have created a simple form below that has two buttons on it. When clicked the button launches a setup.exe in a directory relitive to the forms EXE. The form below works just fine, but what I want to do is if the OS is Vista, then Button1 should be hidden so that the user can not click on this button and only Button2 is visible on the form. Any suggestions on how to best handle this Public Class Form1 Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click Me.Close() Dim a As ...Show All
Nep23 Floating tool window
I'm looking for a way to implement a C# form which hovers in the same manor as a C# floating toolbar, but my hovering form will never be docked. I'm hoping not to use the Interop functionality and do it all in .NET. For instance the Solution Explorer window in Visual Studio .NET if it is not docked to the IDE will hover/float above the IDE so the end user will always see it while Visual Studio .NET maintains focus. Once Visual Studio .NET loses focus to another application (for instance the standard windows calculator application) the other application window/windows will be on top and be able to hide the Solution Explorer window. I've tried using the TopMost property of a form but this is not a solution since it will keep my tool wi ...Show All
C&#35;noob designer errors: Object reference not set to an instance of an object
Hello, I am getting the following error when I try to open the designer for some of the forms in my project. I have no clue why this is happening. thanks Object reference not set to an instance of an object. at Microsoft.CompactFramework.Design.DeviceTypeResolutionService.EnsurePopulated(Boolean fPopulateProject) at Microsoft.CompactFramework.Design.DeviceTypeResolutionService.SearchNormalEntries(AssemblyName assemblyName, String typeName, Boolean ignoreTypeCase, Boolean reflectionBased, Assembly& assembly) at Microsoft.CompactFramework.Design.DeviceTypeResolutionService.SearchEntries(AssemblyName assemblyName, String typeName, Boolean ignoreTypeCase, Boolean reflectionBased, Assembly& ass ...Show All
Divya Bhasin tutorial with datagridview
Hi, I have seach but can't find a tutorial, which shall do the following: I have a datagridview, which have 5 colomns - the first 4 I gets from a database. The 5. have I created as a unbound text. In each row I will use the 5. column to make a calculation on column 1 and 4 where I shall say: column4 = column1 * column4 In a textbox below the datagridview, I then will have that adds all the data in column5 Example: Column1.......Column2.....Column3......Column4......Column5 QTY...........Some text...Some text....Rate.........QTY*Rate 5.............aaa.........aaaa.........100..........500,00 2.............bbb.........bbbb.........150..........300,00 Textbox which contains the totally of Column5 = 800,00 Can anybod ...Show All
AndrewBadera tabpage autofill the lenght of the tabcontrol
Hi, I am wondering if anyone knows how to do set the all the tabs in tabcontrol to fit the length on the tabcontrol Here is example to attempt to explain what I mean. Let say I have two lines of tabs and the second line of tabs only has one tab. What I want to know is if it is possible to get that tab to cover all the space to the right or left of it (ie setting the tab to the length of the tabcontrol) Thanks Hi, have you tried setting TabPageControl's SizeMode to FillToRight It might make the tabs do what you want... Andrej No, that's meant for multi-row tabs. You'd need SizeMode = Fixed and recalculate the tab size based on the control width. Here's a subclassed TabControl tha ...Show All
Kanhaiya How to make a ToolStrip Calender Item?
How to make a ToolStrip Calender Item which use a datetimepicker as its content Thanks You could put a DTP on your form, close to the ToolStripButton and set it's Visible property to False. Let the button's Click event set it to True... Ehrm, no need for inheritance, just standard Windows Forms designing... Is that difficult to create by inheritance ...Show All
RhodeHummel Making advanced forums
I am planning to make an advanced forum application that allows to register a user, register a user for different program and keep track of them, then write invoices. What would be the best way to do that. I used to use vb.net 2003, right now I am getting a free upgrade from msdn to 2005. I have noticed it has more features, would any of them help me to do what I need. I was thinking to have a collection of buttons, when you click on them they slide and give you more options. It is just I dont know yet how would be a better way to click a button have a different form showing up. I have played with mdi container and did not very liked it. I have allso found that 2005 has split container, would that work. Any help would be apprec ...Show All
Ransome C# windows form looks different on different OS/Platform
I have run into a problem where windows form made in C# looking different when it is runned from Xp professional edition and Xp Media Center edition. All the functionality, group box, buttons, textbox were fine. However, the sizes of the picture boxes I have added on to the program seems to change its relative size ratio from one OS to another. I an in a situation where the picturebox on XP fits nicely into the whole designer form where as on MediaCenter Pictureox enlarges to not fitting in to the designer form. Does anybody have answer for this problem would like to offer me a hand Thanks Cordially, KSJP Hummm ... are the same .NET framework version Regards. the .NET Framework version for this shouldnt ...Show All
Wayne Sepega Adding a timer to a windows service created in vb.net
I have created and installed a Windows service in vb.net - there was no problem there. I want to add a timer to this service so I am able to run some code at a specified interval and am unable to get this to work. I have dropped a timer from the component part of the toolbox and on the OnStart or the service added: tmrData.Enabled = True tmrData.Interval = 5000 tmrData.Start() And the timer on tick function is : Private Sub tmrData_Tick( ByVal sender As System.Object, ByVal e As System.EventArgs) Handles tmrData.Tick Dim MyEventLog As System.Diagnostics.EventLog MyEventLog = New EventLog MyEventLog.Source = "timertest" MyEventLog.WriteEntry( "data timer has fired ...Show All
mathewk_03 ConnectString in Debug and Release.
In my Application settings I have a connectionstring setup to connect to a test database server. When I deploy a release, I update the connectionstring everytime to point to a production database server. I wonder is there a way you can set up both connectionstrings; when I change from debug to release in the Solution Configuration, it will pick up the correct connectionstring Thanks you so much! Terrence Hi Terrence, Web app, or WinForm Thanks! It is WinForm. Thanks... When you debug the code the code run from debug folder and you should have app.exe.config which should have the connection string which points to debug server and under release there should be app.exe.config th ...Show All
