.net - Wide Should VB Code Get?

Jun 27, 2012

In times past, most people coded on a terminal that was 80 characters wide. In many languages this has become, if not holy then close to it. But now many people have 20"+ monitors (or dual monitors), so screen real estate isn't as prime as it once was.

So my question is this: in Visual Basic code, should code be limited to 80 characters, should there be no limit, or is it really a subjective thing, dependent on where you work and your own preferences?

View 8 Replies


ADVERTISEMENT

VS 2008 What In The World Wide Web

Mar 1, 2010

I have a lot of HD images within my program design and it is causing the screen to flicker when loading other forms. It is kind of
slow too. Is there a way to resolve this, for example, using a reference or component such as DirectDraw. Here are my computer
specifications:

Intel Pentium 4 /2.53GHZ
1.5 GB RAM
512 MB ATI Radeon HD 2400 PRO AGP Video card
19 IN. LCD Widescreen 1440x900 resolution monitor.

could it be the refresh rate of only 60HZ?

View 6 Replies

Application Wide Shared Methods

Jul 26, 2011

I am developing an application that has multiple forms and I wanted to know the best method to have application wide methods and functions. Currently I am using a Module with all my methods that are needed to be used across the entire application in it. However, I read at one point that modules should not be used, as they are only there to preserve backwards compatibility with older VB code. Is there a better way to have methods able to be called anywhere?

View 1 Replies

Capture System Wide Selectedtext

Sep 9, 2010

how can i capture system wide selectedtext?

i've managed so far to get a global mousehook + i'm hoping to capture the selectedtext from anywhere system wide when the user left clicks.

i tried using the keybd_event api to send CTRL+C to copy any selectedtext to the clipboard but it has unexpected effects + seems to run before the text i've just selected becomes selected.

here's the code i'm using:

Public Class Form1
Private Declare Function keybd_event Lib "user32" Alias "keybd_event" _
(ByVal bVk As Byte, ByVal bScan As Byte, ByVal dwFlags As Integer, _

[Code].....

View 5 Replies

Child Window Width To Wide?

Jun 29, 2011

I'm trying to open a tool window as a child and although I can set the width to something like 50px wide in the ide, when it opens up its 125px wide. What is there to opening a widow with out much width am I missing.I have turned off the maximize and minimize gadgets and even the whole drag bar. When they open up when I run they are fat again. Looking for something like the tool window in paint.net.

View 1 Replies

Display Which For Example Is 300 LEDs Wide By 300 LED's Deep?

Sep 23, 2009

I am after some GDI+ help, Basically I have an LED display which for example is 300 LEDs wide by 300 LED's deep, so you could say it has a resolution of 300x300.I am intending to use windows to process images ready to be sent to the display (as the display is dumb and simply displays what it is sent, But I require that the images are animated as well as static sort of like the basic PowerPoint animations (scroll on/off etc).to achieve this I need to write some code that creates frames much like gif's. So to scroll a 300x300 image onto the display I would need 300 separate frames.

So I have written the following code that uses the GDI+ objects to build the frames needed to scroll an image from the right or left.

[Code]...

View 4 Replies

Folder For PC Wide User Data?

May 23, 2009

I'm looking for a windows "special folder" where user data can be stored and changed PC wide, not only per user.Up to now I've picked the so called COMMONAPPDATAFOLDER, but that doesn't work with a setup project, because the files copied there on installation (like a config file) are not changeable in Vista with a program used by a restricted user (probably because the Windows Installer performs with admin credencials).

View 2 Replies

Get System Wide KeyUp Event?

Jul 15, 2011

Currently I am able to see if a key is currently pressed via the GetAsyncKeyState function. Currently I just simply have a timer running in the background that constantly checks if a certain key is pressed in order to run a command. However my issue is if the user holds down the key it will continually run that bit of code over and over per timer tick. Is there a way or another function to detect a keyup or keypress only. This is my current code to detect keys:

Public Declare Function GetAsyncKeyState Lib "user32" (ByVal vKey As Windows.Forms.Keys) As Integer Public ReadOnly Property CurrKey(ByVal key As Windows.Forms.Keys) As Boolean
Get Return CBool(GetAsyncKeyState(key))
End Get
End Property

View 1 Replies

Register F7 As A System Wide Hotkey?

Sep 15, 2009

How would I register F7 as a System Wide Hotkey?This is my timer code

Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick
SendKeys.Send(Keys.Space)
End Sub

When I start the timer, and open notepad, this is what i get

View 6 Replies

Where And How To Store Application Wide Settings

Oct 25, 2010

i need to store Application wide Settings in my Application like:

Connection to DB (Servername) Username/Password Registrar/Serial etc. I think there are basically two Options:

Store them in the Registry Store them in an Application Settings File Using one of the methods above is no problem, but under Windows 7 my Application running in normal user mode allows me only to store user specific data. For example inside UserAppDataRegistry, UserAppDataPath etc.

But when i want to use e.g. CommonAppDataRegistry to write my Data in, then i get no access to it, due to missing privileges.

Now my question:

Where and how to store Application Wide Data? How are others doing this? When i purchase an application and install it on my pc, it asks me for Uusername and Serial. When i insert it then it saves it somewhere without asking me for Administrative Privileges or something else.

View 14 Replies

Where To Store Application Wide Settings

Dec 28, 2009

I have a license form that i wish to save the information or just system wide information for that matter,I know about the my.Settings - however this will only save for a specific user and the aplpication scope you can not write to.Where is the best place or the normal practice of saving application wide information?

View 7 Replies

Asp.net - Editing A Gridview Row With Drop-down Lists Gets Too Wide?

Apr 16, 2010

I have a series of GridViews in a Tab Panel - databound to a generic List of Business Objects.

The columns in the Gridview are all similar to the following:

<asp:TemplateField HeaderText="Company" SortExpression="Company.ShortName">
<ItemTemplate>
<asp:Label ID="lblCompany" runat="server" Text='<%# Bind("Company.ShortName")

[Code].....

View 1 Replies

Create A Shared Project Wide Variable

Aug 3, 2010

I've been looking at using PROPERTIES [URL] but frankly I don't understand it that well. Before I invest the time to read, understand, and truly comprehend this, I want to make sure it's the best way. My intended goal is to create my database connection string in a function/sub somewhere, then assign it to this project wide string variable, then I can use it in any form, project wide without having to recreate it.

[Code]...

View 7 Replies

Dropdown List Box Goes As Wide As Needed Even With Width Set?

Nov 21, 2011

I have a dropdown list box that displays data from my database. Problem is that some records are quite long so the width of the dropdown box extends past the side of my screen. I have a reasonible width set but it is not stopping the dropdown box from getting as wide as it needs to display each record. How can I set a fixed width on this?

<asp:DropDownList ID="DropDownList1" runat="server" AutoPostBack="True"
DataSourceID="SqlDataSource1Usage" DataTextField="data_text"
DataValueField="ID" Width="280px">
</asp:DropDownList>her

View 3 Replies

Find A List Of .NET Unicode (wide) Functions?

Oct 2, 2009

I would like to get a list of the VB.net/C# "wide" functions for unicode - i.e. AscW, ChrW, MessageBoxW, etc.

View 3 Replies

How To Provide User Control With Wide Data

Nov 23, 2010

I want to make a user control (name MultiSelect), which I will use for choosing items from huge list. For example I want to choose customers to make a view of their turnovers, so I will creat a new MultiSelect control which will contain a textbox (i canwrite starting letters) and a treeview (will list customers matching the first letters chosen in textbox).

View 7 Replies

Unicode Characters - How To Modify Existing API With Wide One

Sep 10, 2009

We are translating UI of one VB6 application designed in English (US) into Chinese Language which contains API's, we need to know how to use the Unicode (Wide) versions of used API for new (Chinese) Language and how can we find is there any wide version exist for that used API and how to modify existing API with wide API.

View 1 Replies

VS 2008 Application Wide Event Trap

Mar 26, 2009

How can I set up an application wide event trap that is triggered when my database connection status changes?i.e. no matter what form the user may be on if the connection is terminated for whatever reason a message box is displayed to the client requesting whether the program should try and reconnect with the database or not.

View 9 Replies

Declare Public Constants That Are Available Solution Wide Across All Projects?

Jan 11, 2012

How can I declare public constants that are available solution wide across all projects?

View 8 Replies

Program To Create System Wide Hotkeys And Run At Background?

May 8, 2008

I am trying to write vb program that creates system wide Hotkeys and runs at the background. The hotkey is to enter system date in another application.

View 6 Replies

VS 2008 System Wide Hotkey Stops Working?

Oct 11, 2010

Has anyone used a system wide hotkey and notice it no longer works? But the program is still running fine. When I run my program and it starts the hotkey, sometimes it will work fine all day, other times within 15 minutes I press the keys and the program does not react to it. I am using the keys Control-F2. Here is my

Public Sub SetHotkey()
Try
Select Case ComboBox2.SelectedIndex

[code]....

View 1 Replies

Write A Gloable Or Application Wide Error Handler?

Jun 6, 2009

Is it possible to write a Gloable or application wide error handler, how?

DanielI'm new to .Net, OPP and this forum but love it!

View 3 Replies

How To Implement A System Wide Text Replacement In Windows Programmatically

Dec 20, 2010

I have a small VB .Net application that, among other things, attempts to substitute system wide typed text by the user(hotstrings concept). To achieve that, I have deployed 'ahk2exe' and 'AutoHotkeySC.bin' with my application and did the following:When a user assignes a new 'hotstring':

Kill 'hotstring' exe script file if running Append new hotstring to the script file (if non exist then create a new one)Convert edited/new script file to exe (using ahk2exe)Run the newly converted script exe(somewhere there I also check if the hotstring has been already assigned)However, I am not totally satisfied with this method for the following two main reasons:

The extra resources deployed with the application. Lag: The time it takes for the system to kill the process and then restart it takes a minimum of 5 seconds on my fast computer and more on other computers. That amount of time is much more than the time it takes the user to assign the hotstring, minimize/close the window and then test his/her new hotstring. When the user does so initially with no success they will think the process failed. So this method is not very good for user experience.I am looking for a different method or implementation. May be using keyboard hooks? Or maybe adding a .dll library that achieves the same. Are there any resources you know about that might help (free or commercial)? What is the best way to achieve my desired goal?

View 1 Replies

Create A System-wide Independent Universal Counter Object Primarily For Database Keys?

Apr 5, 2010

I would like to create/use a system-wide independent universal 'counter object' that can be called via COM in a thread-safe manner. The counter object will be passed an ID to identify which counter to return, handle the counting, 'persist' the count (occasionally), have reasonable performance (as fast as possible) perhaps capable of 1000 counts per second or better (1mS) and be accessible cross-process/out-of-process. The current count status must be persisted between object restarts/shutdowns.

The counter object is liklely to be a 'singleton' type object implemented in some form of free-threaded dictionary, containing maybe 10 counters (perhaps 50 max). The count needs to be monotonic and consistent, (ie: guaranteed unique sequential values).Each counter should have a few methods, like reset, inc, dec, set, clear, remove. As a luxury, I would like to have a variable-increment (ie: 'step by' value). To support thread-safefty, perhaps some sorm of critical-section or mutex call. It just needs to return a long/4byte signed integer.

I really want something that can be called from anywhere, including VBScript, so I figure COM is my preferred solution.The primary use of this is for database keys. I am unable to use autoinc or guid type keys and have ruled out database-generated counting systems at this point.I've spent days researching this and I have really struggled to find a solution. The best I can find is a free-threaded dictionary object that can be instantiated using COM+ from Motobit - it seems to offer all the 'basics' and I guess I could create some form of wrapper for this.

[Code]...

View 4 Replies

VS 2010 - Wide Search -program Allows Users To Insert Documents Along With A Bunch Of Their Attributes Into The Program

Apr 14, 2011

The program allows users to insert Documents along with a bunch of their attributes into the program. The documents are stored in a relational database. One of the required functionalities is allowing the user to look for such documents. The User normally search directly for the obvious attributes of the document, like a unique ID, or it's Title. The problem is that from the search parameters is not allways known which ones will the user fill. For example the user inserts the name and version of the deocument, another time the user enters part of the Title and the person that delivered the document, or might just enter the document number and nothing else. Some of the data might even be incomplete, like title, name of the person who created the document and so on. The idea from the person who designed the system (I'm only reimplementing it) was to allow easier searches for the user, and allowing the user to search for more parameters tod with the idea that "the more parameters, the more specific results", since the results are always group of documents instead of single documents.

View 14 Replies

Printed Line Width Too Wide Even When Pen Width Is 1?

Mar 18, 2010

I have a drawing program written in VB6 that is capable of printing very thin lines to a laser printer. In VB .net, even though the pen width is set to 1, the thinnest lines are way too "thick". The equivalent line width in VB .net using a pen width of 1 is about the same as the DrawWidth = 4 in VB6. So, my question is, how can I print very thin lines to a laser printer in VB .net?

View 5 Replies

Code To Load The Already Compiled Yahoo Files To Execute The Code Again, Without Having To Recompile The Code?

Dec 8, 2011

I have some code to execute code at runtime...

Here is the main

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Try
If TextBox1.Text.Trim <> "" Then
If TextBox2.Text.Trim <> "" Then

[code]....

When the button is pressed, it all works and the following files are created: yahoo.dll and yahoo.pdb My question is this: What is the code to load the already compiled yahoo files to execute the code again, without having to recompile the code?

View 1 Replies

VS 2010 Convert VB6 Code To VB2010 Code From "The Most Amazing VB6 Code Ever" Thread?

Jul 19, 2011

This code was posted in Chit Chat and everyone is saying how great it is. I just have Visual Studio 2010 and no familiarity with VB6 so I thought it would be good to convert the code to Visual Basic 2010.

[Code]...

View 39 Replies

Another OPTIMIZING Macro Vba Code For Excel 2007 - The Code Is A Sort Of Transposer For Data

Sep 9, 2011

this code was not done by me originally and there are some thigns here i dont quite understand i have altered it a bit from my coworkers code to suit my data and it works. but too slow. and when i have 4000+kb excel files it might freeze altogether. ( I have checked tho that when and after this transposer runs it will still be within the excel row limit, i had done calculations before and made a macro to automatically split excel files based on number of columns and rows to make sure this is so ). This code seems to start out fast then goes slower the longer it runs. at least this is what it seems liek to me.

[Code]....

View 2 Replies

Convert Excel 2007 Macro Code To Correct VB 2008 Code?

May 26, 2010

i recorded the following macro in excel 2007:

[Code]...

View 3 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved