Launch App From Shortcut & Maintain Focus?

Feb 22, 2011

I need to launch a mainframe login screen from a shortcut so that the target and start in paths are preserved.

Before I figured out that the 'target' and 'start in' paths were problematic I was calling the .exe from the server using the following code and then sending keystrokes to the mainframe login dialog:

Private Sub btnDB1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnDB1.Click
Dim ProcID As Integer

[Code]...

...To launch the app from the shortcut, which works but I then can't call the process ID to set focus and send keystrokes to the login form.

View 3 Replies


ADVERTISEMENT

How To Launch A Shortcut

Nov 12, 2009

(Total noob...vb'ed a little bit over 10 years ago...I think...getting back at it...forgot EVERYTHING...currently using VB 2008 Express before/if shelling out the cash for a full version of Studio.) I created a very simple windows form application (.NET 3.5). In design mode it has a text section on top and two buttons below it.

[Code]...

View 2 Replies

Use WSH To Create A Shortcut To A Folder In My Quick Launch Toolbar?

Jan 14, 2008

I have a Quick Launch Toolbar linked to a folder of shortcuts.In this folder I link other folders and applications that I use commonly.I'm trying to use WSH to create a shortcut to a folder in my Quick Launch toolbar, but the shortcut isn't being created correctly.I suspect my problem is that, evidently, Windows has two kinds of shortcuts to folders.Using Explorer,I navigate to my Quick Launch folder, and choose the File | New | Shortcut, supplying the name of another folder as a target, it creates the shortcut.Using Explorer, looking at the shortcut in the details panel, Win says the shortcut is of type "Shortcut". Looking at its properties, the type is also Shortcut, and looking at the Shortcut tab, the Target Type is "Folder" and the Target location is the path I supplied. Now create the shortcut another way.Locate the folder in Explorer, and right-click-drag it to the same Quick Launch folder, choosing to Create a Shortcut.Now, Explorer thinks the shortcut is of type "Folder" and looking at it's properties, the Type is Folder (Target Type isn't shown) and the Target does point to the real location.There isn't a Shortcut tab now either.Both are definitely shortcuts to the same folder (I've double-checked), but they work differently in Quick Launch.If you pull up the Quick Launch toolbar and hover over the second shorcut, Windows pops out a sub-menu that contains the folder's contents. However, there is no such functionality using the first shortcut, you would have to choose Explore from the right-click menu to view it's contents.

(Below, the "Work" dir is my Quick Launch toolbar's folder)Using WSH, I can create a shortcut that doesn't autoexpand as follows: Set WshShell = WScript.CreateObject("WScript.Shell")[code].....

View 2 Replies

Launch An Application And Make This Dont Get The Focus?

Mar 19, 2011

I have developed an application which launch an external executable. I want to be able that if I am using another one, like notepad, I dont loose the focus to the one called by my application. I have test it changing the startinfo.windows style ( http://msdn.microsoft.com/en-us/libr...ndowstyle.aspx ) from Normal, minimized and hidden.Every one I have used make notepad loose the focus to the new launched application. Is it there any way to launch an application and make this dont get the focus, in order I can continue working in other app without problems?

View 7 Replies

Set Focus To Control Using Shortcut Key?

Feb 2, 2011

I have to set focus on combobox control when F2 key is pressed on the key board.

View 2 Replies

Extract Shortcut Icon Without Shortcut Symbol?

Jun 5, 2010

I'm trying to extract the icon from a shortcut (lnk file), but I end up with the shortcut symbol in the lower-left hand corner of the image. How can I extract a shortcut's icon without this symbol?

Here's the code I'm using:

Dim ico As System.Drawing.Icon = System.Drawing.Icon.ExtractAssociatedIcon("C:shortcut.lnk")

View 3 Replies

Forms :: Changing The Backcolor Of A Control When It Has Focus And Lost Focus?

Feb 16, 2011

Is there a more efficient/easier way changing the backcolor of a control when it has focus and lost focus? Let's say I've got 10 text boxes. Right now I would have 20 different events...10 for Enter event and 10 for Leave event. Of course, entering would change the back color to "green" and leaving would change it back to "white".

[Code]....

View 4 Replies

Window Focus - Right Click On The NotifyIcon, Excel Gains Focus?

Mar 10, 2009

Here is what I've done:1) Created an Excel COM add-in for Excel 20032) Added a NotifyIcon to the Windows taskbar notification area (aka system tray) during ThisAddIn_Startup3) Added a ContextMenuStrip with a ToolStripButton to the NotifyIconWhy is it when I right click on the NotifyIcon, Excel gains focus? If after clicking on the NotifyIcon to display the ContextMenuStrip I choose not select an option on the ContextMenuStrip and instead click back on the Excel window, I get a weird flashing cell in Excel.I've created a video of the problem to help you see what I [url] anyone know how to prevent this? Ideally, I'd like to be able to click back on Excel and only have the ContextMenuStrip close and Excel regain focus.

View 1 Replies

Forms :: Form Losing Focus - Keeps Loosing Focus ?

Nov 26, 2009

I have two forms in an application. One is he background and then I show another keypad form called with the show() method (not showDialog) because I need to perform some validations on btn click.

The kepad has 10 buttons and an Enter Button. The problem is that the form keeps loosing focus (I checked this with a messagebox which keeps poping up once for focus=true and again for focus=false, it continuously keeps losing and gaining focus) so it does not process any keypress events untill i click somewhere on the form. I tried using me.focus() in form load event but to no avail. The forms TopMost property is also set to true.

View 5 Replies

Maintain An App Activated?

Jul 21, 2011

I need to create a program that when it is opened, Focus will be always in that program until someone with any way will close it. I've tried to add Me.GetFocus() in the LostFocus event but nothing happens, I've tried to add Me.activate() when the Deactivate() event raises and when I debugged the program worked but when I run the biulded .exe file nothing happens again! how I can manage this Function?

View 6 Replies

C# - Books With A Focus On .NET Framework And Not So Much With A Focus On The Language Used?

Jul 18, 2010

recommend a book that focuses on the .NET framework in general and isn't too language specific.

View 3 Replies

Lost Focus Event, What Control Is Getting Focus?

Mar 21, 2012

I have a textbox on a form that when it loses focus it updates other text boxes on the form. But before it updates the other textboxes I check the input value in the textbox lostfocus event if it is undesired I return focus to the the textbox and alert the the user with a msgbox. However where my problem is, is that when the cancel button is clicked I don't care what the input in the textbox is because the changes are being canceled but if the value is undesired the it keeps returning focus to the textbox instead of canceling the changes. Is there a way to see what control was clicked on before or in the lost focus event? Can't seem to figure it out tried enter and leave events but no luck!

So for example something like this...

Code:
Private Sub TextBox1_LostFocus(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TextBox1.LostFocus
If Control that was clicked <> btnCancel then

[Code].....

View 2 Replies

Maintain DB Field Format

Mar 27, 2009

I have a table in Access with 3 fields Key (autonumber), Field1 (Text), LookUp1 (combobox).The combobox field is working off a list that I manually entered into it (there are only three options Opt1, Opt2, Opt3..When I import the datagridview control, the fields all come across as Text, and I lose that combobox option.Can someone tell me how I can maintain the format of the fields within Access when I import? [code]

View 7 Replies

Maintain Privacy Of My Program?

Mar 3, 2010

I want to know that is it possible to convert exe file(made from vb2008) to vb source code..if it is possible then how can i maintain Privacy of my program.

View 2 Replies

Maintain Security In .net Applications ?

Aug 18, 2011

How do i maintain Security in VB.net Applications ? esp in databases

View 2 Replies

Maintain State Of Textbox - ASP.NET?

Jan 23, 2009

how to maintain state of textbox while postback

View 2 Replies

Maintain Usage Log For An Application?

Oct 13, 2010

Well there are several ways that you can implement such a log. You could write to a text file or XML file...or you could use the Windows Event log.

What do you envision using for logging purposes?

View 1 Replies

Maintain Value Of A Variable Program?

May 9, 2012

I have a string variable called str assigned with "John". I changed it to "Dave" when the first button is clicked. When the second is clicked, I displayed the value to a label. I wanna see Dave but I just see John. Why is that?

There is nothing on page load and nothing else where. I know I can put into a session but this is on the same page. Can I not do without session or viewstate. [code]...

View 1 Replies

.net - How To Maintain Paging On Page Load

Sep 11, 2009

I am using vb.net code in which I am having a gridview control. Please see the below code

<asp:GridView ID="GridView1" runat="server" AllowPaging="True" AllowSorting="True"
AutoGenerateColumns="False" CssClass="innerGridTable" DataKeyNames="OrgID" DataSourceID="OrgGridViewDataSource">
<Columns>
<asp:CommandField ShowSelectButton="True" ButtonType="Button" SelectText="Select"
ControlStyle-CssClass="Button">

[Code]...

View 2 Replies

How To Maintain Position Of An Object W.r.t Window

Jan 18, 2011

i just want to know how to maintain the position of an object w.r.t the window in vb when i resize the window during run-time.i tried anchoring it from all sides and the object resizes along with it.

View 6 Replies

How To Maintain Scroll Position In DataGridView

Apr 1, 2010

I was wondering if there is a way to keep the same scroll position in a datagrid view as the app jumps around to various rows (driven by the user selecting different timestamps or address). After the jump happens, the horizontal slider moves all the way to the right, but I want it at the same position as before the jump (or at lease go all the way to the left).

I have tried numerous things (datatable.AcceptChanges(), etc) but haven't been able to figure it out yet.

View 1 Replies

How To Maintain Variable Value In Double DataType

Jun 22, 2012

Datatable contain some values like 0.0,10000.00,54678.94. I am getting that values using for loop and store it in a variable in double datatype. I want to add these nos and store it in a variable. Each time variable value changed.

for loop
Dim ds5 As dataset1.pro_dtsumDataTable = TA5.GetData(TextBox1.Text, users)
If (ds5.Rows.Count > 0) Then
Dim y As Double
y = Double.Parse(ds5(0)("sum(fld_primary)").ToString())
Dim y1 As Double
y1 = 0 + y
End If
Next

First time y1=0.0
Next time the value of y1 is not added to previous value.
I want the result y1=64679.34

View 1 Replies

Maintain PageViews In Global.asax (asp.net)?

Mar 25, 2010

I need a function in global.asax file which gets called only once when user enter a page url. application_beginrequest gets called 50-60 times in a single page( as to render a page several requests go to server.)

i though of a solution - I can write my fucntion in global.asax and call it on page load of other pages but in that solution I need to call it in every page. I would prefer something which is to be done only in global.asax

View 2 Replies

Maintain Zeros In Incremented Values?

Jul 18, 2012

How to maintain Zeros in incremented values ex: ECJ-00001

[Code]...

View 5 Replies

Best Way To Maintain An Autocomplete / Suggest List Across Sessions

Apr 7, 2009

I would like to maintain a list of all of the strings entered into a ComboBox across all uses of an application on a given PC, for use as the AutoCompleteSource for that ComboBox, i.e., I enter in "Fred" in the ComboBox, commit the data, close the application, reopen the application, reopen the ComboBox, type "F", receive the suggestion "Fred".Assuming I already have in place code to create and maintain such a list in memory and add new elements to it as they are entered into the ComboBox, etc., what do you suggest as the best way to save/load this data in between sessions?Possible complicating factors: This application will be deployed via OneClick deployment, and will search for updates online every time the application starts. I would prefer that if the application updates, the list still exists after the update has completed.

View 2 Replies

How To Maintain Aspect Ratio Of Form When Resizing

Jul 1, 2011

I use this code for maintaining aspect ration of form when resizing:

Public Class Form1
Public Structure Rect
Public left As Integer
Public top As Integer
Public right As Integer
Public bottom As Integer

[Code]...

View 9 Replies

Keep / Maintain The Split Characters When Splitting A STRING?

Apr 29, 2010

I have had a look at 2010 to see if any options have been added to

System.StringSplitOptions

and we still have;

None

or

RemoveEmptyEntries

Anyway after answering another STRING related question here.>>

[URL]

I thought about how the String.Split method works.

Often I have wanted to split a string on the characters that terminate a sentence such as a full stop >> . << ,

a question mark >> ? << or an exclamation mark >> ! << and still keep the string split characters.

[Code]....

View 10 Replies

Maintain A Running Total In A SQL Server Database?

Mar 4, 2011

I am using Visaul Studio 2010 to build a Windows Forms application to maintain a table in an SQL Server 2008 database. The table is named CASHBOOK and here are the further details:

DATE | DESCRIPTION | DEBIT | CREDIT | BALANCE
--------|----------------|---------|-----------|---------
1/1/2011| CASH BALANCE | | | 5000
1/1/2011| SALES | 2500 | | 7500
2/1/2011| PURCHASE | | 3000 | 4500
2/1/2011| RENT | | 4000 | 500
2/1/2011| SALES | 5000 | | 5500

I can use CASHBOOKTABLEADAPTER.INSERT(...) to insert appropriately, but my problem is how do I update the BALANCE column?

View 6 Replies

Maintain Aspect Ratio Of Container Form

May 21, 2010

I have the need to maintain a 4:3 aspect ratio on a Video control on a form. The forms (there could be up to 16 in a 4x4 layout) should all maintain a 4:3 aspect ratio when resized depending on clients monitor/resolution. The forms have a border and will keep them. The control is set to fill the form and is the only control on the form. Here is code that I use to create the initial layout:

[Code]...

View 1 Replies

Maintain Listbox Scroll Posstion After Postback?

Feb 12, 2009

I am developing FX software where Ticks are coming through socket and loading in listbox. but if i scroll down to see items its send back to me at top when new item add in listbox so what is way that scroll bar posstion remain at same where client want and its also keep add..

View 4 Replies







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